I'm working with a linguist who is writing a paper about Burmese. I'm trying to get his paper to work in latex. There're lots of symbols in Burmese. but I struggle to find the commands in latex to get them displayed. Can I please get some help with this. Any advice is appreciated. Thanks very much.
-
2Welcome to TeX.SX! You should consider using fontspec and XeLaTeX, then you can input the characters directly. – TeXnician Mar 22 '18 at 13:41
2 Answers
If you use xelatex or lualatex then you can use fonts installed on your system. I made a sample text using google translate and firefox displayed it using a font "Mayanmar Text" which probably came with Windows, so I can access that font in xelatex as:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Myanmar Text}
\begin{document}
တစ်နှစ်သုံးဟဲလိုကမ္ဘာကြီး
\end{document}
which hopefully says
one two three hello world
- 757,742
For any future people looking to write in a Myanmar language (Burmese, Kayin/Karen, Mon, etc.) I'll share what I've learned so far.
Use XeLaTeX, as that is the best way to get the script to render properly. I've had trouble with LuaLaTeX; i.e. it would not render the script properly. If you're familiar with Myanmar script, it was like looking at Zawgyi-encoded text with a Unicode font, or vice-versa. Also use Padauk or Padauk book as your font with the fontspec package; if you want to have clean line breaks an Open Type font is necessary here. Encoding should be UTF-8.
With the above applied, you should be fine writing with any Unicode keyboard (Padauk is a Unicode font, unlike the commonly used Zawgyi font and keyboard for Burmese). Windows has one built in, and you can find a few others on the web. Sample code below:
\documentclass{book}
\usepackage{fontspec}
\XeTeXlinebreaklocale "my" %Myanmar line and character breaks
\XeTeXlinebreakskip = 0pt plus 2.5pt
%under 2pt and I still was getting text going past the margins.
\setmainfont[Script=Myanmar]{Padauk Book}
\begin{document}
မြန်မာလိုရေးနေပါသည်
\end{document}
- 85
-
1Hi and welcome to TeX.SE. Would you mind clarifying what exact issues you ran into with LuaLaTeX? Thanks. – 0xC0000022L Jul 04 '19 at 10:19
-
2For use with LuaLaTeX, you’ll be interested in HarfTeX (https://tex.stackexchange.com/q/493180). – Thérèse Jul 04 '19 at 15:30
-
1Another common technique for this is to declare
\newfontfamily\myanmarfont{Paduak Book}[Script=Myanmar]followed by\DeclareTextFontCommand\textmyanmar{\myanmarfont}. This lets you write individual words or passages in the language. – Davislor Jul 04 '19 at 22:38 -
Is using the
\newfontfamilyand\DeclareTextFontCommandrecommended over simply using{\fontspec{Padauk Book} sample text}? If so, why? What are the advantages? – Bryce M Jul 05 '19 at 02:59
