aritraghsh09 / pdflatex_bengali

Provides a quick & easy way to write in Bengali using only pdflatex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DOI License: GPL v3 Compile demo.tex


Introduction

Writing বাংলা in LaTeX is pretty straightforward these days using XeLaTeX or LuaTeX. However, there arises instances when one needs to write বাংলা only using pdflatex.

This is especially true with respect to many academic institutions (e.g., arXiv), which still support only pdflatex.

This short repository is meant to help you write বাংলা using only pdflatex. The examples in this repository have also been written/tested to work with Overleaf

Note that this repository is entirely based on the Bengali font and code developed by Palash Baran Pal for his excellent bangtex package

Quickstart Guide

  • Put the mf folder along with all its contents in the same directory as your LaTeX source code.
  • Put the bangla_commands.tex file in the same directory as your LaTeX source code.
  • Put \input{bangla_commands} in the preamble of your LaTeX source code
  • When you write বাংলা enclose it within the \bng command like this {\bng baNNGla \*l*ikhun} which should output বাংলা লিখুন
  • The \bng command can be replaced by commands specifying other sizes, and this is outlined in the demo.tex and demo.pdf files.
  • A simple example document is shown below
\documentclass{article}

\title{Bengali Test}
\author{{\lbng Airt/r \*gh*eaSh}}

\input{bangla_commands}

\begin{document}

\maketitle

\section{Example}

{\bng baNNGla \*l*ikhun}

\end{document}

Warning Line 97 of bangla_commands.tex gives an option to put an extremely high penalty on splitting words (so that your LaTeX compiler doesn't choose to do this). This line is commented out by default. But, if your document has many paragraphs of বাংলা text, it's recommended to uncomment this line.

Transliteration

  • Note that in order to write Bengali using bangtex, you cannot type using the বাংলা script directly. You need to write it using transliteration-esque Roman characters. This scheme is extensively outlined in the original bangtex manual.

  • As you may notice, the above scheme takes a little bit of time to learn and master. Abhijit Dasgupta has developed a way to type directly in বাংলা and then convert the same into the bangtex commands using a perl script. You can access the details here

More Background & Why This Repository

  • While bangtex provides an excellent way to write extensive documents in বাংলা, I needed the exact opposite -- the need to insert বাংলা in a primarily English document using only pdflatex on Overleaf.

  • Thus, I created this repository, which only keeps the bare minimum functionality of bangtex while also not needing any extensive installation or dependencies on other software (as this is not possible on Overleaf)

  • Note that if you are trying to write a more extensive document with advanced features, you should not expect this simple repository to work properly and should use the original bangtex package instead.

Citation & Contact

I was not aware that I could write my name or other content in বাংলা for my arXiv submissions for many years. I encourage you to cite this repository (in the Software Section of your academic publications) to make others aware of its existence. To do this you can use the following Zeondo DOI and bibtex code

@software{Ghosh_pdfLaTeX_Bengali_2022,
author = {Ghosh, Aritra},
doi = {10.5281/zenodo.6780690},
month = {6},
title = {{pdfLaTeX Bengali}},
url = {https://github.com/aritraghsh09/pdflatex_bengali},
version = {0.1},
year = {2022}
}

You can reach out to me using the contact information on my website. If you want to contribute, feel free to open a pull request directly if you know how to/are comfortable doing that.

About

Provides a quick & easy way to write in Bengali using only pdflatex

License:GNU General Public License v3.0


Languages

Language:TeX 100.0%