惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

On a trail less travelled

Anandabazar Patrika, Unicode and proxy Mobile phone, internet and websites in Indian languages Unicode adoption for Bengali – The Change is happening Improved Firefox Padma for reading Anandabazar and Bartaman When you hit 34 degree Celsius below zero Virtual Keyboard English to Bengali Machine Translation System Anubadok is now 0.2 Reading Anandabazar, Bartaman in Linux, Mac and the Bigger Issue
Writing Unicode Bengali in LaTeX
2008-06-27 · via On a trail less travelled

If you are familiar with LaTeX and interested in writing Bengali documents (or any other Indic documents) using it then you might find this post relevant.

In brief, LaTeX is a type-setting system which is widely used in scientific communities for preparing technical articles.

Here, instead, I will be interested in writing Bengali documents using LaTeX. The first Bengali typesetting system using LaTeX was the well known Bangtex package by Palash B. Pal. Bangtex does produce good quality documents.

However, main inconvenience in using Bangtex package is its input method. One needs to follow a specific transliteration scheme. This suffices if you want to create PS/PDF file at the end. However if you also want to create html pages for the same documents using latex2html then you are out of luck.

Now wouldn’t it be great if you could type your Bengali (or any other Indic) documents using standard Unicode in LaTeX as you would do with any other application?

Here comes the new revolution, XeTeX, a new type-setting system based on a merger of Donald Knuth’s TeX system with Unicode and modern font (OT/AAT) technologies. This means you no longer need to have special metafonts for your language to be present in the system. Instead you can use standard OTF/TTF fonts those are available in your system, for LaTeX as well.

No more talking… here goes the image of output PDF file.
Bengali sample document using XeTeX

Above document is created using the following latex source file


\documentclass{article}
\usepackage{fontspec}

%
% This file is a sample tex file to illustrate use of
% XeTeX in typesetting Bengali document.
% License: GNU FDL: (C) Golam Mortuza Hossain, 2008
%
%
% Define fonts that you want to use
%
\font\serif="FreeSerif:script=beng"
\font\serifbb="FreeSerif:script=beng" at 24pt
\font\deffont="FreeSerif:script=beng" at 14pt
\font\mukti="Mukti Narrow Bold:script=beng"

%
% "script=beng" in above lines ensures that appropriate
% complex text rendering engines are used for proper
% rendering of Bengali.
%

\title{\bf\serifbb পাগলা দাশু}
\author{\bf\serif সুকুমার রায়}
\date{}

\begin{document}
\deffont %Default font used for the document
\maketitle

আমাদের স্কুলের যত ছাত্র তাহার মধ্যে এমন কেহই ছিল না, যে পাগলা দাশুকে
না চিনে। যে লোক আর কাহাকেও জানে না, সেও সকলের আগে পাগলা দাশুকে চিনিয়া
লয়। সেবার একজন নূতন দারোয়ান আসিল, একেবারে আনকোরা পাড়াগেঁয়ে লোক, কিন্তু
প্রথম যখন সে পাগলা দাশুর নাম শুনিল, তখনই সে আন্দাজে ঠিক ধরিয়া লইল যে,
এই ব্যক্তিই পাগলা দাশু। কারণ তার মুখের চেহারায়, কথাবার্তায়, চলনে চালনে
বোঝা যাইত যে তাহার মাথায় একটু 'ছিট' আছে। তাহার চোখদুটি গোল-গোল,
কানদুটা অনাবশ্যক রকমের বড়, মাথায় এক বস্তা ঝাঁকড়া চুল। চেহারাটা দেখিলেই
মনে হয়---

\vskip 10mm

% Specific font can be used for any part of the document
{\mukti বিঃদ্রঃ এই বাংলা পাতাটি লেখার জন্য XeTeX ব্যবহার করা হয়েছে।}

\end{document}


XeTeX is available as standard component of TeXLive distribution. If you are using latest (K)ubuntu then you can

sudo apt-get install texlive-xetex

to install it. To test above sample tex file you can cut-n-paste to a file say sample.tex then compile it using

xelatex sample.tex

If everthying goes fine then you should get sample.pdf as your output document. In case you need to edit the latex source file, you can use any editor of your choice like kate, gedit or even vim. Of course, you can also use specialized LaTeX editor like kile (KDE Integrated LaTeX Environment) where you can view output document simply in one click!!

Update (Jul 8, 2010): If you are facing “double-quote” mixed-up problem that causes Latex compilation error while copy-pasting from the browser then please download the sample.tex file here.

Posted in Bengali Computing | Tagged , , , , | 52 Comments