LaTeXbangla 2.0: A Decade Later

Published:

LaTeXbangla: Writing Bangla & Assamese with ordinary LaTeX

Overleaf demo | Code | Manual | Bangla example | Assamese example

In 2016, when I was still in high school, I wrote LaTeXbangla out of frustration. I wanted to LaTeX some math notes in Bangla, but the existing options were limited and I was spending more time configuring fontspec than math. Polyglossia’s Bangla support was rough at the time, so I put together a package to handle the common problems. A few years later, I used it to write a mathematics book in Bangla.

Then I mostly left the package alone. To my surprise, it became the standard for typesetting mathematical content in Bangla, with numerous mathematics books published using it. Meanwhile, LaTeX and Polyglossia moved on, and some of my old workarounds stopped working. People reported problems with numbering, citations, biblatex, and custom font loading, among other things. An update was overdue.

Ten years later, LaTeXbangla is now at version 2.0. These are the changes I care about most:

  • LuaLaTeX support alongside XeLaTeX.
  • Assamese support, with translated examples and a complete manual.
  • Tested defaults for 18 Bangla font families, with adjusted size, spacing, and fallback styles. Other fonts may work too, but have not been tested.
  • Custom English and math fonts, including English font changes within a single passage.
  • Bangla and Assamese text and digits in equations, along with native citation numbering.
  • Native numeric counters and alphabetic list labels for Bangla and Assamese.

The idea is still the same: choose a Bangla font and write ordinary LaTeX. LaTeXbangla takes care of numbering, headings, lists, and references, and switches between Bangla and English fonts as you type.

Overleaf may take a while to include this update. Meanwhile, make a copy of this demo project and start writing.

For example, with Kalpurush installed, compile this with XeLaTeX or LuaLaTeX:

\documentclass{article}
\usepackage{latexbangla}
\setbanglamainfont{Kalpurush}
\setmainfont{TeX Gyre Termes} % Optional: change the English font.

\begin{document}
\section{পিথাগোরাসের উপপাদ্য}
The Pythagorean theorem থেকে আমরা পাই,
\[৩^২+৪^২=২৫.\]
\textbf{অতিভুজের দৈর্ঘ্য ৫ একক।}
\end{document}

The English text keeps its own font, the section number becomes Bangla, and \textbf works even when the Bangla font has no bold face. Typed digits keep their script: 12 stays 12, and ১২ stays ১২, in both text and mathematics. You can also choose your math font independently.

For an Assamese document, load \usepackage[language=assamese]{latexbangla} and keep the same font commands. Document labels and reference names become Assamese, and alphabetic lists follow the Assamese sequence. You still write ordinary LaTeX; the package takes care of the language-specific details.

If you want different fonts for body text, sans-serif text, and typewriter text, you can choose those separately for each script. Even a different English font used for just one quotation stays in place when Bangla or Assamese appears in the passage.

The old numbering and citation problems are fixed, and more of the language support now comes from Polyglossia. The manual is available in English, Bangla, and Assamese, with code beside its rendered output so you can see what each example does.

If you used the old version, the manual has a migration section to help you update your documents. If you are starting a new one, try the example.

Thanks for Reading!