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

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

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