# How can I use Bengali script in an English document?

I am a Linguist and I need to use Bengali script inside an English article which is predominantly English. I have found many answers but they only seem to be useful when the whole document is in Bengali. I should mention that I use the following:

Tex-editor: Texmaker

Library: MikTex

Package: Tipa

Compiler: LuaLatex

Let me describe the problem: for example when I start my document as:

\documentclass[10pt,a4paper]{article}

\usepackage{tipa}

\begin{document}

x, y, z whatever....

আমি

\end{document}


It doesn't show any error and the pdf looks fine except the Bengali letters just disappear.

• Nomoskar ar welcome to TeX.SX! It's possible the polyglossia package would help, though I'm not sure. – Arun Debray Jan 2 '16 at 1:03
• polyglossia and fontspec, though XeLaTeX may prove more suitable than LuaLaTeX (but LuaLaTeX may work fine). – cfr Jan 2 '16 at 1:06

Using the polyglossia package, it works quite well in XeLaTeX:

\documentclass[preview, margin=0.5cm]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{bengali}
% Replace this with whatever font you're using
\newfontfamily\bengalifont[Script=Bengali]{Akaash}
\title{\textbengali{ইংরেজি} and Bengali}
\begin{document}
\maketitle

First English, \textbengali{তারপর বাংলা}

\end{document}


The output looks like this.

(As per this answer, I installed the Akaash font from this website. You can substitute in another font if you prefer.)

Note, however, that if I compile with LuaLaTeX, vowels are not handled correctly: the first word of the title should be ইংরেজি, but instead we have this, which is wrong:

Unfortunately, I don't (yet) know of a workaround in LuaLaTeX.

• Do you know how to use Bengali v.2 with fontspec? The font I used offers 2 scripts and I'm curious what the second one would look like. (I know nothing whatsoever about Bengali.) – cfr Jan 2 '16 at 2:15
• @cfr sure, I'll take a look at Noto Sans Bengali and see if I can make that work. – Arun Debray Jan 2 '16 at 2:36
• tex.stackexchange.com/questions/89118/… is interesting. Could something similar apply with LuaTeX? – cfr Jan 2 '16 at 2:48
• @cfr: after some searching, I'm stuck. According to this mail thread, it's possible to switch from beng to bng2 in XeTeX, but the referenced pastebin link is long gone, and I have no idea how one would do this. It seems like it would be worth asking as a followup question, in fact. – Arun Debray Jan 2 '16 at 3:48
• tex.stackexchange.com/q/285527 Feel free to edit if I've got anything wrong. – cfr Jan 2 '16 at 4:14

I don't know anything about Bengali so it took me a while to figure out a font I could use for this. However, I get similar output to Arun Debray when compiling with LuaLaTeX

which I gather is wrong, whereas XeLaTeX produces

which I gather is less wrong.

Since this uses an entirely different font, I guess that LuaLaTeX cannot cope properly with this script at the moment. (Or it needs some additional something which XeLaTeX can do without.)

\documentclass[a4paper]{article}
\usepackage{geometry,fontspec,polyglossia}
\setmainlanguage[variant=british]{english}
\setotherlanguage{bengali}
\newfontfamily\bengalifont{Noto Sans Bengali}[Script=Bengali]
\begin{document}
x, y, z whatever\dots

\begin{bengali}
আমি
\end{bengali}
\end{document}


The font I used offers two versions of Bengali script

beng            Bengali
bng2            Bengali v.2


However, I am not sure how to enable the second one to compare. I guess this could be done as a raw font feature, but perhaps there is a better option for this, which would still have it correctly recognised as a script?

• To confirm, your first example is wrong, and the second example is correct. One of the quirks of the Bengali script is that some vowels are written before consonants they come after, so ম is ma but মি is mi. You can use ি or ে (i and e, respectively) to test for this. – Arun Debray Jan 2 '16 at 2:30
• I also found this post mentioning similar issues in a related script; it works in XeLaTeX, but not LuaLaTeX. – Arun Debray Jan 2 '16 at 2:40
• Thanks for confirmation. I said "gathered" just because I am entirely following you on this. But I thought it would be useful to know the correct/incorrect results applied to another font, since I'd just spent a while figuring out a font I could use for this. I assume the second version of the script will follow the same pattern, but it would be interesting to have that confirmed. I just couldn't figure out a way to get fontspec to recognise it. – cfr Jan 2 '16 at 2:40
• This kind of issue is why I said in my original comment that XeLaTeX might prove better here than LuaLaTeX. XeLaTeX is generally better with multilingual stuff, especially when it comes to scripts which are less commonly used in LaTeX documents and which differ most from Latin scripts. (RTL typesetting works better, for example, and I've seen other cases where the results are wrong for LuaTeX but right with XeTeX although I don't know I can track all the questions down now.) – cfr Jan 2 '16 at 2:43
• Thanks a lot, it works although I should mention that \usepackage{tipa} now shows the following error:error:_____________________________ ! LaTeX Error: Command \sups already defined. Or name \end... illegal, see p.192 of the manual., ____________________________ but when I comment that out everything works fine and I have the features of Tipa package too... don't know how ! Maybe polyglossia includes Tipa ? Does it ? – LinguaDas Jan 4 '16 at 23:33