% LaTeXbangla user manual. Copyright 2016, 2026 Adib Hasan.
% Distributed under the LPPL, version 1.3c or later.
\documentclass[11pt,a4paper]{article}
\usepackage[margin=22mm,headheight=15pt]{geometry}
\usepackage{latexbangla}
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}
% Give the opening example a visibly different English family. Only its
% preview uses this family; the surrounding manual stays in Pagella.
\newfontfamily\manualexampleenglishfont{TeX Gyre Adventor}

% Save a configured family for the boldness preview; the main text uses the
% normal package default. Font setters belong in the preamble, including here.
\setbanglamainfont[AutoFakeBold=5,AutoFakeSlant=0.2]{Kalpurush}
\NewCommandCopy\manualstrongfont\bengalifont
% Configure the family comparison with the public setters, then save its
% families. The preview selects them locally; prose and listings keep Kalpurush.
\setbanglamainfont{Noto Sans Bengali}
\NewCommandCopy\manualsansfont\bengalifont
\setbanglamainfont{Siyam Rupali}
\NewCommandCopy\manualmonofont\bengalifont
\setbanglamainfont{Kalpurush}

% Register the second language for this combined manual. Ordinary documents
% select it with language=assamese; they do not need this documentation setup.
\makeatletter
\ExplSyntaxOn
\file_input:n {code/languages/latexbangla-assamese.tex}
\ExplSyntaxOff
\makeatother
\setotherlanguage[numerals=bengali,changecounternumbering=true]{assamese}
\NewCommandCopy\assamesefont\bengalifont
\newcommand{\assamesefontsf}{\assamesefont}
\newcommand{\assamesefonttt}{\assamesefont}

\usepackage{amsmath,amsthm,graphicx,booktabs,tabularx,float}
\usepackage{xcolor,minted,tcolorbox,titlesec,fancyhdr,needspace}
\tcbuselibrary{raster,skins}
\usepackage{hologo}
\usepackage[backend=biber,style=numeric-comp,sorting=none,date=long]{biblatex}
\DeclareLanguageMapping{assamese}{latexbangla-assamese}
\usepackage{hyperref}
\usepackage{alphalph}
% The extended-label example uses alphalph's custom-alphabet interface.
\makeatletter
\newalphalph{\extendedBangla}{\@alph}{35}
\makeatother
% Reuse the package alphabet for the third guide.
\ExplSyntaxOn
\cs_new:Npn \manualassamesealph #1
  {
    \int_compare:nNnTF {#1} = {0} {}
      {
        \int_compare:nNnTF {#1} < {1} {\use:c {@ctrerr}}
          {
            \int_compare:nNnTF {#1} > {37} {\use:c {@ctrerr}}
              {\clist_item:Nn \c__latexbangla_assamese_alphabet_clist {#1}}
          }
      }
  }
\ExplSyntaxOff
\newalphalph{\extendedAssamese}{\manualassamesealph}{37}
\definecolor{BanglaGreen}{HTML}{006847}
\definecolor{BanglaInk}{HTML}{263640}
\definecolor{BanglaRed}{HTML}{C92935}
\definecolor{CodePaper}{HTML}{F4F6F8}
\definecolor{ResultPaper}{HTML}{F0F8F4}
\hypersetup{colorlinks,linkcolor=BanglaGreen,urlcolor=BanglaGreen,
  citecolor=BanglaGreen,pdftitle={LaTeXbangla 2.1: User guide},pdfauthor={Adib Hasan}}
\setlength{\parindent}{0pt}
\setlength{\parskip}{4pt plus 1pt}
\setlength{\emergencystretch}{2em}
\titleformat{\section}{\Large\sffamily\bfseries\color{BanglaGreen}}{\thesection}{0.6em}{}
\titleformat{\subsection}{\normalsize\sffamily\bfseries\color{BanglaInk}}{}{0pt}{}
\titlespacing*{\section}{0pt}{9pt}{6pt}
\titlespacing*{\subsection}{0pt}{8pt}{3pt}
% Reserve room before starting a heading so both its text and PDF anchor move
% together when a page is full. Sections otherwise flow without forced breaks.
\AddToHook{cmd/section/before}{\Needspace{5\baselineskip}}
\AddToHook{cmd/subsection/before}{\Needspace{6\baselineskip}}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\small\sffamily\color{BanglaGreen}\LaTeX{}bangla}
\fancyhead[R]{\small\sffamily\color{BanglaInk}Version 2.1\quad User guide}
\fancyfoot[C]{\small\thepage}
\renewcommand{\headrulewidth}{0.3pt}
% Keep the English guide's navigation Western while examples use the package's
% default Bengali numbering. Raw counter values bypass localized formatters.
\renewcommand{\thesection}{\number\value{section}}
\renewcommand{\thesubsection}{\thesection.\number\value{subsection}}
\renewcommand{\thepage}{\number\value{page}}
\newcommand{\pkg}[1]{\texttt{#1}}
\newtheorem{theorem}{উপপাদ্য}
\newtheorem{assamesetheorem}{উপপাদ্য}
\providecommand{\assamesetheoremautorefname}{উপপাদ্য}
\providecommand{\theoremautorefname}{উপপাদ্য}
\renewcommand{\theoremautorefname}{উপপাদ্য}

\tcbset{manualbox/.style={enhanced,boxrule=0.4pt,arc=2mm,
  colframe=BanglaGreen!35!white,colback=CodePaper,
  colbacktitle=BanglaGreen!9!white,coltitle=BanglaGreen,
  fonttitle=\small\sffamily\bfseries,left=3mm,right=3mm,top=2mm,bottom=2mm,
  before skip=5pt,after skip=5pt}}
\tcbset{manualwarning/.style={manualbox,
  colframe=BanglaRed!45!white,colback=BanglaRed!5!white}}
% Minted supplies LaTeX syntax highlighting through Pygments. Its verbatim
% renderer preserves the Bangla text and uses the same fonts as the document.
\setminted{style=default,breaklines=true,breakanywhere=true}
\newminted[code]{latex}{fontsize=\small,samepage}

% Write each example once, then show its source and execute that same file.
% A plain integer in the filename keeps generated names independent of the
% document's numbering policy. Each output panel is scoped to its own box.
\newcounter{manualexample}
\newcommand{\manualcodetitle}{Code}
\newcommand{\manualresulttitle}{Result}
\newcommand{\manualexamplefile}{\jobname-example-\number\value{manualexample}.tex}
\newenvironment{examplepair}
  {\VerbatimEnvironment\stepcounter{manualexample}%
   \begin{VerbatimOut}{\manualexamplefile}}
  {\end{VerbatimOut}%
   \begin{tcbraster}[raster columns=2,raster column skip=3mm,
     raster equal height=rows,raster valign=top]
   \begin{tcolorbox}[manualbox,title=\manualcodetitle]
     \inputminted[fontsize=\footnotesize]{latex}{\manualexamplefile}
   \end{tcolorbox}
   \begin{tcolorbox}[manualbox,title=\manualresulttitle,colback=ResultPaper]
     \setlength{\parskip}{4pt}%
     % Match normal document footnote numbering inside the boxed minipage.
     \renewcommand{\thempfootnote}{\arabic{mpfootnote}}%
     \input{\manualexamplefile}
   \end{tcolorbox}
   \end{tcbraster}}

% The source panels and Biber read these same sample entries.
\begin{VerbatimOut}{\jobname-bangla.bib}
@book{book,
  author = {আরিফ রহমান and মায়া সেন},
  title = {গণনার প্রথম পাঠ},
  translator = {সুমন দত্ত},
  edition = {২},
  publisher = {নমুনা প্রকাশনী},
  date = {২০২৩-০৪-১২}
}
@article{article,
  author = {নীলা দাস},
  title = {একটি গণনার সমস্যা},
  journaltitle = {গণিতচর্চা},
  volume = {8}, number = {2},
  pages = {12-34}, date = {2024-06}
}
\end{VerbatimOut}
\begin{VerbatimOut}{\jobname-assamese.bib}
@book{book,
  author = {আৰিফ ৰহমান and মায়া সেন},
  title = {গণনাৰ প্ৰথম পাঠ},
  translator = {সুমন দত্ত},
  edition = {২},
  publisher = {নমুনা প্ৰকাশনী},
  date = {২০২৩-০৪-১২}
}
@article{article,
  author = {নীলা দাস},
  title = {এটা গণনাৰ সমস্যা},
  journaltitle = {গণিতচৰ্চা},
  volume = {8}, number = {2},
  pages = {12-34}, date = {2024-06}
}
\end{VerbatimOut}
% Independent reference sections restart labels and keep each guide's links local.
\newcommand{\manualbibliographypair}[2]{%
  \begin{tcbraster}[raster columns=2,raster column skip=3mm,
    raster equal height=rows,raster valign=top]
  \begin{tcolorbox}[manualbox,title={\manualcodetitle: \texttt{references.bib}}]
    \inputminted[fontsize=\footnotesize]{bibtex}{\jobname-#1.bib}
  \end{tcolorbox}
  \begin{tcolorbox}[manualbox,title=\manualresulttitle,colback=ResultPaper]
    \begin{refsection}[\jobname-#1.bib]
    \cite{book,article}
    \printbibliography[heading=subbibliography,title={#2}]
    \end{refsection}
  \end{tcolorbox}
  \end{tcbraster}}

% Static natbib previews are checked against real BibTeX output by the tests.
\begin{VerbatimOut}{\jobname-natbib-bangla.bib}
@book{book,
  author = {আরিফ রহমান and মায়া সেন},
  title = {গণনার প্রথম পাঠ},
  edition = {২},
  publisher = {নমুনা প্রকাশনী},
  year = {২০২৩}
}
@article{article,
  author = {নীলা দাস},
  title = {একটি গণনার সমস্যা},
  journal = {গণিতচর্চা},
  volume = {8}, number = {2},
  pages = {12-34}, year = {2024}
}
\end{VerbatimOut}
\begin{VerbatimOut}{\jobname-natbib-assamese.bib}
@book{book,
  author = {আৰিফ ৰহমান and মায়া সেন},
  title = {গণনাৰ প্ৰথম পাঠ},
  edition = {২},
  publisher = {নমুনা প্ৰকাশনী},
  year = {২০২৩}
}
@article{article,
  author = {নীলা দাস},
  title = {এটা গণনাৰ সমস্যা},
  journal = {গণিতচৰ্চা},
  volume = {8}, number = {2},
  pages = {12-34}, year = {2024}
}
\end{VerbatimOut}

\newcommand{\manualnatbibpreview}[3]{%
  #1\par
  \medskip\noindent{\large\bfseries #2}\par
  \begin{list}{}{\setlength{\leftmargin}{1.8em}%
    \setlength{\labelwidth}{1.5em}\setlength{\labelsep}{.3em}%
    \setlength{\itemsep}{4pt}\setlength{\parsep}{0pt}}
    #3
  \end{list}}
\newcommand{\manualnatbibbangla}{%
  \manualnatbibpreview{রহমান এবং সেন [২]; [১, ২].}{তথ্যসূত্রসমূহ}{%
    \item[{[১]}] নীলা দাস. একটি গণনার সমস্যা.
      \emph{গণিতচর্চা}, 8(2):12--34, 2024.
    \item[{[২]}] আরিফ রহমান এবং মায়া সেন. \emph{গণনার প্রথম পাঠ}.
      নমুনা প্রকাশনী, ২য় সংস্করণ, ২০২৩.}}
\newcommand{\manualnatbibassamese}{%
  \manualnatbibpreview{ৰহমান আৰু সেন [২]; [১, ২].}{প্ৰসংগ}{%
    \item[{[১]}] নীলা দাস. এটা গণনাৰ সমস্যা.
      \emph{গণিতচৰ্চা}, 8(2):12--34, 2024.
    \item[{[২]}] আৰিফ ৰহমান আৰু মায়া সেন. \emph{গণনাৰ প্ৰথম পাঠ}.
      নমুনা প্ৰকাশনী, ২য় সংস্কৰণ, ২০২৩.}}
\newcommand{\manualnatbibpair}[1]{%
  \begin{tcbraster}[raster columns=2,raster column skip=3mm,
    raster equal height=rows,raster valign=top]
  \begin{tcolorbox}[manualbox,title={\manualcodetitle: \texttt{references.bib}}]
    \inputminted[fontsize=\footnotesize]{bibtex}{\jobname-natbib-#1.bib}
  \end{tcolorbox}
  \begin{tcolorbox}[manualbox,title=\manualresulttitle,colback=ResultPaper]
    \csname manualnatbib#1\endcsname
  \end{tcolorbox}
  \end{tcbraster}}

\begin{document}
% The guide's navigation and tables use English labels in this half. Keep the language
% package's names to restore them for the translated guide below.
\NewCommandCopy\manualbanglasectionautorefname\sectionautorefname
\renewcommand{\sectionautorefname}{section}
\NewCommandCopy\manualbanglatablename\tablename
\NewCommandCopy\manualbanglatableautorefname\tableautorefname
\renewcommand{\thetable}{\number\value{table}}
\renewcommand{\tablename}{Table}
\renewcommand{\tableautorefname}{Table}
\hypertarget{guide-english}{}
\phantomsection\label{manual:english}
\pdfbookmark[0]{English user guide}{manual-english}
\thispagestyle{empty}
\begin{center}
\includegraphics[width=0.66\linewidth]{logo.png}\\[2pt]
{\Large\sffamily\color{BanglaGreen}Writing Bangla \& Assamese with ordinary \LaTeX}\\[5pt]
{Adib Hasan}\\[2pt]
{\small\href{https://groups.google.com/g/latexbangla}{\texttt{latexbangla@googlegroups.com}}}\\[3pt]
{24 October 2026\quad\textcolor{BanglaRed}{\textbullet}\quad Version 2.1}
\end{center}

Follow this guide in \hyperref[manual:bangla]{বাংলা} or
\hyperref[manual:assamese]{অসমীয়া}.

\LaTeX{}bangla is a package for writing Bangla or Assamese documents with
ordinary \LaTeX\ commands. You can write either language alongside English,
make text bold with \verb|\textbf|, and create lists, equations and references
as usual. The package selects the appropriate font for each script while
leaving your document layout, English fonts and mathematics fonts to you.

\LaTeX{}bangla also takes care of the surrounding document. Dates and reference
names automatically get translated, lists use labels such as ১ and (ক), and numeric
citations use native digits. The package is built on fontspec and Polyglossia,
supports \hologo{XeLaTeX} and \hologo{LuaLaTeX}, and is free software under the LPPL version 1.3c or later.

Try the \href{https://www.overleaf.com/project/6adbaac1d48d9344680c2fe1/share\#6b9d2d41b2de0b80c2de0d11c68ce7c79f33cbe1edef7ec7}{Overleaf demo} to get started.
For a book in Bangla or Assamese, try the companion
\href{https://github.com/Neehan/BOOKbangla}{BOOKbangla document class}.

\section{Quickstart}
Compile with \textbf{\hologo{XeLaTeX} or \hologo{LuaLaTeX}} using an updated \TeX{} Live 2024 or later.
Install a Bangla font from the list in \autoref{sec:fonts}. Add this preamble:
\begin{tcolorbox}[manualbox,title=Minimal document]
\begin{code}
\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Adventor} % Optional; English font is preserved.
\usepackage{latexbangla}
\setbanglamainfont{Kalpurush}
\begin{document}
  % Write your document here.
\end{document}
\end{code}
\end{tcolorbox}
Put the following between \verb|\begin{document}| and \verb|\end{document}|.
Notice how the English keeps Adventor's geometric sans serif shapes, even inside
bold and italic text. Each Code/Result pair executes the source printed beside it.
\begingroup
\let\rmfamilylatin\manualexampleenglishfont
% Reselect after replacing the companion so both engines capture this local setup.
\bengalifont
\begin{examplepair}
বাংলা and English একই অনুচ্ছেদে।

English keeps its own typeface.

\textbf{গুরুত্বপূর্ণ: read this.}
\textit{বাংলা ও English একসঙ্গে।}
\end{examplepair}
\endgroup

\subsection{The same paragraph with fontspec alone}
For occasional Bangla in an English document, fontspec alone is often enough.
Here is a complete document that reproduces the paragraph above. Declare a
Bangla font, give Kalpurush its synthetic styles, and mark each Bangla passage
with that font. English continues to use Adventor outside those groups.
Under \hologo{LuaLaTeX}, also enable HarfBuzz for Bangla shaping:
\begin{tcolorbox}[manualbox,title=Without \LaTeX{}bangla]
\begin{code}
\documentclass{article}
\usepackage{fontspec,iftex}
\setmainfont{TeX Gyre Adventor}
\ifluatex\defaultfontfeatures{Renderer=HarfBuzz}\fi
\newfontfamily\banglatext[
  Script=Bengali,
  AutoFakeBold=4,
  AutoFakeSlant=0.2
]{Kalpurush}
\begin{document}
{\banglatext বাংলা} and English
{\banglatext একই অনুচ্ছেদে।}

English keeps its own typeface.

\textbf{{\banglatext গুরুত্বপূর্ণ:} read this.}
\textit{{\banglatext বাংলা ও} English
  {\banglatext একসঙ্গে।}}
\end{document}
\end{code}
\end{tcolorbox}
\LaTeX{}bangla supplies these font switches and style defaults, so you can write
the mixed paragraph directly. The example above matches the text's appearance;
the Bangla numbering and translated document labels described later in this
guide are additional parts of \LaTeX{}bangla's language support.

\textbf{Install locally.} Copy the contents of
\href{https://github.com/Neehan/LaTeXbangla/tree/master/latexbangla}{the repository's \pkg{latexbangla/} folder}
beside your main document, keeping the subfolders intact.

\section{Choose fonts and text styles}\label{sec:fonts}
\subsection{Supported Bangla fonts}
Use the font's name in \verb|\setbanglamainfont{...}|. The families below have
been tested with both Bangla and Assamese; compare their samples in the font
guide in \href{https://github.com/Neehan/LaTeXbangla}{the repository}.
Other fonts may work too, but have not been tested.
\begin{table}[H]
\centering\small
\caption{Default settings for supported Bangla fonts.}\label{tab:font-defaults}
\begin{tabularx}{\linewidth}{@{}lXXrr@{}}
\toprule
\textbf{Font name} & \textbf{Default bold} & \textbf{Default italic} & \textbf{Scale} & \textbf{WordSpace} \\
\midrule
\texttt{Kalpurush} & Synthetic 4 & Synthetic 0.2 & 1 & 1 \\
\texttt{SolaimanLipi} & Synthetic 4 & Synthetic 0.2 & 0.9 & 1.33 \\
\texttt{Siyam Rupali} & Synthetic 4.5 & Synthetic 0.2 & 0.8 & 1.12 \\
\texttt{Noto Serif Bengali} & Real face & Synthetic 0.2 & 1 & 1.3 \\
\texttt{Noto Sans Bengali} & Real face & Synthetic 0.2 & 1 & 1.2 \\
\texttt{Anek Bangla} & Synthetic 4 & Synthetic 0.2 & 0.9 & 2.1 \\
\texttt{Tiro Bangla} & Synthetic 3.5 & Real face & 0.9 & 1.39 \\
\texttt{Galada} & Synthetic 3.5 & Synthetic 0.2 & 0.9 & 1.67 \\
\texttt{Hind Siliguri} & Real face & Synthetic 0.2 & 0.9 & 1.64 \\
\texttt{Nikosh} & Synthetic 3.5 & Synthetic 0.2 & 1 & 1.37 \\
\texttt{Kohinoor Bangla} & Real face & Synthetic 0.2 & 0.9 & 1.29 \\
\texttt{Mukti} & Real face & Real face & 0.9 & 1.33 \\
\texttt{Baloo Da 2} & Real face & Synthetic 0.2 & 0.9 & 1.86 \\
\texttt{Lohit Bengali} & Synthetic 5.5 & Synthetic 0.2 & 0.9 & 1.33 \\
\texttt{Jamrul} & Synthetic 2.5 & Synthetic 0.2 & 0.9 & 0.43 \\
\texttt{Likhan} & Synthetic 3.5 & Synthetic 0.2 & 0.9 & 0.97 \\
\texttt{Shimanto} & Synthetic 3.5 & Synthetic 0.2 & 1 & 1.11 \\
\texttt{Mina} & Real face & Synthetic 0.2 & 0.9 & 1.03 \\
\texttt{AdorshoLipi} & Synthetic 4 & Synthetic 0.2 & 0.8 & 1.17 \\
\texttt{BenSen} & Synthetic 4 & Synthetic 0.2 & 1.1 & 1.32 \\
\texttt{BenSenHandwriting} & Synthetic 3.5 & Synthetic 0.2 & 1 & 1.32 \\
\texttt{Atma} & Real face & Synthetic 0.2 & 1 & 1.79 \\
\texttt{Alkatra} & Synthetic 4.5 & Synthetic 0.2 & 0.9 & 1.36 \\
\texttt{Shonar Bangla} & Real face & Synthetic 0.2 & 1.1 & 1.47 \\
\texttt{FreeSerif} & Synthetic 3.5 & Real face & 1 & 1.33 \\
\bottomrule
\end{tabularx}
\end{table}

\begin{tcolorbox}[manualwarning]
If Anek Bangla fails to load by name, save its TTF as \texttt{AnekBangla-VF.ttf}
beside your document and use \verb|\setbanglamainfont{AnekBangla-VF.ttf}|. For Mukti, use version 3;
for Baloo Da 2, install the static font files.
For Alkatra, save the TTF as \texttt{Alkatra-VF.ttf} and load it by filename too.
Jamrul 0.1 and Likhan 0.6 lack the standalone letter ৎ (U+09CE).
With Shimanto 1.0, \hologo{XeLaTeX} reports missing glyphs for explicit ZWJ/ZWNJ controls.
\end{tcolorbox}

\subsection{Writing Assamese}
For an Assamese document, select \texttt{language=assamese}. The font commands
stay the same: they configure the selected language's main, sans and mono fonts.
Bangla is the default, so existing documents need no changes.
\begin{code}
\usepackage[language=assamese]{latexbangla}
\setbanglamainfont{Noto Serif Bengali}
\end{code}
Captions, dates and reference names become Assamese. Decimal counters use the
same digits, while alphabetic labels use the Assamese sequence, including ৰ
and ৱ. Numbering options for both languages are explained in
\autoref{sec:numbering}.

See the \href{https://github.com/Neehan/LaTeXbangla/blob/master/examples/assamese.pdf}
{Assamese example} for a complete document and its translated labels.
The rest of this guide uses Bangla examples; the same commands apply to Assamese.

\subsection{Separate Bangla and English families}
Give body text, headings and typewriter text their own appearance while keeping
Bangla and English together. Here we pair Kalpurush with Pagella for the main
text, Noto Sans Bengali with Heros for sans serif, and Siyam Rupali with Cursor
for the mono role. Put these choices in the preamble, before \verb|\begin{document}|:
\begin{tcolorbox}[manualbox,title=Optional font choices]
\begin{code}
\setbanglamainfont{Kalpurush}
\setbanglasansfont{Noto Sans Bengali}
\setbanglamonofont{Siyam Rupali}
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}
\end{code}
\end{tcolorbox}
Now use \verb|\textrm|, \verb|\textsf| and \verb|\texttt| as usual. Each
selects the matching pair of fonts, including their bold and italic styles:
\begingroup
\let\bengalifontsf\manualsansfont
\let\bengalifonttt\manualmonofont
\begin{examplepair}
বাংলা ও English।\\
\textbf{গাঢ় ও bold।}\\
\textit{তির্যক ও italic।}

\textsf{বাংলা ও English।}\\
\textsf{\textbf{গাঢ় ও bold।}}\\
\textsf{\textit{তির্যক ও italic।}}

\texttt{বাংলা ও English।}\\
\texttt{\textbf{গাঢ় ও bold।}}\\
\texttt{\textit{তির্যক ও italic।}}
\end{examplepair}
\endgroup
The same text takes on three different appearances without marking individual
Bangla or English passages. Siyam Rupali keeps its natural character widths;
assigning it to the mono role does not make it a fixed-width font.

These choices are optional: one Bangla main font can fill all three roles, and
your English fonts stay as they are until you change them. Bangla and English
setters can appear in either order; each replaces its own role.

\subsection{A different English font for one passage}
A quotation or a short aside can have its own English font. Put
\verb|\fontspec{...}| inside braces to change just that passage: Bangla keeps
its chosen font, and closing the group restores the previous English font.
\begin{examplepair}
This is the main font.
বাংলা নিজের ফন্টে থাকে।

{\fontspec{TeX Gyre Adventor}
This passage has its own voice.
বাংলা নিজের ফন্টে থাকে।
\textit{Emphasis works too.}\par}

The main font returns.
বাংলা নিজের ফন্টে থাকে।
\end{examplepair}
To reuse the choice, define a command in the preamble:
\begin{code}
\newfontfamily\quotefont{TeX Gyre Adventor}
\end{code}
Then use \verb|{\quotefont ...}| in the document.

Automatic font switching does not change the text's language or hyphenation
rules. For an English passage with English hyphenation, declare
\verb|\setotherlanguage{english}| in the preamble and use \verb|\textenglish{...}|.

\subsection{Customize font features}
To match another typeface's size, adjust word spacing or use a font file from
your project, pass fontspec options to any Bangla setter. The options can go
before or after the font name:
\begin{code}
\setbanglamainfont[features]{font}
\setbanglamainfont{font}[features]
\end{code}
The defaults include \pkg{Script=Bengali} and, under \hologo{LuaLaTeX},
\pkg{Renderer=HarfBuzz}.
Your choices override the defaults. For example, adjust size and spacing or load a file:
\begin{code}
\setbanglamainfont[Scale=1.05,WordSpace=1.1]{Kalpurush}
\setbanglamainfont[Path=fonts/]{fontkalpurush.ttf}
\end{code}
Here \pkg{WordSpace=1.1} adds 10\% to the font's native word spacing,
replacing the preset in \autoref{tab:font-defaults}.
Unlisted fonts keep their native scale and spacing.
Other shapes, including small caps, depend on the font.
Presets recognize family names and standard filenames; renamed files use
generic defaults. To choose faces from separate
files, use \pkg{UprightFont}, \pkg{BoldFont}, \pkg{ItalicFont} and \pkg{BoldItalicFont}.

\section{Control boldness and emphasis}
Use \verb|\textbf| to draw attention to a definition and \verb|\textit| for
emphasis. \LaTeX{}bangla uses real bold and italic faces when they contain the
selected language's glyphs; otherwise it adds weight or slant to create the
missing style. \autoref{tab:font-defaults} lists the tested defaults. For
unlisted fonts, synthetic bold uses 2.5 and synthetic italic uses 0.2.

For stronger synthetic bold, increase \pkg{AutoFakeBold}.
Include \pkg{AutoFakeSlant} to carry that weight into bold italic too.
Here is how the four styles look with a bold strength of 5:
\begin{tcolorbox}[manualbox,title=Custom synthetic styles (preamble)]
\begin{code}
\setbanglamainfont[
  AutoFakeBold=5,
  AutoFakeSlant=0.2
]{Kalpurush}
\end{code}
\end{tcolorbox}
% This preview uses precisely the preamble settings printed above.
\begingroup
\let\bengalifont\manualstrongfont
\bengalifont
\begin{examplepair}
সাধারণ লেখা।

\textbf{গাঢ় লেখা।}

\textit{তির্যক লেখা।}

\textbf{\textit{গাঢ় ও তির্যক।}}
\end{examplepair}
\endgroup
Explicit \pkg{AutoFakeBold} requests synthetic bold even if a real bold face
exists. Use it with a numeric value: fontspec's bare \pkg{AutoFakeBold} means
1.5, rather than \LaTeX{}bangla's font-specific default.

You can also adjust bold and bold italic separately through fontspec's face features:
\begin{code}
\setbanglamainfont[
  BoldFeatures={FakeBold=5},
  BoldItalicFeatures={FakeBold=5,FakeSlant=0.2}
]{Kalpurush}
\end{code}
These options are especially useful with a family that needs synthetic faces.
Keep the ordinary setter when you prefer the tested defaults and real-face
discovery.

\subsection{Punctuation, bullets and footnotes}
Punctuation and footnotes fit into mixed text in the usual way. Typed dashes, curly
quotes and ellipses come from the English family, which also supplies standard
bullets and symbolic footnote marks missing from the Bangla font. Ordinary
footnotes use Bangla numbers; Roman or symbolic formats keep their structure.
\begin{examplepair}
“বাংলা”—English… আবার বাংলা।
\begin{itemize}
  \item একটি কথা।
  \item আরেকটি কথা।
\end{itemize}
একটি তথ্য\footnote{ছোট ব্যাখ্যা।}
\end{examplepair}

\section{Numbers, lists and custom counters}\label{sec:numbering}
Write an exercise with subparts using ordinary nested lists. \LaTeX{}bangla supplies
the Bangla labels, so the same list commands work throughout your document.

\pkg{changecounternumbering=true} is the default: decimal counters become
native digits, and \verb|\alph| and \verb|\Alph| use the selected language's letters. Values, reset
rules and compound labels keep their structure; Roman and symbolic formats stay
as chosen. This English part keeps section, subsection and page numbers
Western; its examples use the default Bangla numbering. The four standard
\pkg{enumerate} levels become ১., (ক), i. and ক.; appendices use labels such
as পরিশিষ্ট ক.
\begin{examplepair}
\begin{enumerate}
  \item একটি আয়তক্ষেত্রের দৈর্ঘ্য ৪,
    প্রস্থ ৩ একক।
  \begin{enumerate}
    \item ক্ষেত্রফল কত?
    \item কর্ণের দৈর্ঘ্য কত?
  \end{enumerate}
\end{enumerate}
\end{examplepair}

\subsection{Custom counters need no registration}
For numbered exercises, create a counter as usual. Use \verb|\refstepcounter|
to increment it and allow \verb|\label| and \verb|\ref|;
\verb|\stepcounter| increments it without setting up a reference.
\begin{examplepair}
\newcounter{exercise}
\setcounter{exercise}{11}
\refstepcounter{exercise}
\label{ex:custom}
অনুশীলনী \theexercise।\par
\renewcommand{\theexercise}
  {\alph{exercise}}
\setcounter{exercise}{2}
অনুশীলনী \theexercise।
\end{examplepair}
Here, \texttt{[section]} resets the counter at each section;
\verb|\theproblem| adds the section to its printed number:
\begin{code}
\newcounter{problem}[section]
\renewcommand{\theproblem}{\thesection.\arabic{problem}}
\end{code}
A formatter that bypasses \verb|\arabic|, \verb|\alph| and \verb|\Alph|
keeps its own output.

\subsection{Keep selected counters in English}
You can keep Bangla numbering throughout the document and make an exception
for one counter. Its references follow the same format:
\begin{examplepair}
\renewcommand{\theexercise}
  {\number\value{exercise}}
\refstepcounter{exercise}
\label{ex:western}
Exercise \theexercise.\par
See Exercise~\ref{ex:western}.
\end{examplepair}
For Latin letters, load \verb|\usepackage{alphalph}| in the preamble.
Its \verb|\alphalph| formatter gives a, b, \ldots, z, aa, \ldots;
\verb|\AlphAlph| gives uppercase letters. Here the change applies to just
one list, because the definition is inside the environment:
\begin{examplepair}
\begin{enumerate}
  \renewcommand{\theenumi}
    {\alphalph{\value{enumi}}}
  \item First.\label{item:latin}
  \item Second.
\end{enumerate}
See item~\ref{item:latin}.
\end{examplepair}
For 1, 2, \ldots\ in that list, use \verb|\number\value{enumi}| instead.
For a custom counter, put \verb|\alphalph{\value{exercise}}| in
\verb|\theexercise|. Later lists keep their Bangla labels. These changes
affect the numbers; translated names supplied by \verb|\autoref| stay unchanged.

\subsection{Extended alphabetic labels}
Both languages' alphabetic labels run from ক to য়, with 35 entries for Bangla
and 37 for Assamese. Zero produces no label; negative values or values beyond
the alphabet give \texttt{Counter too large}, just as in standard \LaTeX.

For longer lists, \pkg{alphalph} can continue with কক, কখ and so on.
With counter conversion enabled, add this to your preamble after loading \LaTeX{}bangla:
\begin{code}
\usepackage{alphalph}
\makeatletter
\newalphalph{\extendedBangla}{\@alph}{35}
\makeatother
\end{code}
The last argument gives the alphabet size; use 37 for Assamese.
Assign the new formatter to the
counter you want to extend; other counters keep their usual behavior:
\begin{examplepair}
\newcounter{extendedexercise}
\renewcommand{\theextendedexercise}
  {\extendedBangla{
    \value{extendedexercise}}}
\setcounter{extendedexercise}{35}
\theextendedexercise,
\stepcounter{extendedexercise}
\theextendedexercise,
\stepcounter{extendedexercise}
\theextendedexercise
\end{examplepair}
The custom \verb|\extendedBangla| formatter uses the selected language's
alphabet; the built-in \verb|\alphalph| and \verb|\AlphAlph| retain Latin letters.

\subsection{Choose automatic or explicit conversion}
\verb|\usepackage[changecounternumbering=false]{latexbangla}| preserves the
existing counter and numeric citation formats while retaining fonts and
translations. This is a package option; language switches do not toggle it.
For a code with leading zeroes, or a Bangla counter value even when automatic
conversion is off, use:
\begin{examplepair}
\numtobangla{0012}; \tobangla{exercise}
\end{examplepair}
Both helpers are expandable. \verb|\numtobangla| takes Western digits only and preserves leading zeroes;
signs and decimal points are not accepted. \verb|\tobangla| prints a counter's
integer value, including zero and negative values. To use it for one counter,
define \verb|\renewcommand{\theexercise}{\tobangla{exercise}}|.

\section{Mathematics, tables and theorems}
In a Bangla lesson, you can explain a formula in Bangla, keep familiar symbols
such as $x$ and $v$, and write numbers in either script.
Write numbers in the script you want to see: \texttt{12} stays 12 and
\texttt{১২} stays ১২, in text and in math. Automatic numbering leaves your
formulas alone. In math, Bangla digits come from your main Bangla font, sized to fit
their position in the formula; the other symbols use your mathematics font.

With \pkg{amsmath}, use \verb|\text| to name quantities and units in Bangla.
For a 12-metre journey taking 3 seconds, write:
\begin{examplepair}
\begin{equation}\label{eq:speed}
  \text{বেগ}=
  \frac{১২}{৩}=৪\text{ মি./সে.}
\end{equation}
\[
  x_৩^{২}+\sqrt{৪}=12+১২
\]
\end{examplepair}
The equation number is Bangla too, ready to cite with \verb|\eqref| later.
You can use the same Bengali digits in fractions, roots, matrices and nested scripts.
One-digit arguments can be unbraced, as in \verb|x^২|; use braces for several
digits. Use \verb|\boldmath| for bold mathematics: surrounding \verb|\textbf|
alone does not change math weight. Commands for special math alphabets, such as
\verb|\mathbb|, do not select alternate Bengali digit designs.
Bold versions of the other symbols depend on your mathematics font setup.

\subsection{Choose the mathematics font independently}
To give your formulas a different appearance, choose a font with \pkg{unicode-math}:
\begin{code}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\end{code}
For traditional mathematics, load \pkg{amsmath,newtxmath} \emph{before}
\pkg{latexbangla}. The language package leaves math-font selection to you.

\subsection{Tables and author-defined environments}
Put Bangla descriptions beside English terms and measurements in an ordinary
table. Each cell uses the appropriate font automatically:
\begin{examplepair}
\begin{tabular}{llc}
বাহু & Side & দৈর্ঘ্য \\
\hline
প্রথম & First & ৩ \\
দ্বিতীয় & Second & ৪
\end{tabular}
\end{examplepair}
When using \pkg{siunitx} to format and align numbers, supply Western digits as
input; use a text column when you want to type Bangla digits directly.
Define theorems with \pkg{amsthm}, for example
\verb|\newtheorem{theorem}{উপপাদ্য}| in the preamble. Polyglossia supplies the
Bangla proof heading; your class or theorem style controls the design.
\begin{examplepair}
\begin{theorem}
\label{thm:pythagoras}
সমকোণী ত্রিভুজের লম্ব দুই বাহুর
দৈর্ঘ্য ৩ ও ৪ হলে অতিভুজের দৈর্ঘ্য ৫।
\end{theorem}
\begin{proof}
$৩^{২}+৪^{২}=৫^{২}$।
\end{proof}
\end{examplepair}

\section{Labels, references and citations}
Refer to an equation, theorem or exercise by its label, and the printed number follows
any later changes to the document. Here the ordinary reference commands point
back to the examples you have just seen.
Your class's chapter, figure, table, contents, appendix and bibliography names,
along with dates, follow your selected language. Bangla translations come from
Polyglossia; \LaTeX{}bangla supplies Assamese translations. With \pkg{hyperref},
automatic references use translated names too.
Compile again after adding labels
or citations so their references can be resolved.
\begin{examplepair}
\autoref{eq:speed};
\eqref{eq:speed}।

\autoref{thm:pythagoras}।
অনুশীলনী \ref{ex:custom}।
\end{examplepair}
\verb|\ref| prints the label, \verb|\eqref| adds parentheses, and
\verb|\autoref| includes the translated name. Names include পরিচ্ছেদ,
উপপরিচ্ছেদ, সমীকরণ and পাদটীকা.

Existing custom reference names are preserved. Theorem environments that share
a counter also share hyperref's usual reference-type rules.

\subsection{Keep labels in English}
To keep selected labels in English while writing Bangla, use standard
Polyglossia caption customizations and hyperref reference names after loading
the packages. For Western counter numbers
as well, load \LaTeX{}bangla with \pkg{changecounternumbering=false}:
\begin{code}
\gappto\captionsbengali{%
  \renewcommand{\chaptername}{Chapter}%
  \renewcommand{\tablename}{Table}%
}
\renewcommand{\sectionautorefname}{Section}
\renewcommand{\tableautorefname}{Table}
\end{code}
For Assamese, use \verb|\captionsassamese| instead.

\subsection{Bibliographies and citations}
\LaTeX{}bangla supports both \pkg{biblatex} and \pkg{natbib}. Use either
with a \pkg{.bib} file containing your sources.

\textbf{With biblatex.} Load \LaTeX{}bangla first, then choose your bibliography style:
\begin{code}
\usepackage{latexbangla}
\setbanglamainfont{Kalpurush}
\usepackage[backend=biber,style=numeric-comp,sorting=none,date=long]{biblatex}
\addbibresource{references.bib}
\usepackage{hyperref}
\end{code}
Save these sample entries as \pkg{references.bib}, then put
\verb|\cite{book,article}| and \verb|\printbibliography| in your document:
\manualbibliographypair{bangla}{তথ্যসূত্রসমূহ}
Run your chosen \LaTeX{} engine, Biber, then the same engine twice. Names and titles
stay as entered; connecting words and month names follow the bibliography language.
Numbers retain their input script: \texttt{2024} stays 2024, and \texttt{২০২৩}
stays ২০২৩. Attached suffixes follow suit: \texttt{4th}/\texttt{৪র্থ} and
\texttt{2024a}/\texttt{২০২৩ক}. URLs and DOIs stay unchanged.

For English wording, declare \verb|\setotherlanguage{english}| in the
preamble and add \pkg{language=english} and \pkg{autolang=other} to the biblatex options.

\textbf{With natbib.} Use \verb|\citet| for textual citations and \verb|\citep|
for parenthetical citations. For translated bibliography terms:
\begin{code}
\usepackage[numbers,sort&compress]{natbib} % Or [authoryear].
\bibliographystyle{plainnatbn}
% In the document:
\citet{book}; \citep{book,article}.
\bibliography{references}
\end{code}
\manualnatbibpair{bangla}
Use standard \hologo{BibTeX} fields such as \pkg{year} and \pkg{journal}; run
\hologo{BibTeX} instead of Biber. These styles follow the current language;
use an \pkg{english} environment for English output after declaring
\verb|\setotherlanguage{english}|.

\begin{tcolorbox}[manualwarning]
The standard \pkg{plainnat}, \pkg{abbrvnat} and \pkg{unsrtnat} styles keep their
English wording. For translations, use \pkg{plainnatbn}, \pkg{abbrvnatbn} and
\pkg{unsrtnatbn}, respectively, as drop-in replacements.
\pkg{abbrvnatbn} keeps non-ASCII given names, including Bangla and Assamese, in full to avoid broken initials.
\end{tcolorbox}

\subsection{Using other packages}
Build on the packages you already use: \pkg{mathtools} and \pkg{bm} for
mathematics, or \pkg{booktabs}, \pkg{tabularx}, \pkg{longtable} and \pkg{multirow}
for tables. You can style captions with \pkg{caption} and \pkg{subcaption},
headers with \pkg{fancyhdr}, headings with \pkg{titlesec}, and boxed material
with \pkg{tcolorbox}. These combinations are tested; each package keeps control
of its own layout and styles.

\Needspace{14\baselineskip}
If \pkg{amsthm} theorem headings trigger an ``invalid node'' error under
\hologo{LuaLaTeX}, add this after loading \pkg{amsthm} to disable hyphenation only
in the headings (BOOKbangla already applies this workaround):
\begin{code}
\usepackage{iftex,xpatch}
\makeatletter
\ifLuaTeX
  \xpatchcmd{\deferred@thm@head}{\normalfont#1}
    {\normalfont\language=\l@nohyphenation #1}{}
    {\PackageError{amsthm}{Heading patch failed}{}}
\fi
\makeatother
\end{code}

With \pkg{cleveref}, reference names and connecting words follow the selected
language automatically. Load it after \pkg{amsmath}, \pkg{amsthm} and
\pkg{hyperref} if you use them.

Load \pkg{microtype} normally to use its available typography features
with mixed Bangla and English fonts.

\section{Updating an older document}
You can keep using \pkg{banglamainfont} and \pkg{banglattfont} in existing
documents. For new documents, use the font commands shown in this guide.
The table shows the equivalent settings.
\begin{center}
\begin{tabularx}{\linewidth}{@{}lX@{}}
\toprule
\textbf{Older setting} & \textbf{Current interface} \\
\midrule
\pkg{banglamainfont=Kalpurush} & \texttt{\detokenize{\setbanglamainfont{Kalpurush}}} \\
\pkg{banglattfont=FreeSerif} & \texttt{\detokenize{\setbanglamonofont{FreeSerif}}} \\
\pkg{changecounternumbering=1} & \pkg{changecounternumbering=true} (default) \\
\pkg{changecounternumbering=0} & \pkg{changecounternumbering=false} \\
\bottomrule
\end{tabularx}
\end{center}
A later font setter overrides its corresponding package option. The numbering
option remains current; both its Boolean and numeric spellings are accepted.
The old \pkg{SiyamRupali} font spelling is accepted as \pkg{Siyam Rupali}.

If your document uses \pkg{feature=0/1/2}, remove that option: language support
is now available without choosing a feature tier. Load the AMS, reference and
bibliography packages you need, and define your theorem or solution environments.
Margins, line spacing, heading
punctuation, theorem styles and equation reset rules belong to your document
class or style.

The old \pkg{latin} wrapper is replaced by automatic Bangla/English font
switching. Use Polyglossia's language commands when you want an actual language
change. Current Polyglossia supplies the corrected digit converter, so the old
numbering workaround is no longer needed.

\section*{Quick reference}
\phantomsection
\addcontentsline{toc}{section}{Quick reference}
\begin{center}
\begin{tabularx}{\linewidth}{@{}lX@{}}
\toprule
\textbf{Task} & \textbf{Command or setting} \\
\midrule
Choose the document language & \pkg{language=bangla} (default) or \pkg{language=assamese} \\
Choose the Bangla main font & \texttt{\detokenize{\setbanglamainfont[features]{font}}} \\
Choose optional Bangla roles & \texttt{\detokenize{\setbanglasansfont}}, \texttt{\detokenize{\setbanglamonofont}} \\
Choose English families & \texttt{\detokenize{\setmainfont}}, \texttt{\detokenize{\setsansfont}}, \texttt{\detokenize{\setmonofont}} \\
Keep existing counter formats & \pkg{changecounternumbering=false} \\
Print a counter in Bangla & \texttt{\detokenize{\tobangla{counter}}} \\
Convert a string of digits & \texttt{\detokenize{\numtobangla{0012}}} \\
Put Bangla words in math & \texttt{\detokenize{\text{বাংলা}}} \\
Alphabetic counter format & \texttt{\detokenize{\alph{counter}}} or \texttt{\detokenize{\Alph{counter}}} \\
\bottomrule
\end{tabularx}
\end{center}

\subsection{Examples and help}
To see the features together, try the Bangla and Assamese examples and the font guide in
\href{https://github.com/Neehan/LaTeXbangla}{the repository},
all supplied with sources and PDFs. Tested classes include article, report, book and memoir.
If something does not work as expected, send a small document, your font names
and the compiler name and log; \texttt{\detokenize{\listfiles}} records package versions.

You can reach us through
\href{https://github.com/Neehan/LaTeXbangla/issues}{GitHub Issues} or
\href{https://groups.google.com/g/latexbangla}{\texttt{latexbangla@googlegroups.com}}.

\smallskip
{\small Copyright 2016, 2026 Adib Hasan. Distributed under the
\href{https://www.latex-project.org/lppl.txt}{\LaTeX{} Project Public License 1.3c or later}.
This manual uses Kalpurush for Bangla and TeX Gyre Pagella for English prose;
the opening example uses TeX Gyre Adventor. The family comparison also uses
Noto Sans Bengali and Siyam Rupali.}

\clearpage
% The translated guide uses the normal Bangla counter formatters. Restart its
% section and demonstration counters, but keep page numbers continuous. Give
% restarted counters distinct PDF anchors so links cannot jump to English pages.
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thepage}{\arabic{page}}
\renewcommand{\thetable}{\arabic{table}}
\RenewCommandCopy\sectionautorefname\manualbanglasectionautorefname
\RenewCommandCopy\tablename\manualbanglatablename
\RenewCommandCopy\tableautorefname\manualbanglatableautorefname
\renewcommand{\theHsection}{bangla.\number\value{section}}
\renewcommand{\theHtable}{bangla.\number\value{table}}
\renewcommand{\theHequation}{bangla.\number\value{equation}}
\renewcommand{\theHtheorem}{bangla.\number\value{theorem}}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{theorem}{0}
\setcounter{table}{0}
\renewcommand{\manualcodetitle}{কোড}
\renewcommand{\manualresulttitle}{ফলাফল}
\fancyhead[R]{\small\sffamily\color{BanglaInk}সংস্করণ ২.১\quad ব্যবহার নির্দেশিকা}
\hypertarget{guide-bangla}{}
\phantomsection\label{manual:bangla}
\addcontentsline{toc}{part}{বাংলা ব্যবহার নির্দেশিকা}
\thispagestyle{empty}
\begin{center}
\includegraphics[width=0.66\linewidth]{logo.png}\\[2pt]
{\Large\sffamily\color{BanglaGreen}চেনা \LaTeX-এর কমান্ডেই বাংলা ও অসমীয়া লেখা}\\[5pt]
{আদীব হাসান}\\[2pt]
{\small\href{https://groups.google.com/g/latexbangla}{\texttt{latexbangla@googlegroups.com}}}\\[3pt]
{২৪ অক্টোবর ২০২৬\quad\textcolor{BanglaRed}{\textbullet}\quad সংস্করণ ২.১}
\end{center}

\LaTeX{}bangla হলো পরিচিত \LaTeX-এর কমান্ড দিয়ে বাংলা বা অসমীয়া ডকুমেন্ট লেখার
একটি প্যাকেজ। বাংলা বা অসমীয়ার পাশাপাশি ইংরেজি লিখতে, \verb|\textbf| দিয়ে
লেখা গাঢ় করতে, আর তালিকা, সমীকরণ ও রেফারেন্স তৈরি করতে পারবেন আগের মতোই।
প্রতিটি লিপির জন্য উপযুক্ত ফন্ট প্যাকেজ নিজেই বেছে নেয়। পৃষ্ঠার বিন্যাস,
ইংরেজি ফন্ট ও গণিতের ফন্ট নিজের পছন্দমতো রাখতে পারেন।

\LaTeX{}bangla ডকুমেন্টের অন্য অংশগুলোও বেছে নেওয়া ভাষায় সাজায়। তারিখ ও
রেফারেন্সের নাম স্বয়ংক্রিয়ভাবে অনূদিত হয়।
তালিকায় ১ ও (ক)-এর মতো লেবেল আসে, আর তথ্যসূত্রের সংখ্যাভিত্তিক উল্লেখে বাংলা অঙ্ক ব্যবহৃত হয়।
fontspec ও Polyglossia-এর ওপর ভিত্তি করে তৈরি প্যাকেজটি \hologo{XeLaTeX} ও \hologo{LuaLaTeX}-এ
ব্যবহার করা যায়; এটি LPPL 1.3c বা পরবর্তী সংস্করণে প্রকাশিত মুক্ত সফটওয়্যার।

শুরু করতে \href{https://www.overleaf.com/project/6adbaac1d48d9344680c2fe1/share\#6b9d2d41b2de0b80c2de0d11c68ce7c79f33cbe1edef7ec7}{Overleaf ডেমোটি} ব্যবহার করতে পারেন।
বাংলা বা অসমীয়ায় বই লিখতে সহযোগী
\href{https://github.com/Neehan/BOOKbangla}{BOOKbangla ডকুমেন্ট ক্লাসটি} দেখুন।

\section{দ্রুত আরম্ভ}
হালনাগাদ \TeX{} Live 2024 বা পরবর্তী সংস্করণে \textbf{\hologo{XeLaTeX} অথবা \hologo{LuaLaTeX}}
দিয়ে কম্পাইল করুন।
\autoref{bn:sec:fonts}-এর তালিকা থেকে
একটি বাংলা ফন্ট ইনস্টল করুন। প্রিঅ্যাম্বলে এভাবে ফন্ট বেছে নিন:
\begin{tcolorbox}[manualbox,title=ন্যূনতম ডকুমেন্ট]
\begin{code}
\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Adventor} % ঐচ্ছিক; ইংরেজি ফন্ট অক্ষুণ্ণ থাকে।
\usepackage{latexbangla}
\setbanglamainfont{Kalpurush}
\begin{document}
  % এখানে লিখুন।
\end{document}
\end{code}
\end{tcolorbox}
নিচের কোডটি \verb|\begin{document}| ও \verb|\end{document}|-এর মাঝে বসান।
খেয়াল করুন, গাঢ় ও তির্যক লেখাতেও ইংরেজি Adventor-এর জ্যামিতিক sans serif
চেহারা ধরে রাখে। প্রতিটি কোড ও ফলাফলের জোড়ায় দেখানো কোডটিই চালিয়ে ফলাফল তৈরি করা হয়েছে।
\begingroup
\let\rmfamilylatin\manualexampleenglishfont
% Reselect after replacing the companion so both engines capture this local setup.
\bengalifont
\begin{examplepair}
বাংলা and English একই অনুচ্ছেদে।

English keeps its own typeface.

\textbf{গুরুত্বপূর্ণ: read this.}
\textit{বাংলা ও English একসঙ্গে।}
\end{examplepair}
\endgroup

\subsection{শুধু fontspec দিয়ে একই অনুচ্ছেদ}
ইংরেজি ডকুমেন্টে অল্প কিছু বাংলা লিখতে fontspec-ই অনেক সময় যথেষ্ট।
উপরের অনুচ্ছেদটি একইভাবে দেখাতে নিচের সম্পূর্ণ ডকুমেন্টটি ব্যবহার করতে পারেন।
বাংলার জন্য আলাদা ফন্ট বেছে Kalpurush-এর গাঢ় ও তির্যক রূপের সেটিং দিন,
তারপর প্রতিটি বাংলা অংশ সেই ফন্টের গ্রুপে রাখুন। গ্রুপের বাইরে ইংরেজি Adventor-এই থাকে।
\hologo{LuaLaTeX}-এ বাংলা অক্ষরের যুক্তরূপ ও অবস্থান ঠিক রাখতে HarfBuzz-ও চালু করুন:
\begin{tcolorbox}[manualbox,title=\LaTeX{}bangla ছাড়া]
\begin{code}
\documentclass{article}
\usepackage{fontspec,iftex}
\setmainfont{TeX Gyre Adventor}
\ifluatex\defaultfontfeatures{Renderer=HarfBuzz}\fi
\newfontfamily\banglatext[
  Script=Bengali,
  AutoFakeBold=4,
  AutoFakeSlant=0.2
]{Kalpurush}
\begin{document}
{\banglatext বাংলা} and English
{\banglatext একই অনুচ্ছেদে।}

English keeps its own typeface.

\textbf{{\banglatext গুরুত্বপূর্ণ:} read this.}
\textit{{\banglatext বাংলা ও} English
  {\banglatext একসঙ্গে।}}
\end{document}
\end{code}
\end{tcolorbox}
\LaTeX{}bangla ফন্ট পরিবর্তন ও রূপের এই সেটিংগুলো নিজেই সামলায়, তাই মিশ্র
অনুচ্ছেদটি সরাসরি লিখতে পারেন। উপরের উদাহরণে শুধু লেখার চেহারা মেলানো হয়েছে;
পরের অংশগুলোতে দেখানো বাংলা ক্রমসংখ্যা ও ডকুমেন্টের অনূদিত নামগুলো
\LaTeX{}bangla-এর ভাষা সহায়তার আরও কিছু সুবিধা।

\textbf{নিজের কম্পিউটারে ইনস্টল।}
\href{https://github.com/Neehan/LaTeXbangla/tree/master/latexbangla}{রিপোজিটরির \pkg{latexbangla/} ফোল্ডারের}
সব ফাইল ও সাবফোল্ডার মূল ডকুমেন্টের পাশে কপি করুন; সাবফোল্ডারের গঠন অক্ষুণ্ণ রাখুন।

\section{ফন্ট ও লেখার ধরন বেছে নেওয়া}\label{bn:sec:fonts}
\subsection{পরীক্ষিত বাংলা ফন্ট}
ফন্টের নামটি বসান \verb|\setbanglamainfont{...}|-এ। নিচের ফন্টগুলো বাংলা ও
অসমীয়া দুই ভাষাতেই পরীক্ষা করা হয়েছে। নমুনা তুলনা করতে
\href{https://github.com/Neehan/LaTeXbangla}{রিপোজিটরিতে দেওয়া} ফন্ট নির্দেশিকাটি
দেখতে পারেন। অন্য ফন্টও কাজ করতে পারে, তবে সেগুলো পরীক্ষা করা হয়নি।
\begin{table}[H]
\centering\small
\caption{পরীক্ষিত বাংলা ফন্টের পূর্বনির্ধারিত সেটিং।}\label{bn:tab:font-defaults}
\begin{tabularx}{\linewidth}{@{}lXXrr@{}}
\toprule
\textbf{ফন্টের নাম} & \textbf{পূর্বনির্ধারিত গাঢ়} & \textbf{পূর্বনির্ধারিত তির্যক} & \textbf{Scale} & \textbf{WordSpace} \\
\midrule
\texttt{Kalpurush} & কৃত্রিম ৪ & কৃত্রিম ০.২ & ১ & ১ \\
\texttt{SolaimanLipi} & কৃত্রিম ৪ & কৃত্রিম ০.২ & ০.৯ & ১.৩৩ \\
\texttt{Siyam Rupali} & কৃত্রিম ৪.৫ & কৃত্রিম ০.২ & ০.৮ & ১.১২ \\
\texttt{Noto Serif Bengali} & নিজস্ব রূপ & কৃত্রিম ০.২ & ১ & ১.৩ \\
\texttt{Noto Sans Bengali} & নিজস্ব রূপ & কৃত্রিম ০.২ & ১ & ১.২ \\
\texttt{Anek Bangla} & কৃত্রিম ৪ & কৃত্রিম ০.২ & ০.৯ & ২.১ \\
\texttt{Tiro Bangla} & কৃত্রিম ৩.৫ & নিজস্ব রূপ & ০.৯ & ১.৩৯ \\
\texttt{Galada} & কৃত্রিম ৩.৫ & কৃত্রিম ০.২ & ০.৯ & ১.৬৭ \\
\texttt{Hind Siliguri} & নিজস্ব রূপ & কৃত্রিম ০.২ & ০.৯ & ১.৬৪ \\
\texttt{Nikosh} & কৃত্রিম ৩.৫ & কৃত্রিম ০.২ & ১ & ১.৩৭ \\
\texttt{Kohinoor Bangla} & নিজস্ব রূপ & কৃত্রিম ০.২ & ০.৯ & ১.২৯ \\
\texttt{Mukti} & নিজস্ব রূপ & নিজস্ব রূপ & ০.৯ & ১.৩৩ \\
\texttt{Baloo Da 2} & নিজস্ব রূপ & কৃত্রিম ০.২ & ০.৯ & ১.৮৬ \\
\texttt{Lohit Bengali} & কৃত্রিম ৫.৫ & কৃত্রিম ০.২ & ০.৯ & ১.৩৩ \\
\texttt{Jamrul} & কৃত্রিম ২.৫ & কৃত্রিম ০.২ & ০.৯ & ০.৪৩ \\
\texttt{Likhan} & কৃত্রিম ৩.৫ & কৃত্রিম ০.২ & ০.৯ & ০.৯৭ \\
\texttt{Shimanto} & কৃত্রিম ৩.৫ & কৃত্রিম ০.২ & ১ & ১.১১ \\
\texttt{Mina} & নিজস্ব রূপ & কৃত্রিম ০.২ & ০.৯ & ১.০৩ \\
\texttt{AdorshoLipi} & কৃত্রিম ৪ & কৃত্রিম ০.২ & ০.৮ & ১.১৭ \\
\texttt{BenSen} & কৃত্রিম ৪ & কৃত্রিম ০.২ & ১.১ & ১.৩২ \\
\texttt{BenSenHandwriting} & কৃত্রিম ৩.৫ & কৃত্রিম ০.২ & ১ & ১.৩২ \\
\texttt{Atma} & নিজস্ব রূপ & কৃত্রিম ০.২ & ১ & ১.৭৯ \\
\texttt{Alkatra} & কৃত্রিম ৪.৫ & কৃত্রিম ০.২ & ০.৯ & ১.৩৬ \\
\texttt{Shonar Bangla} & নিজস্ব রূপ & কৃত্রিম ০.২ & ১.১ & ১.৪৭ \\
\texttt{FreeSerif} & কৃত্রিম ৩.৫ & নিজস্ব রূপ & ১ & ১.৩৩ \\
\bottomrule
\end{tabularx}
\end{table}

\begin{tcolorbox}[manualwarning]
Anek Bangla নাম দিয়ে লোড না হলে TTF ফাইলটি \texttt{AnekBangla-VF.ttf} নামে
ডকুমেন্টের পাশে রেখে \verb|\setbanglamainfont{AnekBangla-VF.ttf}| লিখুন।
Mukti-এর ৩ সংস্করণ এবং Baloo Da 2-এর static ফন্ট ফাইল ব্যবহার করুন।
Alkatra-এর TTF ফাইলটি \texttt{Alkatra-VF.ttf} নামে রেখে ফাইলের নাম দিয়ে লোড করুন।
Jamrul ০.১ ও Likhan ০.৬-এ স্বতন্ত্র ৎ (U+09CE) অক্ষরটি নেই।
Shimanto ১.০-এ সরাসরি ZWJ/ZWNJ ব্যবহার করলে \hologo{XeLaTeX} গ্লিফ না থাকার বার্তা দেয়।
\end{tcolorbox}

\subsection{অসমীয়া লেখা}
অসমীয়া ডকুমেন্টের জন্য \texttt{language=assamese} বেছে নিন। ফন্টের কমান্ডগুলো
একই থাকবে: এগুলো নির্বাচিত ভাষার মূল, sans ও mono ফন্ট নির্ধারণ করে।
বাংলা পূর্বনির্ধারিত ভাষা, তাই পুরোনো ডকুমেন্টে কিছু বদলাতে হবে না।
\begin{code}
\usepackage[language=assamese]{latexbangla}
\setbanglamainfont{Noto Serif Bengali}
\end{code}
ক্যাপশন, তারিখ ও রেফারেন্সের নাম অসমীয়া হবে। দশমিক কাউন্টারে একই অঙ্ক
ব্যবহৃত হয়; বর্ণভিত্তিক লেবেলে অসমীয়া ক্রম অনুযায়ী ৰ ও ৱ-ও থাকে।
দুই ভাষার ক্রমসংখ্যার অপশনগুলো \autoref{bn:sec:numbering}-এ ব্যাখ্যা করা হয়েছে।

সম্পূর্ণ ডকুমেন্ট ও অনূদিত নামগুলো দেখতে
\href{https://github.com/Neehan/LaTeXbangla/blob/master/examples/assamese.pdf}
{অসমীয়া উদাহরণটি} দেখুন। নির্দেশিকার বাকি অংশে বাংলায় উদাহরণ দেওয়া হয়েছে;
একই কমান্ডগুলো অসমীয়াতেও প্রযোজ্য।

\subsection{বাংলা ও ইংরেজির আলাদা ফন্ট}
বাংলা ও ইংরেজি একসঙ্গে রেখেই মূল লেখা, শিরোনাম ও টাইপরাইটার ধরনের লেখায়
আলাদা চেহারা দিতে পারেন। এখানে মূল লেখার জন্য Kalpurush ও Pagella,
sans serif-এর জন্য Noto Sans Bengali ও Heros, আর mono-র জন্য Siyam Rupali
ও Cursor বেছে নেওয়া হয়েছে। সেটিংগুলো preamble-এ, অর্থাৎ
\verb|\begin{document}|-এর আগে লিখুন:
\begin{tcolorbox}[manualbox,title=আলাদা ফন্ট বাছার উদাহরণ]
\begin{code}
\setbanglamainfont{Kalpurush}
\setbanglasansfont{Noto Sans Bengali}
\setbanglamonofont{Siyam Rupali}
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}
\end{code}
\end{tcolorbox}
এবার আগের মতোই \verb|\textrm|, \verb|\textsf| ও \verb|\texttt| ব্যবহার করুন।
প্রতিটি কমান্ড সংশ্লিষ্ট ফন্টের জোড়া বেছে নেয়; গাঢ় ও তির্যক রূপও কাজ করে:
\begingroup
\let\bengalifontsf\manualsansfont
\let\bengalifonttt\manualmonofont
\begin{examplepair}
বাংলা ও English।\\
\textbf{গাঢ় ও bold।}\\
\textit{তির্যক ও italic।}

\textsf{বাংলা ও English।}\\
\textsf{\textbf{গাঢ় ও bold।}}\\
\textsf{\textit{তির্যক ও italic।}}

\texttt{বাংলা ও English।}\\
\texttt{\textbf{গাঢ় ও bold।}}\\
\texttt{\textit{তির্যক ও italic।}}
\end{examplepair}
\endgroup
বাংলা বা ইংরেজি অংশ আলাদা করে চিহ্নিত না করেই একই লেখা তিন রকম দেখায়।
Siyam Rupali-র অক্ষরের স্বাভাবিক প্রস্থ বজায় থাকে; mono-র জন্য বাছলেই
ফন্টটির সব অক্ষর সমান চওড়া হয়ে যায় না।

এই আলাদা সেটিংগুলো ঐচ্ছিক: একটি মূল বাংলা ফন্ট দিয়েই তিন ধরনের লেখা চলে,
আর ইংরেজির ফন্ট না বদলালে আগের ফন্টই থাকে। বাংলা ও ইংরেজির কমান্ড যেকোনো
ক্রমে লেখা যায়; প্রতিটি কমান্ড শুধু তার জন্য নির্দিষ্ট ফন্টটি বদলায়।

\subsection{লেখার একটি অংশে আলাদা ইংরেজি ফন্ট}
কোনো উদ্ধৃতি বা ছোট্ট মন্তব্যের জন্য আলাদা ইংরেজি ফন্ট বেছে নিতে পারেন।
শুধু সেই অংশটুকু বদলাতে দ্বিতীয় বন্ধনীর মধ্যে \verb|\fontspec{...}| দিন।
বাংলা তার নির্ধারিত ফন্টেই থাকে; গ্রুপ শেষ হলে আগের ইংরেজি ফন্ট ফিরে আসে।
\begin{examplepair}
This is the main font.
বাংলা নিজের ফন্টে থাকে।

{\fontspec{TeX Gyre Adventor}
This passage has its own voice.
বাংলা নিজের ফন্টে থাকে।
\textit{Emphasis works too.}\par}

The main font returns.
বাংলা নিজের ফন্টে থাকে।
\end{examplepair}
একই ফন্ট বারবার ব্যবহার করতে preamble-এ একটি কমান্ড তৈরি করুন:
\begin{code}
\newfontfamily\quotefont{TeX Gyre Adventor}
\end{code}
তারপর লেখায় \verb|{\quotefont ...}| ব্যবহার করুন।

স্বয়ংক্রিয় ফন্ট পরিবর্তন লেখার ভাষা বা লাইনের শেষে হাইফেন দিয়ে শব্দ ভাঙার
নিয়ম বদলায় না। ইংরেজি অংশে ইংরেজির নিয়ম ব্যবহার করতে preamble-এ
\verb|\setotherlanguage{english}| দিন, তারপর \verb|\textenglish{...}| ব্যবহার করুন।

\subsection{ফন্টের সেটিং নিজের মতো বেছে নেওয়া}
অন্য ফন্টের সঙ্গে আকার মেলাতে, শব্দের ফাঁক বদলাতে বা নিজের প্রজেক্টের ফন্ট
ফাইল ব্যবহার করতে বাংলা ফন্ট কমান্ডে fontspec-এর অপশন দিন। তিনটি কমান্ডেই
ফন্টের নামের আগে বা পরে অপশন লেখা যায়:
\begin{code}
\setbanglamainfont[features]{font}
\setbanglamainfont{font}[features]
\end{code}
পূর্বনির্ধারিত সেটিংয়ে \pkg{Script=Bengali} থাকে; \hologo{LuaLaTeX}-এ
\pkg{Renderer=HarfBuzz}-ও থাকে। আপনার দেওয়া মান পূর্বনির্ধারিত মানের বদলে
ব্যবহৃত হয়। যেমন আকার
ও শব্দের ফাঁক বদলাতে বা ফাইল থেকে ফন্ট নিতে লিখতে পারেন:
\begin{code}
\setbanglamainfont[Scale=1.05,WordSpace=1.1]{Kalpurush}
\setbanglamainfont[Path=fonts/]{fontkalpurush.ttf}
\end{code}
\pkg{WordSpace=1.1} ফন্টের নিজস্ব শব্দের ফাঁক ১০\% বাড়ায়;
\autoref{bn:tab:font-defaults}-এর পূর্বনির্ধারিত গুণকের বদলে এই মান ব্যবহৃত হয়।
তালিকার বাইরের ফন্টে আকার ও শব্দের ফাঁক ফন্টের নিজস্ব মানেই থাকে।
Small caps ও অন্য রূপের প্রাপ্যতা ফন্টের ওপর নির্ভর করে।
ফন্ট পরিবারের নাম ও প্রচলিত ফাইলের নাম অনুযায়ী পূর্বনির্ধারিত সেটিং চেনা হয়;
ফাইলের নাম বদলালে সাধারণ সেটিং প্রযোজ্য।
আলাদা ফাইলে রাখা রূপ বাছতে \pkg{UprightFont}, \pkg{BoldFont},
\pkg{ItalicFont} ও \pkg{BoldItalicFont} ব্যবহার করুন।

\section{গাঢ় ও তির্যক লেখা নিয়ন্ত্রণ}
কোনো সংজ্ঞা চোখে পড়ার মতো করতে \verb|\textbf|, আর জোর দিয়ে কিছু বোঝাতে
\verb|\textit| ব্যবহার করুন। ফন্টের নিজস্ব গাঢ় বা তির্যক রূপে নির্বাচিত ভাষার
অক্ষর থাকলে \LaTeX{}bangla সেটিই নেয়; না থাকলে রেখা মোটা করে বা হেলিয়ে রূপটি
তৈরি করে। পরীক্ষিত সেটিংগুলো \autoref{bn:tab:font-defaults}-এ দেওয়া আছে।
তালিকার বাইরের ফন্টে কৃত্রিম গাঢ় করার মাত্রা ২.৫ ও তির্যক করার মাত্রা ০.২।

কৃত্রিম গাঢ় লেখা আরেকটু স্পষ্ট চাইলে \pkg{AutoFakeBold}-এর মান বাড়াতে পারেন।
গাঢ়-তির্যক লেখাতেও একই মাত্রা রাখতে সঙ্গে \pkg{AutoFakeSlant} দিন।
নিচের উদাহরণে গাঢ় করার মাত্রা ৫ দিয়ে চারটি রূপ দেখানো হয়েছে:
\begin{tcolorbox}[manualbox,title=গাঢ় ও তির্যক রূপের সেটিং (preamble)]
\begin{code}
\setbanglamainfont[
  AutoFakeBold=5,
  AutoFakeSlant=0.2
]{Kalpurush}
\end{code}
\end{tcolorbox}
\begingroup
\let\bengalifont\manualstrongfont
\bengalifont
\begin{examplepair}
সাধারণ লেখা।

\textbf{গাঢ় লেখা।}

\textit{তির্যক লেখা।}

\textbf{\textit{গাঢ় ও তির্যক।}}
\end{examplepair}
\endgroup
নিজে \pkg{AutoFakeBold} দিলে ফন্টের নিজস্ব গাঢ় রূপ থাকলেও কৃত্রিম গাঢ়
ব্যবহৃত হবে। তাই সংখ্যাসহ অপশনটি দিন: শুধু \pkg{AutoFakeBold} লিখলে
fontspec ১.৫ ধরে, \LaTeX{}bangla-এর ফন্ট অনুযায়ী নির্ধারিত মান ধরে না।

গাঢ় ও গাঢ়-তির্যক রূপ আলাদাভাবে বদলাতেও fontspec-এর অপশন ব্যবহার করতে পারেন:
\begin{code}
\setbanglamainfont[
  BoldFeatures={FakeBold=5},
  BoldItalicFeatures={FakeBold=5,FakeSlant=0.2}
]{Kalpurush}
\end{code}
কৃত্রিম রূপ দরকার এমন ফন্টে এই অপশনগুলো বিশেষ কাজে আসে। পরীক্ষিত সেটিং
ও ফন্টের নিজস্ব রূপের স্বয়ংক্রিয় নির্বাচন চাইলে বাড়তি অপশন ছাড়াই ফন্ট বেছে নিন।

\subsection{যতিচিহ্ন, তালিকার বুলেট ও পাদটীকা}
মিশ্র লেখাতেও যতিচিহ্ন ও পাদটীকা আগের মতোই ব্যবহার করতে পারেন। সরাসরি লেখা ড্যাশ,
বাঁকানো উদ্ধৃতিচিহ্ন ও তিন-বিন্দু চিহ্ন (…) ইংরেজি ফন্ট থেকে আসে। বাংলা ফন্টে চিহ্ন না
থাকলে সাধারণ বুলেট ও প্রতীকভিত্তিক পাদটীকার চিহ্নও সেখান থেকে নেওয়া হয়।
সাধারণ পাদটীকায় বাংলা নম্বর আসে; Roman বা প্রতীকভিত্তিক বিন্যাস বাছলে তা-ই থাকে।
\begin{examplepair}
“বাংলা”—English… আবার বাংলা।
\begin{itemize}
  \item একটি কথা।
  \item আরেকটি কথা।
\end{itemize}
একটি তথ্য\footnote{ছোট ব্যাখ্যা।}
\end{examplepair}

\section{ক্রমসংখ্যা, তালিকা ও নিজস্ব কাউন্টার}\label{bn:sec:numbering}
উপপ্রশ্নসহ একটি অনুশীলনী লিখতে সাধারণ তালিকার ভেতরে আরেকটি তালিকা ব্যবহার করুন।
বাংলা নম্বর \LaTeX{}bangla নিজেই দেয়, তাই পুরো ডকুমেন্টে পরিচিত তালিকার কমান্ডই চলে।

পূর্বনির্ধারিত সেটিং হলো \pkg{changecounternumbering=true}: দশমিক কাউন্টারের
নম্বর নির্বাচিত ভাষার অঙ্কে হয়, আর \verb|\alph| ও \verb|\Alph|-এ সেই ভাষার বর্ণ আসে। কাউন্টারের মান,
পুনরায় গণনা শুরুর নিয়ম ও যৌগিক নম্বরের কাঠামো একই থাকে। Roman ও
প্রতীকভিত্তিক বিন্যাসও বদলায় না। নির্দেশিকার এই বাংলা অংশে পরিচ্ছেদ, উপপরিচ্ছেদ ও
পাতার নম্বরসহ সব সাধারণ কাউন্টারেই বাংলা ব্যবহার করা হয়েছে। সাধারণ
\pkg{enumerate}-এর চারটি স্তরে যথাক্রমে ১., (ক), i. ও ক. আসে;
পরিশিষ্টের নম্বর হয় পরিশিষ্ট ক-এর মতো।
\begin{examplepair}
\begin{enumerate}
  \item একটি আয়তক্ষেত্রের দৈর্ঘ্য ৪,
    প্রস্থ ৩ একক।
  \begin{enumerate}
    \item ক্ষেত্রফল কত?
    \item কর্ণের দৈর্ঘ্য কত?
  \end{enumerate}
\end{enumerate}
\end{examplepair}

\subsection{নিজস্ব কাউন্টারও সরাসরি কাজ করে}
অনুশীলনীর নম্বর দিতে আগের মতোই একটি কাউন্টার তৈরি করুন।
\verb|\refstepcounter| মান এক বাড়ায় এবং \verb|\label| ও \verb|\ref|-এর
ব্যবস্থা করে; \verb|\stepcounter| শুধু মান বাড়ায়।
\begin{examplepair}
\newcounter{practice}
\setcounter{practice}{11}
\refstepcounter{practice}
\label{bn:ex:custom}
অনুশীলনী \thepractice।\par
\renewcommand{\thepractice}
  {\alph{practice}}
\setcounter{practice}{2}
অনুশীলনী \thepractice।
\end{examplepair}
এখানে \texttt{[section]} প্রতি পরিচ্ছেদে কাউন্টার শূন্য করে;
\verb|\theproblem|-এর সংজ্ঞা মুদ্রিত নম্বরে পরিচ্ছেদের নম্বর যোগ করে:
\begin{code}
\newcounter{problem}[section]
\renewcommand{\theproblem}{\thesection.\arabic{problem}}
\end{code}
\verb|\arabic|, \verb|\alph| বা \verb|\Alph| ব্যবহার না করে লেখা
বিন্যাস নিজের ফলাফল অপরিবর্তিত রাখে।

\subsection{নির্দিষ্ট কাউন্টারের নম্বর ইংরেজিতে রাখা}
ডকুমেন্টের বাকি নম্বর বাংলায় রেখেও একটি কাউন্টারের নম্বর ইংরেজিতে
লিখতে পারেন। সেই কাউন্টারের রেফারেন্সেও একই বিন্যাস থাকে:
\begin{examplepair}
\renewcommand{\thepractice}
  {\number\value{practice}}
\refstepcounter{practice}
\label{bn:ex:western}
অনুশীলনী \thepractice।\par
অনুশীলনী~\ref{bn:ex:western} দেখুন।
\end{examplepair}
ইংরেজি বর্ণের জন্য প্রিঅ্যাম্বলে \verb|\usepackage{alphalph}| লিখুন।
এর \verb|\alphalph| বিন্যাসে a, b, \ldots, z, aa, \ldots\ আসে;
\verb|\AlphAlph| বড় হাতের বর্ণ দেয়। নিচে সংজ্ঞাটি তালিকার পরিবেশের
ভেতরে থাকায় শুধু এই তালিকার নম্বর বদলায়:
\begin{examplepair}
\begin{enumerate}
  \renewcommand{\theenumi}
    {\alphalph{\value{enumi}}}
  \item প্রথম।\label{bn:item:latin}
  \item দ্বিতীয়।
\end{enumerate}
পদ~\ref{bn:item:latin} দেখুন।
\end{examplepair}
এই তালিকায় 1, 2, \ldots\ চাইলে বদলে \verb|\number\value{enumi}| লিখুন।
নিজের কাউন্টারের জন্য \verb|\thepractice|-এর সংজ্ঞায়
\verb|\alphalph{\value{practice}}| দিন। পরের তালিকাগুলোর নম্বর বাংলাই থাকে।
এই পরিবর্তন শুধু নম্বরের জন্য; \verb|\autoref|-এর দেওয়া অনূদিত নাম বদলায় না।

\subsection{একাধিক বর্ণের নম্বর}
দুই ভাষাতেই বর্ণভিত্তিক নম্বর ক থেকে য় পর্যন্ত চলে: বাংলায় ৩৫টি ও অসমীয়ায়
৩৭টি বর্ণ ব্যবহৃত হয়। শূন্যে কিছু লেখা হয় না; ঋণাত্মক বা বর্ণক্রমের সীমার
বেশি মানে সাধারণ \LaTeX-এর মতোই \texttt{Counter too large} ত্রুটি আসে।

আরও লম্বা তালিকার জন্য \pkg{alphalph} দিয়ে এর পরে কক, কখ ইত্যাদি লেখা যায়।
কাউন্টার রূপান্তর চালু রেখে, \LaTeX{}bangla লোড করার পরে প্রিঅ্যাম্বলে লিখুন:
\begin{code}
\usepackage{alphalph}
\makeatletter
\newalphalph{\extendedBangla}{\@alph}{35}
\makeatother
\end{code}
শেষ আর্গুমেন্টটি বর্ণের সংখ্যা; অসমীয়ার জন্য 37 লিখুন। যে কাউন্টারে একাধিক বর্ণের নম্বর চান,
সেটিতে নতুন বিন্যাসটি ব্যবহার করুন; অন্য কাউন্টারের আচরণ বদলাবে না:
\begin{examplepair}
\newcounter{extendedpractice}
\renewcommand{\theextendedpractice}
  {\extendedBangla{
    \value{extendedpractice}}}
\setcounter{extendedpractice}{35}
\theextendedpractice,
\stepcounter{extendedpractice}
\theextendedpractice,
\stepcounter{extendedpractice}
\theextendedpractice
\end{examplepair}
এখানে তৈরি করা \verb|\extendedBangla| বিন্যাসটি নির্বাচিত ভাষার বর্ণ ব্যবহার করে;
প্যাকেজের নিজস্ব \verb|\alphalph| ও \verb|\AlphAlph| কমান্ডে ইংরেজি বর্ণই থাকে।

\subsection{স্বয়ংক্রিয় বা সরাসরি রূপান্তর}
\verb|\usepackage[changecounternumbering=false]{latexbangla}| দিলে
কাউন্টার ও সংখ্যাভিত্তিক তথ্যসূত্রের আগের বিন্যাস থাকে; ফন্ট ও অনুবাদ কাজ করে।
এটি প্যাকেজের অপশন; ভাষা বদলালে এর মান বদলায় না। শুরুর শূন্যসহ কোনো কোড
লিখতে, বা স্বয়ংক্রিয় রূপান্তর বন্ধ রেখেও কাউন্টারের মান বাংলায় দেখাতে লিখুন:
\begin{examplepair}
\numtobangla{0012}; \tobangla{practice}
\end{examplepair}
কমান্ড দুটি expandable। \verb|\numtobangla| শুধু ইংরেজি অঙ্ক নেয় এবং শুরুর শূন্যগুলো রাখে;
ধনাত্মক-ঋণাত্মক চিহ্ন বা দশমিক বিন্দু নেয় না। \verb|\tobangla|
কাউন্টারের পূর্ণসংখ্যা মান বাংলায় লেখে; শূন্য ও ঋণাত্মক মানও চলে। একটি কাউন্টারে
এটি ব্যবহার করতে লিখুন \verb|\renewcommand{\thepractice}{\tobangla{practice}}|।

\section{গণিত, সারণি ও উপপাদ্য}
বাংলা পাঠে সূত্রের ব্যাখ্যা বাংলায় লিখতে, $x$ ও $v$-এর মতো চেনা প্রতীক
রাখতে এবং দুই লিপিতেই সংখ্যা লিখতে পারেন।
সংখ্যা যে লিপিতে দেখতে চান, সেই লিপিতেই লিখুন: \texttt{12} থাকে 12,
\texttt{১২} থাকে ১২, লেখায় ও গণিতে দুজায়গাতেই। কাউন্টারের স্বয়ংক্রিয়
রূপান্তর আপনার সূত্রের অঙ্ক বদলায় না। গণিতে বাংলা অঙ্ক মূল বাংলা ফন্ট থেকে আসে;
সূত্রে তার অবস্থান অনুযায়ী আকার মেলে। অন্য চিহ্নগুলো আসে গণিতের ফন্ট থেকে।

\pkg{amsmath} যোগ করে \verb|\text| দিয়ে রাশি ও এককের নাম বাংলায় লিখুন।
১২ মিটার পথ যেতে ৩ সেকেন্ড লাগলে লেখা যায়:
\begin{examplepair}
\begin{equation}\label{bn:eq:speed}
  \text{বেগ}=
  \frac{১২}{৩}=৪\text{ মি./সে.}
\end{equation}
\[
  x_৩^{২}+\sqrt{৪}=12+১২
\]
\end{examplepair}
সমীকরণের নম্বরও বাংলায় আসে; পরে \verb|\eqref| দিয়ে সেটি উল্লেখ করতে পারেন।
একইভাবে ভগ্নাংশ, মূল, ম্যাট্রিক্স ও একাধিক স্তরের সূচকেও বাংলা অঙ্ক লিখতে পারেন।
একটি অঙ্ক হলে \verb|x^২|-এর মতো বন্ধনী ছাড়াই চলে; একাধিক অঙ্কে বন্ধনী দিন।
গণিত গাঢ় করতে \verb|\boldmath| ব্যবহার করুন; শুধু বাইরের \verb|\textbf|
গণিতের লেখা গাঢ় করে না। \verb|\mathbb|-এর মতো বিশেষ গাণিতিক বর্ণমালার কমান্ড
বাংলা অঙ্কের আলাদা নকশা বেছে দেয় না।
অন্য গাণিতিক চিহ্নের গাঢ় রূপ আপনার গণিতের ফন্টের সেটিংয়ের ওপর নির্ভর করে।

\subsection{গণিতের ফন্ট আলাদা করে বাছুন}
সূত্রের চেহারা বদলাতে \pkg{unicode-math} দিয়ে পছন্দের গণিতের ফন্ট বেছে নিন:
\begin{code}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\end{code}
প্রচলিত পদ্ধতিতে গণিতের ফন্ট বাছতে \pkg{latexbangla}-এর \emph{আগে}
\pkg{amsmath,newtxmath} যোগ করুন। গণিতের ফন্ট নির্বাচন আপনার হাতেই থাকে।

\subsection{সারণি ও নিজের তৈরি পরিবেশ}
সাধারণ সারণিতে বাংলা বর্ণনার পাশে ইংরেজি শব্দ ও মাপ লিখুন।
প্রতিটি ঘরে স্বয়ংক্রিয়ভাবে উপযুক্ত ফন্ট ব্যবহৃত হয়:
\begin{examplepair}
\begin{tabular}{llc}
বাহু & Side & দৈর্ঘ্য \\
\hline
প্রথম & First & ৩ \\
দ্বিতীয় & Second & ৪
\end{tabular}
\end{examplepair}
\pkg{siunitx} দিয়ে সংখ্যা সাজাতে ও সারিবদ্ধ করতে ইনপুট হিসেবে ইংরেজি অঙ্ক দিন;
সরাসরি বাংলা অঙ্ক লিখতে চাইলে সাধারণ লেখার কলাম ব্যবহার করুন।
উপপাদ্য সংজ্ঞায়িত করতে \pkg{amsthm} ব্যবহার করুন। যেমন preamble-এ লিখুন:
\begin{code}
\newtheorem{theorem}{উপপাদ্য}
\end{code}
প্রমাণের বাংলা শিরোনাম Polyglossia দেয়;
উপস্থাপনার নকশা ডকুমেন্ট ক্লাস বা theorem style অনুযায়ী হয়।
\begin{examplepair}
\begin{theorem}
\label{bn:thm:pythagoras}
সমকোণী ত্রিভুজের লম্ব দুই বাহুর
দৈর্ঘ্য ৩ ও ৪ হলে অতিভুজের দৈর্ঘ্য ৫।
\end{theorem}
\begin{proof}
$৩^{২}+৪^{২}=৫^{২}$।
\end{proof}
\end{examplepair}

\section{লেবেল, রেফারেন্স ও তথ্যসূত্র}
লেবেল দিয়ে সমীকরণ, উপপাদ্য বা অনুশীলনীর উল্লেখ করলে পরে ডকুমেন্ট বদলালেও নম্বর
নিজে থেকে ঠিক থাকে। এখানে পরিচিত রেফারেন্স কমান্ডগুলো দিয়েই আগের
উদাহরণগুলোর উল্লেখ করা হয়েছে।
ডকুমেন্ট ক্লাসের অধ্যায়, চিত্র, সারণি, সূচিপত্র, পরিশিষ্ট ও তথ্যসূত্রের নাম এবং তারিখের
রূপ নির্বাচিত ভাষা অনুযায়ী আসে। বাংলা অনুবাদ দেয় Polyglossia;
অসমীয়া অনুবাদ দেয় \LaTeX{}bangla। \pkg{hyperref} যোগ করলে স্বয়ংক্রিয়
রেফারেন্সের নামও অনূদিত হয়। নতুন লেবেল বা তথ্যসূত্র যোগ করলে আবার কম্পাইল করুন,
যাতে রেফারেন্সের নম্বরগুলো ঠিকভাবে আসে।
\begin{examplepair}
\autoref{bn:eq:speed};
\eqref{bn:eq:speed}।

\autoref{bn:thm:pythagoras}।
অনুশীলনী \ref{bn:ex:custom}।
\end{examplepair}
\verb|\ref| নম্বর লেখে, \verb|\eqref| তার চারপাশে বন্ধনী দেয়,
আর \verb|\autoref| অনূদিত নামসহ রেফারেন্স দেয়। নামগুলোর মধ্যে আছে
পরিচ্ছেদ, উপপরিচ্ছেদ, সমীকরণ ও পাদটীকা।

আগে থেকে দেওয়া নিজস্ব রেফারেন্সের নাম অক্ষুণ্ণ থাকে। একাধিক উপপাদ্যের
পরিবেশ একই কাউন্টার ব্যবহার করলে রেফারেন্সের ধরনেও hyperref-এর সাধারণ নিয়ম প্রযোজ্য।

\subsection{নাম ইংরেজিতে রাখা}
বাংলা লিখেও নির্দিষ্ট নাম ইংরেজিতে রাখতে Polyglossia-এর প্রচলিত caption পরিবর্তনের
নিয়ম ও hyperref-এর রেফারেন্সের নাম ব্যবহার করুন। প্যাকেজগুলো লোড করার পরে
নিচের অংশ যোগ করুন। কাউন্টারের নম্বরও ইংরেজিতে
চাইলে \LaTeX{}bangla-এর অপশনে \pkg{changecounternumbering=false} দিন:
\begin{code}
\gappto\captionsbengali{%
  \renewcommand{\chaptername}{Chapter}%
  \renewcommand{\tablename}{Table}%
}
\renewcommand{\sectionautorefname}{Section}
\renewcommand{\tableautorefname}{Table}
\end{code}
অসমীয়ার জন্য \verb|\captionsassamese| ব্যবহার করুন।

\subsection{তথ্যসূত্র ও উদ্ধৃতি}
\LaTeX{}bangla-তে \pkg{biblatex} ও \pkg{natbib} দুটোই ব্যবহার করা যায়।
যেকোনো একটির সঙ্গে আপনার তথ্যসূত্রের \pkg{.bib} ফাইল ব্যবহার করুন।

\textbf{biblatex দিয়ে।} আগে \LaTeX{}bangla লোড করুন, তারপর তথ্যসূত্রের style বেছে নিন:
\begin{code}
\usepackage{latexbangla}
\setbanglamainfont{Kalpurush}
\usepackage[backend=biber,style=numeric-comp,sorting=none,date=long]{biblatex}
\addbibresource{references.bib}
\usepackage{hyperref}
\end{code}
নমুনা তথ্যসূত্রগুলো \pkg{references.bib} নামে সংরক্ষণ করুন। তারপর ডকুমেন্টে
\verb|\cite{book,article}| ও \verb|\printbibliography| লিখুন:
\manualbibliographypair{bangla}{তথ্যসূত্রসমূহ}
আপনার নির্বাচিত \LaTeX{} ইঞ্জিন, তারপর Biber, তারপর একই ইঞ্জিন আরও দুবার চালান।
নাম ও শিরোনাম যেমন লিখেছেন তেমনই থাকে; সংযোজক শব্দ ও মাসের নাম তথ্যসূত্রের ভাষা অনুসরণ করে।
সংখ্যা যে অঙ্কে লিখবেন, সে অঙ্কেই থাকবে: \texttt{2024} থেকে 2024, আর
\texttt{২০২৩} থেকে ২০২৩। সঙ্গে যুক্ত প্রত্যয়ও তা অনুসরণ করে:
\texttt{4th}/\texttt{৪র্থ} ও \texttt{2024a}/\texttt{২০২৩ক}। URL ও DOI বদলায় না।

শব্দগুলো ইংরেজিতে চাইলে preamble-এ \verb|\setotherlanguage{english}| দিন এবং
biblatex-এর অপশনে \pkg{language=english} ও \pkg{autolang=other} যোগ করুন।

\textbf{natbib দিয়ে।} বাক্যের অংশ হিসেবে উদ্ধৃতির জন্য \verb|\citet|, আর
বন্ধনীর মধ্যে উদ্ধৃতির জন্য \verb|\citep| ব্যবহার করুন। তথ্যসূত্রের শব্দ অনুবাদ করতে:
\begin{code}
\usepackage[numbers,sort&compress]{natbib} % Or [authoryear].
\bibliographystyle{plainnatbn}
% In the document:
\citet{book}; \citep{book,article}.
\bibliography{references}
\end{code}
\manualnatbibpair{bangla}
\hologo{BibTeX}-এর প্রচলিত \pkg{year} ও \pkg{journal}-এর মতো field ব্যবহার করুন;
Biber-এর বদলে \hologo{BibTeX} চালান। এই style-গুলো বর্তমান ভাষা অনুসরণ করে;
ইংরেজিতে রাখতে \verb|\setotherlanguage{english}| ঘোষণার পর \pkg{english}
environment ব্যবহার করুন।

\begin{tcolorbox}[manualwarning]
প্রচলিত \pkg{plainnat}, \pkg{abbrvnat} ও \pkg{unsrtnat} style-এর ইংরেজি শব্দ
অনুবাদ হয় না। অনুবাদের জন্য এগুলোর বদলে যথাক্রমে \pkg{plainnatbn},
\pkg{abbrvnatbn} ও \pkg{unsrtnatbn} ব্যবহার করুন।
অক্ষর ভেঙে যাওয়া এড়াতে \pkg{abbrvnatbn} বাংলা ও অসমীয়াসহ non-ASCII নামের প্রথম অংশ সংক্ষিপ্ত করে না।
\end{tcolorbox}

\subsection{অন্য প্যাকেজের সঙ্গে ব্যবহার}
পরিচিত প্যাকেজগুলো নিয়েই কাজ করতে পারেন: গণিতের জন্য \pkg{mathtools} ও
\pkg{bm}, আর সারণির জন্য \pkg{booktabs}, \pkg{tabularx}, \pkg{longtable} ও
\pkg{multirow}। ক্যাপশন সাজাতে \pkg{caption} ও \pkg{subcaption}, পাতার ওপরের
লেখা সাজাতে \pkg{fancyhdr}, শিরোনামের জন্য \pkg{titlesec}, আর বাক্সে লেখা
রাখতে \pkg{tcolorbox} ব্যবহার করতে পারেন। এগুলোর সঙ্গে প্যাকেজটি পরীক্ষা
করা হয়েছে; প্রতিটির বিন্যাস ও নকশা সেই প্যাকেজই নিয়ন্ত্রণ করে।

\Needspace{14\baselineskip}
\hologo{LuaLaTeX}-এ \pkg{amsthm}-এর উপপাদ্যের শিরোনামে ``invalid node'' ত্রুটি হলে
শুধু শিরোনামে হাইফেনেশন বন্ধ করতে \pkg{amsthm} লোড করার পরে নিচের কোড দিন
(BOOKbangla-তে এই সমাধানটি আগে থেকেই আছে):
\begin{code}
\usepackage{iftex,xpatch}
\makeatletter
\ifLuaTeX
  \xpatchcmd{\deferred@thm@head}{\normalfont#1}
    {\normalfont\language=\l@nohyphenation #1}{}
    {\PackageError{amsthm}{Heading patch failed}{}}
\fi
\makeatother
\end{code}

\pkg{cleveref}-এর রেফারেন্সের নাম ও সংযোজক শব্দ স্বয়ংক্রিয়ভাবে নির্বাচিত
ভাষা অনুসরণ করে। \pkg{amsmath}, \pkg{amsthm} ও \pkg{hyperref} ব্যবহার করলে
সেগুলোর পরে এটি লোড করুন।

বাংলা ও ইংরেজি ফন্ট একসঙ্গে ব্যবহার করেও \pkg{microtype} স্বাভাবিকভাবে লোড
করে আপনার ইঞ্জিনে এর উপলব্ধ টাইপোগ্রাফির সুবিধাগুলো ব্যবহার করতে পারেন।

\section{পুরোনো ডকুমেন্ট হালনাগাদ}
পুরোনো ডকুমেন্টে \pkg{banglamainfont} ও \pkg{banglattfont} অপশন রেখেই কাজ
চালিয়ে যেতে পারেন। নতুন ডকুমেন্টে এই নির্দেশিকার ফন্ট কমান্ডগুলো ব্যবহার করুন।
নিচের ছকে পুরোনো সেটিংয়ের সমতুল্য নতুন কমান্ড আছে।
\begin{center}
\begin{tabularx}{\linewidth}{@{}lX@{}}
\toprule
\textbf{পুরোনো সেটিং} & \textbf{বর্তমান কমান্ড বা অপশন} \\
\midrule
\pkg{banglamainfont=Kalpurush} & \texttt{\detokenize{\setbanglamainfont{Kalpurush}}} \\
\pkg{banglattfont=FreeSerif} & \texttt{\detokenize{\setbanglamonofont{FreeSerif}}} \\
\pkg{changecounternumbering=1} & \pkg{changecounternumbering=true} (পূর্বনির্ধারিত) \\
\pkg{changecounternumbering=0} & \pkg{changecounternumbering=false} \\
\bottomrule
\end{tabularx}
\end{center}
পরে ফন্ট বাছার কমান্ড দিলে সেটি সংশ্লিষ্ট প্যাকেজ অপশনকে প্রতিস্থাপন করে।
ক্রমসংখ্যার অপশনটি বর্তমান ইন্টারফেসেরই অংশ; Boolean ও সংখ্যায় লেখা দুই
রূপই গ্রহণ করা হয়। পুরোনো \pkg{SiyamRupali} নামটিও \pkg{Siyam Rupali} হিসেবে চলে।

ডকুমেন্টে \pkg{feature=0/1/2} থাকলে সেটি বাদ দিন; ভাষার সুবিধা পেতে এখন
আলাদা স্তর বাছতে হয় না। প্রয়োজনীয় AMS, রেফারেন্স ও তথ্যসূত্রের প্যাকেজ যোগ করে নিজের
উপপাদ্য বা সমাধানের পরিবেশ তৈরি করুন। মার্জিন, লাইনের ফাঁক, শিরোনামের
যতিচিহ্ন, উপপাদ্যের নকশা ও সমীকরণের গণনা পুনরায় শুরুর নিয়ম ডকুমেন্ট ক্লাস
বা style-এর বিষয়।

পুরোনো \pkg{latin} পরিবেশের কাজ এখন স্বয়ংক্রিয় বাংলা-ইংরেজি ফন্ট পরিবর্তনেই
হয়। শুধু ফন্টের বদলে লেখার ভাষাও বদলাতে চাইলে Polyglossia-এর ভাষা পরিবর্তনের কমান্ড ব্যবহার করুন।
বর্তমান Polyglossia-এর অঙ্ক রূপান্তরের ত্রুটি সংশোধিত হয়েছে;
পুরোনো workaround আর দরকার নেই।

\section*{এক নজরে কমান্ড}
\phantomsection
\addcontentsline{toc}{section}{এক নজরে কমান্ড}
\begin{center}
\begin{tabularx}{\linewidth}{@{}lX@{}}
\toprule
\textbf{কাজ} & \textbf{কমান্ড বা অপশন} \\
\midrule
ডকুমেন্টের ভাষা বাছা & \pkg{language=bangla} (পূর্বনির্ধারিত) বা \pkg{language=assamese} \\
মূল বাংলা ফন্ট বাছা & \texttt{\detokenize{\setbanglamainfont[features]{font}}} \\
ঐচ্ছিক sans ও mono ফন্ট বাছা & \texttt{\detokenize{\setbanglasansfont}}, \texttt{\detokenize{\setbanglamonofont}} \\
ইংরেজি ফন্ট বাছা & \texttt{\detokenize{\setmainfont}}, \texttt{\detokenize{\setsansfont}}, \texttt{\detokenize{\setmonofont}} \\
আগের কাউন্টারের বিন্যাস রাখা & \pkg{changecounternumbering=false} \\
কাউন্টারের মান বাংলায় লেখা & \texttt{\detokenize{\tobangla{counter}}} \\
অঙ্কের সারি রূপান্তর & \texttt{\detokenize{\numtobangla{0012}}} \\
গণিতে বাংলা শব্দ লেখা & \texttt{\detokenize{\text{বাংলা}}} \\
বর্ণভিত্তিক কাউন্টার & \texttt{\detokenize{\alph{counter}}} বা \texttt{\detokenize{\Alph{counter}}} \\
\bottomrule
\end{tabularx}
\end{center}

\subsection{নমুনা ও সহায়তা}
সুবিধাগুলো একসঙ্গে দেখতে
\href{https://github.com/Neehan/LaTeXbangla}{রিপোজিটরিতে দেওয়া}
বাংলা ও অসমীয়া নমুনা ডকুমেন্ট এবং ফন্ট নির্দেশিকা
দেখতে পারেন; প্রতিটির সোর্স ও PDF দেওয়া আছে। পরীক্ষিত ক্লাসের মধ্যে আছে
article, report, book ও memoir। কোনো কিছু প্রত্যাশামতো কাজ না করলে একটি ছোট
ডকুমেন্ট, ফন্টের নাম, ইঞ্জিনের নাম ও log পাঠান; \texttt{\detokenize{\listfiles}}
প্যাকেজের সংস্করণ লিখে রাখে।

আমাদের সঙ্গে যোগাযোগ করতে পারেন
\href{https://github.com/Neehan/LaTeXbangla/issues}{GitHub Issues}-এ বা
\href{https://groups.google.com/g/latexbangla}{\texttt{latexbangla@googlegroups.com}}-এ।

\smallskip
{\small স্বত্ব ২০১৬, ২০২৬ আদীব হাসান।
\href{https://www.latex-project.org/lppl.txt}{\LaTeX{} Project Public License 1.3c বা পরবর্তী সংস্করণে}
প্রকাশিত। এই নির্দেশিকায় বাংলায় Kalpurush ও ইংরেজি মূল লেখায় TeX Gyre Pagella
ব্যবহার করা হয়েছে; প্রথম উদাহরণের ইংরেজি ফন্ট TeX Gyre Adventor।
ফন্টের তুলনায় Noto Sans Bengali ও Siyam Rupali-ও ব্যবহার করা হয়েছে।}
\clearpage
% This manual contains separate language guides in one document. Polyglossia
% supplies Assamese captions and dates; the local alphabet matches the
% package's Assamese mode without changing the document-wide package option.
\selectlanguage{assamese}
\makeatletter
\let\@alph\manualassamesealph
\let\@Alph\manualassamesealph
\makeatother
\renewcommand{\sectionautorefname}{পৰিচ্ছেদ}
\renewcommand{\subsectionautorefname}{উপপৰিচ্ছেদ}
\renewcommand{\equationautorefname}{সমীকৰণ}
\renewcommand{\tableautorefname}{সাৰণী}
\renewcommand{\footnoteautorefname}{পাদটীকা}
\renewcommand{\itemautorefname}{পদ}
\renewcommand{\theHsection}{assamese.\number\value{section}}
\renewcommand{\theHtable}{assamese.\number\value{table}}
\renewcommand{\theHequation}{assamese.\number\value{equation}}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{table}{0}
\renewcommand{\manualcodetitle}{কোড}
\renewcommand{\manualresulttitle}{ফলাফল}
\fancyhead[R]{\small\sffamily\color{BanglaInk}সংস্কৰণ ২.১\quad ব্যৱহাৰ নিৰ্দেশিকা}
\hypertarget{guide-assamese}{}
\phantomsection\label{manual:assamese}
\addcontentsline{toc}{part}{অসমীয়া ব্যৱহাৰ নিৰ্দেশিকা}
\thispagestyle{empty}
\begin{center}
\includegraphics[width=0.66\linewidth]{logo.png}\\[2pt]
{\Large\sffamily\color{BanglaGreen}চিনাকি \LaTeX\ কমাণ্ডেৰে বাংলা আৰু অসমীয়া লিখক}\\[5pt]
{আদীব হাসান}\\[2pt]
{\small\href{https://groups.google.com/g/latexbangla}{\texttt{latexbangla@googlegroups.com}}}\\[3pt]
{২৪ অক্টোবৰ ২০২৬\quad\textcolor{BanglaRed}{\textbullet}\quad সংস্কৰণ ২.১}
\end{center}

\LaTeX{}bangla হৈছে চিনাকি \LaTeX\ কমাণ্ডেৰে বাংলা বা অসমীয়া নথি লিখাৰ এটা
পেকেজ। অসমীয়া বা বাংলাৰ লগতে ইংৰাজী লিখিবলৈ, \verb|\textbf| ব্যৱহাৰ কৰি
লেখা গাঢ় কৰিবলৈ, আৰু তালিকা, সমীকৰণ বা প্ৰসংগৰ উল্লেখ দিবলৈ আগৰ
কমাণ্ডবোৰেই ব্যৱহাৰ কৰিব পাৰে। প্ৰতিটো লিপিৰ বাবে পেকেজে উপযুক্ত ফণ্ট
বাছি লয়। পৃষ্ঠাৰ বিন্যাস, ইংৰাজী ফণ্ট আৰু গণিতৰ ফণ্ট আপোনাৰ পছন্দমতে ৰাখিব পাৰে।

\LaTeX{}bangla-ই নথিৰ আন অংশবোৰো নিৰ্বাচিত ভাষাত সজায়। তাৰিখ আৰু প্ৰসংগৰ
নাম স্বয়ংক্ৰিয়ভাৱে অনূদিত হয়।
তালিকাত ১ আৰু (ক)-ৰ দৰে নম্বৰ আহে; সংখ্যাভিত্তিক উদ্ধৃতিতো একেই অংক ব্যৱহাৰ হয়।
fontspec আৰু Polyglossia-ৰ ওপৰত নিৰ্মিত পেকেজটো \hologo{XeLaTeX} আৰু \hologo{LuaLaTeX}-ত চলে
আৰু LPPL 1.3c বা পৰৱৰ্তী সংস্কৰণৰ অধীনত প্ৰকাশিত মুক্ত ছফ্টৱেৰ।

আৰম্ভ কৰিবলৈ \href{https://www.overleaf.com/project/6adbaac1d48d9344680c2fe1/share\#6b9d2d41b2de0b80c2de0d11c68ce7c79f33cbe1edef7ec7}{Overleaf ডেমোটো} ব্যৱহাৰ কৰিব পাৰে।
বাংলা বা অসমীয়াত কিতাপ লিখিবলৈ সহযোগী
\href{https://github.com/Neehan/BOOKbangla}{BOOKbangla ডকুমেণ্ট ক্লাছটো} চাওক।

\section{সোনকালে আৰম্ভ কৰক}
হালনাগাদ \TeX{} Live 2024 বা পৰৱৰ্তী সংস্কৰণত \textbf{\hologo{XeLaTeX} অথবা \hologo{LuaLaTeX}}
ব্যৱহাৰ কৰি কম্পাইল কৰক। \autoref{as:sec:fonts}-ৰ তালিকাৰ এটা ফণ্ট ইনষ্টল কৰি
preamble-ত এইদৰে ফণ্ট বাছক:
\begin{tcolorbox}[manualbox,title=ন্যূনতম নথি]
\begin{code}
\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Adventor} % ঐচ্ছিক; ইংৰাজী ফণ্ট অক্ষুণ্ণ থাকে।
\usepackage[language=assamese]{latexbangla}
\setbanglamainfont{Kalpurush}
\begin{document}
  % ইয়াত লিখক।
\end{document}
\end{code}
\end{tcolorbox}
তলৰ কোডখিনি \verb|\begin{document}| আৰু \verb|\end{document}|-ৰ মাজত লিখক।
গাঢ় আৰু হেলনীয়া লেখাতো ইংৰাজী অংশই Adventor-ৰ জ্যামিতিক sans serif ৰূপ ৰাখে।
প্ৰতিটো ফলাফলৰ বাকচত কাষত দেখুওৱা কোডখিনিয়েই চলোৱা হৈছে।
\begingroup
\let\rmfamilylatin\manualexampleenglishfont
\assamesefont
\begin{examplepair}
অসমীয়া and English একেটা অনুচ্ছেদত।

English keeps its own typeface.

\textbf{গুৰুত্বপূৰ্ণ: read this.}
\textit{অসমীয়া আৰু English একেলগে।}
\end{examplepair}
\endgroup

\subsection{কেৱল fontspec ব্যৱহাৰ কৰি একেটা অনুচ্ছেদ}
ইংৰাজী নথিত মাজে মাজে অসমীয়া লিখিবলৈ কেৱল fontspec-য়েই যথেষ্ট হ'ব পাৰে।
ওপৰৰ অনুচ্ছেদটো একেদৰে দেখুৱাবলৈ তলৰ সম্পূৰ্ণ নথিখন ব্যৱহাৰ কৰিব পাৰে।
অসমীয়াৰ বাবে এটা ফণ্ট ঘোষণা কৰক, Kalpurush-ৰ কৃত্ৰিম গাঢ় আৰু হেলনীয়া ৰূপ
নিৰ্ধাৰণ কৰক, আৰু প্ৰতিটো অসমীয়া অংশ সেই ফণ্টৰ গোটৰ ভিতৰত ৰাখক। গোটৰ বাহিৰত
ইংৰাজীয়ে Adventor ব্যৱহাৰ কৰি থাকে। \hologo{LuaLaTeX}-ত যুক্তাক্ষৰ আৰু আখৰৰ অৱস্থান
সঠিকভাৱে দেখুৱাবলৈ HarfBuzz-ও সক্ৰিয় কৰক:
\begin{tcolorbox}[manualbox,title=\LaTeX{}bangla অবিহনে]
\begin{code}
\documentclass{article}
\usepackage{fontspec,iftex}
\setmainfont{TeX Gyre Adventor}
\ifluatex\defaultfontfeatures{Renderer=HarfBuzz}\fi
\newfontfamily\assamesetext[
  Script=Bengali,
  AutoFakeBold=4,
  AutoFakeSlant=0.2
]{Kalpurush}
\begin{document}
{\assamesetext অসমীয়া} and English
{\assamesetext একেটা অনুচ্ছেদত।}

English keeps its own typeface.

\textbf{{\assamesetext গুৰুত্বপূৰ্ণ:} read this.}
\textit{{\assamesetext অসমীয়া আৰু} English
  {\assamesetext একেলগে।}}
\end{document}
\end{code}
\end{tcolorbox}
\LaTeX{}bangla-ই ফণ্ট সলনি আৰু এই ৰূপবোৰৰ ছেটিং নিজেই কৰে, সেয়ে মিশ্ৰ
অনুচ্ছেদটো পোনপটীয়াকৈ লিখিব পাৰে। ওপৰৰ উদাহৰণটোৱে কেৱল লেখাৰ ৰূপ মিলায়;
পিছত দেখুওৱা ক্ৰমসংখ্যা আৰু নথিৰ অনূদিত নামবোৰো \LaTeX{}bangla-ৰ ভাষা-সমৰ্থনৰ অংশ।

\textbf{নিজৰ কম্পিউটাৰত ইনষ্টল কৰক।}
\href{https://github.com/Neehan/LaTeXbangla/tree/master/latexbangla}{ৰিপ'জিটৰীৰ \pkg{latexbangla/} ফ'ল্ডাৰৰ}
সকলো ফাইল আৰু উপফ'ল্ডাৰ মূল নথিৰ কাষত কপি কৰক; উপফ'ল্ডাৰৰ গঠন অক্ষুণ্ণ ৰাখক।

\section{ফণ্ট আৰু লেখাৰ ৰূপ বাছক}\label{as:sec:fonts}
\subsection{পৰীক্ষিত ফণ্টসমূহ}
ফণ্টৰ নামটো \verb|\setbanglamainfont{...}|-ত লিখক। তলৰ ফণ্টবোৰ বাংলা আৰু
অসমীয়া দুয়োটা ভাষাতে পৰীক্ষা কৰা হৈছে। নমুনা তুলনা কৰিবলৈ
\href{https://github.com/Neehan/LaTeXbangla}{ৰিপ'জিটৰীত থকা} ফণ্ট নিৰ্দেশিকাখন চাব পাৰে।
আন ফণ্টো কাম কৰিব পাৰে, কিন্তু সেইবোৰ পৰীক্ষা কৰা হোৱা নাই।
\begin{table}[H]
\centering\small
\caption{পৰীক্ষিত ফণ্টৰ পূৰ্বনিৰ্ধাৰিত ছেটিং।}\label{as:tab:font-defaults}
\begin{tabularx}{\linewidth}{@{}lXXrr@{}}
\toprule
\textbf{ফণ্টৰ নাম} & \textbf{পূৰ্বনিৰ্ধাৰিত গাঢ়} & \textbf{পূৰ্বনিৰ্ধাৰিত হেলনীয়া} & \textbf{Scale} & \textbf{WordSpace} \\
\midrule
\texttt{Kalpurush} & কৃত্ৰিম ৪ & কৃত্ৰিম ০.২ & ১ & ১ \\
\texttt{SolaimanLipi} & কৃত্ৰিম ৪ & কৃত্ৰিম ০.২ & ০.৯ & ১.৩৩ \\
\texttt{Siyam Rupali} & কৃত্ৰিম ৪.৫ & কৃত্ৰিম ০.২ & ০.৮ & ১.১২ \\
\texttt{Noto Serif Bengali} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ১ & ১.৩ \\
\texttt{Noto Sans Bengali} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ১ & ১.২ \\
\texttt{Anek Bangla} & কৃত্ৰিম ৪ & কৃত্ৰিম ০.২ & ০.৯ & ২.১ \\
\texttt{Tiro Bangla} & কৃত্ৰিম ৩.৫ & নিজস্ব ৰূপ & ০.৯ & ১.৩৯ \\
\texttt{Galada} & কৃত্ৰিম ৩.৫ & কৃত্ৰিম ০.২ & ০.৯ & ১.৬৭ \\
\texttt{Hind Siliguri} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ০.৯ & ১.৬৪ \\
\texttt{Nikosh} & কৃত্ৰিম ৩.৫ & কৃত্ৰিম ০.২ & ১ & ১.৩৭ \\
\texttt{Kohinoor Bangla} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ০.৯ & ১.২৯ \\
\texttt{Mukti} & নিজস্ব ৰূপ & নিজস্ব ৰূপ & ০.৯ & ১.৩৩ \\
\texttt{Baloo Da 2} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ০.৯ & ১.৮৬ \\
\texttt{Lohit Bengali} & কৃত্ৰিম ৫.৫ & কৃত্ৰিম ০.২ & ০.৯ & ১.৩৩ \\
\texttt{Jamrul} & কৃত্ৰিম ২.৫ & কৃত্ৰিম ০.২ & ০.৯ & ০.৪৩ \\
\texttt{Likhan} & কৃত্ৰিম ৩.৫ & কৃত্ৰিম ০.২ & ০.৯ & ০.৯৭ \\
\texttt{Shimanto} & কৃত্ৰিম ৩.৫ & কৃত্ৰিম ০.২ & ১ & ১.১১ \\
\texttt{Mina} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ০.৯ & ১.০৩ \\
\texttt{AdorshoLipi} & কৃত্ৰিম ৪ & কৃত্ৰিম ০.২ & ০.৮ & ১.১৭ \\
\texttt{BenSen} & কৃত্ৰিম ৪ & কৃত্ৰিম ০.২ & ১.১ & ১.৩২ \\
\texttt{BenSenHandwriting} & কৃত্ৰিম ৩.৫ & কৃত্ৰিম ০.২ & ১ & ১.৩২ \\
\texttt{Atma} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ১ & ১.৭৯ \\
\texttt{Alkatra} & কৃত্ৰিম ৪.৫ & কৃত্ৰিম ০.২ & ০.৯ & ১.৩৬ \\
\texttt{Shonar Bangla} & নিজস্ব ৰূপ & কৃত্ৰিম ০.২ & ১.১ & ১.৪৭ \\
\texttt{FreeSerif} & কৃত্ৰিম ৩.৫ & নিজস্ব ৰূপ & ১ & ১.৩৩ \\
\bottomrule
\end{tabularx}
\end{table}

\begin{tcolorbox}[manualwarning]
Anek Bangla নামৰ দ্বাৰা লোড নহ'লে TTF ফাইলটো \texttt{AnekBangla-VF.ttf} নামেৰে
নথিৰ কাষত ৰাখি \verb|\setbanglamainfont{AnekBangla-VF.ttf}| লিখক।
Mukti-ৰ সংস্কৰণ ৩ আৰু Baloo Da 2-ৰ static ফণ্ট ফাইল ব্যৱহাৰ কৰক।
Alkatra-ৰ TTF ফাইলটো \texttt{Alkatra-VF.ttf} নামেৰে ৰাখি ফাইলৰ নামেৰে লোড কৰক।
Jamrul ০.১ আৰু Likhan ০.৬-ত স্বতন্ত্ৰ ৎ (U+09CE) আখৰটো নাই।
Shimanto ১.০-ত পোনপটীয়াকৈ ZWJ/ZWNJ ব্যৱহাৰ কৰিলে \hologo{XeLaTeX}-এ গ্লিফ নথকাৰ বাৰ্তা দিয়ে।
\end{tcolorbox}

\subsection{অসমীয়া ভাষা বাছনি}
অসমীয়া নথিৰ বাবে \texttt{language=assamese} বাছক। ফণ্টৰ কমাণ্ডবোৰ একেই
থাকে: সেইবোৰে নিৰ্বাচিত ভাষাৰ মূল, sans আৰু mono ফণ্ট নিৰ্ধাৰণ কৰে।
বাংলা পূৰ্বনিৰ্ধাৰিত ভাষা, সেয়ে আগৰ বাংলা নথিত একো সলনি কৰিব নালাগে।
\begin{code}
\usepackage[language=assamese]{latexbangla}
\setbanglamainfont{Noto Serif Bengali}
\end{code}
কেপচন, তাৰিখ আৰু প্ৰসংগৰ নাম অসমীয়া হয়। দশমিক কাউণ্টাৰত একেই অংক
ব্যৱহাৰ হয়; বৰ্ণভিত্তিক লেবেলত অসমীয়া ক্ৰম অনুসৰি ৰ আৰু ৱ-ও থাকে।
দুয়োটা ভাষাৰ ক্ৰমসংখ্যাৰ বিকল্পবোৰ \autoref{as:sec:numbering}-ত ব্যাখ্যা কৰা হৈছে।

সম্পূৰ্ণ নথি আৰু অনূদিত নামবোৰ চাবলৈ
\href{https://github.com/Neehan/LaTeXbangla/blob/master/examples/assamese.pdf}
{অসমীয়া উদাহৰণটো} চাওক। এই নিৰ্দেশিকাৰ বাকী উদাহৰণবোৰ অসমীয়াত দিয়া হৈছে;
একে কমাণ্ডবোৰ বাংলাতো প্ৰযোজ্য।

\subsection{অসমীয়া আৰু ইংৰাজীৰ পৃথক ফণ্ট}
অসমীয়া আৰু ইংৰাজী একেলগে ৰাখিও মূল লেখা, শিৰোনাম আৰু টাইপৰাইটাৰৰ দৰে
লেখাৰ বাবে পৃথক ৰূপ বাছিব পাৰে। ইয়াত মূল লেখাৰ বাবে Kalpurush আৰু Pagella,
sans serif-ৰ বাবে Noto Sans Bengali আৰু Heros, আৰু mono-ৰ বাবে Siyam Rupali
আৰু Cursor বাছি লোৱা হৈছে। এই ছেটিংবোৰ preamble-ত, অৰ্থাৎ
\verb|\begin{document}|-ৰ আগত লিখক:
\begin{tcolorbox}[manualbox,title=পৃথক ফণ্ট বাছনি]
\begin{code}
\setbanglamainfont{Kalpurush}
\setbanglasansfont{Noto Sans Bengali}
\setbanglamonofont{Siyam Rupali}
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}
\end{code}
\end{tcolorbox}
এতিয়া আগৰ দৰেই \verb|\textrm|, \verb|\textsf| আৰু \verb|\texttt| ব্যৱহাৰ কৰক।
প্ৰতিটো কমাণ্ডে সংশ্লিষ্ট ফণ্টৰ যোৰ বাছে; গাঢ় আৰু হেলনীয়া ৰূপো কাম কৰে:
\begingroup
\let\assamesefontsf\manualsansfont
\let\assamesefonttt\manualmonofont
\begin{examplepair}
অসমীয়া আৰু English।\\
\textbf{গাঢ় আৰু bold।}\\
\textit{হেলনীয়া আৰু italic।}

\textsf{অসমীয়া আৰু English।}\\
\textsf{\textbf{গাঢ় আৰু bold।}}\\
\textsf{\textit{হেলনীয়া আৰু italic।}}

\texttt{অসমীয়া আৰু English।}\\
\texttt{\textbf{গাঢ় আৰু bold।}}\\
\texttt{\textit{হেলনীয়া আৰু italic।}}
\end{examplepair}
\endgroup
অসমীয়া বা ইংৰাজী অংশ পৃথককৈ চিহ্নিত নকৰাকৈ একেখিনি লেখা তিনিটা ৰূপত দেখা যায়।
Siyam Rupali-ৰ আখৰৰ স্বাভাৱিক প্ৰস্থ অক্ষুণ্ণ থাকে; mono-ৰ বাবে বাছিলেই
ফণ্টটোৰ সকলো আখৰ সমান বহল নহয়।

পৃথক ফণ্ট বাছনি ঐচ্ছিক: এটা মূল ফণ্টে তিনিওটা ভূমিকা পালন কৰিব পাৰে,
আৰু ইংৰাজী ফণ্ট সলনি নকৰিলে আগৰ ফণ্টেই থাকে। অসমীয়া আৰু ইংৰাজীৰ ফণ্ট
কমাণ্ড যিকোনো ক্ৰমত লিখিব পাৰে; প্ৰতিটোৱে কেৱল নিজৰ ভূমিকাৰ ফণ্ট সলনি কৰে।

\subsection{লেখাৰ এটা অংশত পৃথক ইংৰাজী ফণ্ট}
কোনো উদ্ধৃতি বা চুটি মন্তব্যৰ বাবে পৃথক ইংৰাজী ফণ্ট বাছিব পাৰে।
কেৱল সেই অংশ সলনি কৰিবলৈ দ্বিতীয় বন্ধনীৰ ভিতৰত \verb|\fontspec{...}| দিয়ক।
অসমীয়া নিৰ্ধাৰিত ফণ্টতেই থাকে; গোট শেষ হ'লে আগৰ ইংৰাজী ফণ্ট ঘূৰি আহে।
\begin{examplepair}
This is the main font.
অসমীয়া নিজৰ ফণ্টতেই থাকে।

{\fontspec{TeX Gyre Adventor}
This passage has its own voice.
অসমীয়া নিজৰ ফণ্টতেই থাকে।
\textit{Emphasis works too.}\par}

The main font returns.
অসমীয়া নিজৰ ফণ্টতেই থাকে।
\end{examplepair}
একে ফণ্ট বাৰে বাৰে ব্যৱহাৰ কৰিবলৈ preamble-ত এটা কমাণ্ড তৈয়াৰ কৰক:
\begin{code}
\newfontfamily\quotefont{TeX Gyre Adventor}
\end{code}
তাৰ পিছত লেখাত \verb|{\quotefont ...}| ব্যৱহাৰ কৰক।

স্বয়ংক্ৰিয় ফণ্ট সলনিয়ে লেখাৰ ভাষা বা শাৰীৰ শেষত হাইফেন দি শব্দ ভঙাৰ নিয়ম
সলনি নকৰে। ইংৰাজী অংশত ইংৰাজীৰ নিয়ম ব্যৱহাৰ কৰিবলৈ preamble-ত
\verb|\setotherlanguage{english}| দিয়ক, তাৰ পিছত \verb|\textenglish{...}| ব্যৱহাৰ কৰক।

\subsection{ফণ্টৰ ছেটিং নিজৰ মতে সলনি কৰক}
আন ফণ্টৰ সৈতে আকাৰ মিলাবলৈ, শব্দৰ মাজৰ ফাঁক সলনি কৰিবলৈ বা নিজৰ প্ৰকল্পৰ
ফণ্ট ফাইল ব্যৱহাৰ কৰিবলৈ ফণ্ট বাছনিৰ কমাণ্ডত fontspec-ৰ বিকল্প দিয়ক।
তিনিওটা কমাণ্ডতে ফণ্টৰ নামৰ আগত বা পিছত বিকল্প লিখিব পাৰে:
\begin{code}
\setbanglamainfont[features]{font}
\setbanglamainfont{font}[features]
\end{code}
পূৰ্বনিৰ্ধাৰিত ছেটিংত \pkg{Script=Bengali} থাকে; \hologo{LuaLaTeX}-ত
\pkg{Renderer=HarfBuzz}-ও থাকে। আপোনাৰ দিয়া মানে পূৰ্বনিৰ্ধাৰিত মানৰ ঠাই লয়।
উদাহৰণস্বৰূপে, আকাৰ আৰু শব্দৰ ফাঁক সলনি কৰিবলৈ বা ফাইলৰ পৰা ফণ্ট ল'বলৈ লিখক:
\begin{code}
\setbanglamainfont[Scale=1.05,WordSpace=1.1]{Kalpurush}
\setbanglamainfont[Path=fonts/]{fontkalpurush.ttf}
\end{code}
\pkg{WordSpace=1.1}-এ ফণ্টৰ নিজস্ব শব্দৰ ফাঁক ১০\% বঢ়ায়;
\autoref{as:tab:font-defaults}-ৰ পূৰ্বনিৰ্ধাৰিত গুণকৰ সলনি এই মান ব্যৱহাৰ হয়।
তালিকাত নথকা ফণ্টৰ নিজস্ব আকাৰ আৰু শব্দৰ ফাঁক অক্ষুণ্ণ থাকে।
Small caps আৰু আন ৰূপৰ উপলব্ধতা ফণ্টৰ ওপৰত নিৰ্ভৰ কৰে।
পৰিচিত ফণ্টৰ নাম আৰু প্ৰচলিত ফাইলৰ নামৰ পৰা ছেটিং চিনাক্ত কৰা হয়;
ফাইলৰ নাম সলনি কৰিলে সাধাৰণ ছেটিং প্ৰযোজ্য হয়। পৃথক ফাইলৰ পৰা ৰূপ
বাছিবলৈ \pkg{UprightFont}, \pkg{BoldFont}, \pkg{ItalicFont} আৰু \pkg{BoldItalicFont} ব্যৱহাৰ কৰক।

\section{গাঢ় আৰু হেলনীয়া লেখা নিয়ন্ত্ৰণ}
কোনো সংজ্ঞা চকুত পৰাকৈ দেখুৱাবলৈ \verb|\textbf| আৰু বিশেষ গুৰুত্ব দিবলৈ
\verb|\textit| ব্যৱহাৰ কৰক। ফণ্টৰ নিজস্ব গাঢ় বা হেলনীয়া ৰূপত নিৰ্বাচিত
ভাষাৰ আখৰ থাকিলে \LaTeX{}bangla-ই সেই ৰূপেই লয়; নাথাকিলে ৰেখা মোটা কৰি
বা হেলনীয়া কৰি ৰূপটো তৈয়াৰ কৰে। পৰীক্ষিত ছেটিংবোৰ
\autoref{as:tab:font-defaults}-ত দিয়া আছে। তালিকাত নথকা ফণ্টৰ বাবে কৃত্ৰিম
গাঢ় কৰাৰ মাত্ৰা ২.৫ আৰু হেলনীয়া কৰাৰ মাত্ৰা ০.২।

কৃত্ৰিম গাঢ় লেখা অধিক স্পষ্ট কৰিবলৈ \pkg{AutoFakeBold}-ৰ মান বঢ়াওক।
গাঢ়-হেলনীয়া লেখাতো একে মাত্ৰা ৰাখিবলৈ লগতে \pkg{AutoFakeSlant} দিয়ক।
তলৰ উদাহৰণত গাঢ় কৰাৰ মাত্ৰা ৫ ব্যৱহাৰ কৰি চাৰিটা ৰূপ দেখুওৱা হৈছে:
\begin{tcolorbox}[manualbox,title=গাঢ় আৰু হেলনীয়া ৰূপৰ ছেটিং (preamble)]
\begin{code}
\setbanglamainfont[
  AutoFakeBold=5,
  AutoFakeSlant=0.2
]{Kalpurush}
\end{code}
\end{tcolorbox}
\begingroup
\let\assamesefont\manualstrongfont
\assamesefont
\begin{examplepair}
সাধাৰণ লেখা।

\textbf{গাঢ় লেখা।}

\textit{হেলনীয়া লেখা।}

\textbf{\textit{গাঢ় আৰু হেলনীয়া।}}
\end{examplepair}
\endgroup
নিজে \pkg{AutoFakeBold} দিলে ফণ্টৰ নিজস্ব গাঢ় ৰূপ থাকিলেও কৃত্ৰিম গাঢ়
ৰূপ ব্যৱহাৰ হয়। বিকল্পটো সংখ্যাৰ সৈতে দিয়ক: কেৱল \pkg{AutoFakeBold}
লিখিলে fontspec-এ ১.৫ ধৰে, \LaTeX{}bangla-ৰ ফণ্ট অনুসৰি নিৰ্ধাৰিত মান নলয়।

গাঢ় আৰু গাঢ়-হেলনীয়া ৰূপ পৃথককৈ সলনি কৰিবলৈও fontspec-ৰ বিকল্প ব্যৱহাৰ কৰিব পাৰে:
\begin{code}
\setbanglamainfont[
  BoldFeatures={FakeBold=5},
  BoldItalicFeatures={FakeBold=5,FakeSlant=0.2}
]{Kalpurush}
\end{code}
কৃত্ৰিম ৰূপৰ প্ৰয়োজন হোৱা ফণ্টত এই বিকল্পবোৰ বিশেষ উপযোগী। পৰীক্ষিত ছেটিং
আৰু ফণ্টৰ নিজস্ব ৰূপৰ স্বয়ংক্ৰিয় বাছনি বিচাৰিলে অতিৰিক্ত বিকল্প নিদিয়াকৈ ফণ্ট বাছক।

\subsection{যতিচিহ্ন, তালিকাৰ বুলেট আৰু পাদটীকা}
মিশ্ৰ লেখাতো যতিচিহ্ন আৰু পাদটীকা আগৰ দৰেই ব্যৱহাৰ কৰিব পাৰে। পোনপটীয়াকৈ
লিখা ডেশ্ব, বক্ৰ উদ্ধৃতিচিহ্ন আৰু তিনিবিন্দু (…) ইংৰাজী ফণ্টৰ পৰা আহে।
নিৰ্বাচিত ফণ্টত নথকা সাধাৰণ বুলেট আৰু প্ৰতীকভিত্তিক পাদটীকাৰ চিহ্নও
ইংৰাজী ফণ্টৰ পৰা লোৱা হয়। সাধাৰণ পাদটীকাত অসমীয়া অংক ব্যৱহাৰ হয়;
ৰোমান সংখ্যা বা প্ৰতীকভিত্তিক বিন্যাস বাছিলে সেই বিন্যাস অক্ষুণ্ণ থাকে।
\begin{examplepair}
“অসমীয়া”—English… আকৌ অসমীয়া।
\begin{itemize}
  \item এটা কথা।
  \item আন এটা কথা।
\end{itemize}
এটা তথ্য\footnote{চমু ব্যাখ্যা।}
\end{examplepair}

\section{ক্ৰমসংখ্যা, তালিকা আৰু নিজস্ব কাউণ্টাৰ}\label{as:sec:numbering}
উপপ্ৰশ্নসহ এটা অনুশীলনী লিখিবলৈ সাধাৰণ তালিকাৰ ভিতৰত আন এখন তালিকা
ব্যৱহাৰ কৰক। \LaTeX{}bangla-ই অসমীয়া লেবেল দিয়ে, সেয়ে গোটেই নথিতে
চিনাকি তালিকাৰ কমাণ্ডবোৰেই ব্যৱহাৰ কৰিব পাৰে।

পূৰ্বনিৰ্ধাৰিত বিকল্প হৈছে \pkg{changecounternumbering=true}: দশমিক কাউণ্টাৰত
নিজৰ ভাষাৰ অংক আহে, আৰু \verb|\alph| আৰু \verb|\Alph|-ত নিৰ্বাচিত ভাষাৰ
বৰ্ণ ব্যৱহাৰ হয়। কাউণ্টাৰৰ মান, গণনা পুনৰ আৰম্ভ কৰাৰ নিয়ম আৰু যৌগিক নম্বৰৰ
গঠন একেই থাকে। ৰোমান সংখ্যা আৰু প্ৰতীকভিত্তিক বিন্যাসো সলনি নহয়। এই অসমীয়া
নিৰ্দেশিকাত পৰিচ্ছেদ, উপপৰিচ্ছেদ আৰু পৃষ্ঠাৰ নম্বৰসহ সকলো সাধাৰণ কাউণ্টাৰত অসমীয়া অংক
ব্যৱহাৰ কৰা হৈছে। সাধাৰণ \pkg{enumerate}-ৰ চাৰিটা স্তৰত ক্ৰমে ১., (ক), i.
আৰু ক. আহে; পৰিশিষ্টৰ নম্বৰ হয় পৰিশিষ্ট ক-ৰ দৰে।
\begin{examplepair}
\begin{enumerate}
  \item এটা আয়তক্ষেত্ৰৰ দৈৰ্ঘ্য ৪,
    প্ৰস্থ ৩ একক।
  \begin{enumerate}
    \item কালি কিমান?
    \item কৰ্ণৰ দৈৰ্ঘ্য কিমান?
  \end{enumerate}
\end{enumerate}
\end{examplepair}

\subsection{নিজস্ব কাউণ্টাৰো পোনপটীয়াকৈ কাম কৰে}
অনুশীলনীৰ নম্বৰ দিবলৈ আগৰ দৰেই এটা কাউণ্টাৰ তৈয়াৰ কৰক।
\verb|\refstepcounter|-এ মান এক বঢ়ায় আৰু \verb|\label| আৰু \verb|\ref|-ৰ
ব্যৱস্থা কৰে; \verb|\stepcounter|-এ কেৱল মান বঢ়ায়।
\begin{examplepair}
\newcounter{asexercise}
\setcounter{asexercise}{11}
\refstepcounter{asexercise}
\label{as:ex:custom}
অনুশীলনী \theasexercise।\par
\renewcommand{\theasexercise}
  {\alph{asexercise}}
\setcounter{asexercise}{2}
অনুশীলনী \theasexercise।
\end{examplepair}
ইয়াত \texttt{[section]}-এ প্ৰতিটো পৰিচ্ছেদত কাউণ্টাৰটো শূন্য কৰে;
\verb|\theproblem|-ৰ সংজ্ঞাই মুদ্ৰিত নম্বৰত পৰিচ্ছেদৰ নম্বৰ যোগ কৰে:
\begin{code}
\newcounter{problem}[section]
\renewcommand{\theproblem}{\thesection.\arabic{problem}}
\end{code}
\verb|\arabic|, \verb|\alph| বা \verb|\Alph| ব্যৱহাৰ নকৰা বিন্যাসে নিজৰ
ফলাফল অক্ষুণ্ণ ৰাখে।

\subsection{নিৰ্দিষ্ট কাউণ্টাৰৰ নম্বৰ ইংৰাজীত ৰাখক}
নথিৰ বাকী নম্বৰ অসমীয়াত ৰাখিও এটা কাউণ্টাৰৰ নম্বৰ ইংৰাজীত লিখিব পাৰে।
সেই কাউণ্টাৰৰ প্ৰসংগ উল্লেখ কৰোঁতেও একেই বিন্যাস থাকে:
\begin{examplepair}
\renewcommand{\theasexercise}
  {\number\value{asexercise}}
\refstepcounter{asexercise}
\label{as:ex:western}
অনুশীলনী \theasexercise।\par
অনুশীলনী~\ref{as:ex:western} চাওক।
\end{examplepair}
ইংৰাজী বৰ্ণৰ বাবে preamble-ত \verb|\usepackage{alphalph}| লিখক। ইয়াৰ
\verb|\alphalph| বিন্যাসে a, b, \ldots, z, aa, \ldots\ দিয়ে;
\verb|\AlphAlph|-এ ডাঙৰ হাতৰ বৰ্ণ দিয়ে। তলত সংজ্ঞাটো তালিকাৰ পৰিৱেশৰ
ভিতৰত থকাৰ বাবে কেৱল এই তালিকাৰ নম্বৰহে সলনি হয়:
\begin{examplepair}
\begin{enumerate}
  \renewcommand{\theenumi}
    {\alphalph{\value{enumi}}}
  \item প্ৰথম।\label{as:item:latin}
  \item দ্বিতীয়।
\end{enumerate}
পদ~\ref{as:item:latin} চাওক।
\end{examplepair}
এই তালিকাত 1, 2, \ldots\ বিচাৰিলে তাৰ সলনি \verb|\number\value{enumi}| লিখক।
নিজৰ কাউণ্টাৰৰ বাবে \verb|\theasexercise|-ৰ সংজ্ঞাত
\verb|\alphalph{\value{asexercise}}| দিয়ক। পিছৰ তালিকাবোৰৰ লেবেল অসমীয়াতে থাকে।
এই সলনি কেৱল নম্বৰৰ বাবে; \verb|\autoref|-এ দিয়া অনূদিত নাম সলনি নহয়।

\subsection{একাধিক বৰ্ণৰ লেবেল}
দুয়োটা ভাষাতে বৰ্ণভিত্তিক লেবেল ক-ৰ পৰা য়-লৈ চলে: বাংলাত ৩৫টা আৰু অসমীয়াত
৩৭টা বৰ্ণ ব্যৱহাৰ হয়। শূন্যৰ বাবে কোনো লেবেল নাথাকে; ঋণাত্মক মান বা
বৰ্ণক্ৰমৰ সীমাতকৈ ডাঙৰ মানত সাধাৰণ \LaTeX-ৰ দৰেই \texttt{Counter too large}
ত্ৰুটি আহে।

অধিক দীঘল তালিকাৰ বাবে \pkg{alphalph} ব্যৱহাৰ কৰি কক, কখ আদি লেবেল দিব পাৰে।
কাউণ্টাৰ ৰূপান্তৰ সক্ৰিয় ৰাখি \LaTeX{}bangla লোড কৰাৰ পিছত preamble-ত লিখক:
\Needspace{7\baselineskip}
\begin{code}
\usepackage{alphalph}
\makeatletter
\newalphalph{\extendedAssamese}{\@alph}{37}
\makeatother
\end{code}
শেষৰ আৰ্গুমেণ্টটো বৰ্ণৰ সংখ্যা; বাংলাৰ বাবে 35 লিখক। যিটো কাউণ্টাৰত একাধিক
বৰ্ণৰ লেবেল বিচাৰে, তাত নতুন বিন্যাসটো ব্যৱহাৰ কৰক; আন কাউণ্টাৰৰ আচৰণ সলনি নহয়:
\begin{examplepair}
\newcounter{asextendedexercise}
\renewcommand{\theasextendedexercise}
  {\extendedAssamese{
    \value{asextendedexercise}}}
\setcounter{asextendedexercise}{37}
\theasextendedexercise,
\stepcounter{asextendedexercise}
\theasextendedexercise,
\stepcounter{asextendedexercise}
\theasextendedexercise
\end{examplepair}
ইয়াত তৈয়াৰ কৰা \verb|\extendedAssamese| বিন্যাসে নিৰ্বাচিত ভাষাৰ বৰ্ণ ব্যৱহাৰ কৰে;
পেকেজৰ নিজস্ব \verb|\alphalph| আৰু \verb|\AlphAlph| কমাণ্ডত ইংৰাজী বৰ্ণই থাকে।

\subsection{স্বয়ংক্ৰিয় বা পোনপটীয়া ৰূপান্তৰ}
\pkg{changecounternumbering=false} দিলে কাউণ্টাৰ আৰু সংখ্যাভিত্তিক উদ্ধৃতিৰ
আগৰ বিন্যাস থাকে; ফণ্ট আৰু অনুবাদ কাম কৰি থাকে:
\begin{code}
\usepackage[language=assamese,changecounternumbering=false]{latexbangla}
\end{code}
এইটো পেকেজৰ বিকল্প; ভাষা সলনি কৰিলে ইয়াৰ মান সলনি নহয়।
আৰম্ভণিৰ শূন্যসহ কোনো কোড লিখিবলৈ, বা স্বয়ংক্ৰিয় ৰূপান্তৰ বন্ধ ৰাখিও
কাউণ্টাৰৰ মান অসমীয়া অংকত দেখুৱাবলৈ লিখক:
\begin{examplepair}
\numtobangla{0012}; \tobangla{asexercise}
\end{examplepair}
কমাণ্ড দুটা expandable। \verb|\numtobangla|-ই কেৱল ইংৰাজী অংক লয় আৰু
আৰম্ভণিৰ শূন্যবোৰ ৰাখে; ধনাত্মক-ঋণাত্মক চিহ্ন বা দশমিক বিন্দু গ্ৰহণ নকৰে।
\verb|\tobangla|-ই কাউণ্টাৰৰ পূৰ্ণসংখ্যা মান নিজৰ ভাষাৰ অংকত লিখে;
শূন্য আৰু ঋণাত্মক মানো চলে। এটা কাউণ্টাৰত ব্যৱহাৰ কৰিবলৈ লিখক:
\begin{code}
\renewcommand{\theasexercise}{\tobangla{asexercise}}
\end{code}

\section{গণিত, সাৰণী আৰু উপপাদ্য}
অসমীয়া পাঠত সূত্ৰৰ ব্যাখ্যা অসমীয়াত লিখিব পাৰে, $x$ আৰু $v$-ৰ দৰে চিনাকি
প্ৰতীক ৰাখিব পাৰে আৰু দুয়োটা লিপিতে সংখ্যা লিখিব পাৰে। যি লিপিত সংখ্যা
দেখুৱাব বিচাৰে, সেই লিপিতে লিখক: লেখা আৰু গণিতত \texttt{12} লিখিলে 12,
\texttt{১২} লিখিলে ১২-ই থাকে। স্বয়ংক্ৰিয় নম্বৰ দিয়াৰ ব্যৱস্থাই সূত্ৰৰ সংখ্যা
সলনি নকৰে। গণিতৰ অসমীয়া অংক মূল ফণ্টৰ পৰা আহে আৰু সূত্ৰত নিজৰ অৱস্থান
অনুসৰি আকাৰ লয়; আন প্ৰতীক গণিতৰ ফণ্টৰ পৰা আহে।

\pkg{amsmath}-ৰ \verb|\text| ব্যৱহাৰ কৰি ৰাশি আৰু এককৰ নাম অসমীয়াত লিখক।
১২ মিটাৰ পথ যাবলৈ ৩ ছেকেণ্ড লাগিলে লিখিব পাৰে:
\begin{examplepair}
\begin{equation}\label{as:eq:speed}
  \text{বেগ}=
  \frac{১২}{৩}=৪\text{ মি./ছে.}
\end{equation}
\[
  x_৩^{২}+\sqrt{৪}=12+১২
\]
\end{examplepair}
সমীকৰণৰ নম্বৰো অসমীয়া অংকত আহে; পিছত \verb|\eqref| ব্যৱহাৰ কৰি তাৰ উল্লেখ
কৰিব পাৰে। ভগ্নাংশ, মূল, মেট্ৰিক্স আৰু সূচকৰ ভিতৰৰ সূচকতো একে অংক লিখিব পাৰে।
এটা অংকৰ বাবে \verb|x^২|-ৰ দৰে বন্ধনী অবিহনে লিখিব পাৰে; একাধিক অংকৰ বাবে
বন্ধনী দিয়ক। গণিত গাঢ় কৰিবলৈ \verb|\boldmath| ব্যৱহাৰ কৰক; কেৱল বাহিৰৰ
\verb|\textbf|-এ গণিত গাঢ় নকৰে। \verb|\mathbb|-ৰ দৰে বিশেষ গাণিতিক বৰ্ণমালাৰ
কমাণ্ডে অসমীয়া অংকৰ বিকল্প নক্সা নাবাছে। আন গাণিতিক প্ৰতীকৰ গাঢ় ৰূপ
আপোনাৰ গণিতৰ ফণ্টৰ ছেটিংৰ ওপৰত নিৰ্ভৰ কৰে।

\subsection{গণিতৰ ফণ্ট পৃথককৈ বাছক}
সূত্ৰৰ ৰূপ সলনি কৰিবলৈ \pkg{unicode-math} ব্যৱহাৰ কৰি পছন্দৰ ফণ্ট বাছক:
\begin{code}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\end{code}
গণিতৰ ফণ্ট বাছনিৰ পৰম্পৰাগত পদ্ধতি ব্যৱহাৰ কৰিলে \pkg{latexbangla}-ৰ
\emph{আগত} \pkg{amsmath,newtxmath} লোড কৰক। গণিতৰ ফণ্ট বাছনি আপোনাৰ হাততে থাকে।

\subsection{সাৰণী আৰু নিজৰ পৰিৱেশ}
সাধাৰণ সাৰণীত অসমীয়া বৰ্ণনাৰ কাষত ইংৰাজী শব্দ আৰু জোখ লিখক। প্ৰতিটো
ঘৰত উপযুক্ত ফণ্ট স্বয়ংক্ৰিয়ভাৱে ব্যৱহাৰ হয়:
\begin{examplepair}
\begin{tabular}{llc}
বাহু & Side & দৈৰ্ঘ্য \\
\hline
প্ৰথম & First & ৩ \\
দ্বিতীয় & Second & ৪
\end{tabular}
\end{examplepair}
\pkg{siunitx} ব্যৱহাৰ কৰি সংখ্যা সজাবলৈ ইংৰাজী অংক ইনপুট হিচাপে দিয়ক;
পোনপটীয়াকৈ অসমীয়া অংক লিখিবলৈ সাধাৰণ লেখাৰ স্তম্ভ ব্যৱহাৰ কৰক।
উপপাদ্যৰ বাবে \pkg{amsthm} ব্যৱহাৰ কৰক। উদাহৰণস্বৰূপে, preamble-ত লিখক:
\begin{code}
\newtheorem{assamesetheorem}{উপপাদ্য}
\end{code}
প্ৰমাণৰ শিৰোনাম নিৰ্বাচিত ভাষাত আহে; নথিৰ class বা theorem style-এ
উপস্থাপনৰ নক্সা নিৰ্ধাৰণ কৰে।
\begin{examplepair}
\begin{assamesetheorem}
\label{as:thm:pythagoras}
সমকোণী ত্ৰিভুজৰ লম্ব বাহু দুটাৰ
দৈৰ্ঘ্য ৩ আৰু ৪ হ'লে অতিভুজৰ দৈৰ্ঘ্য ৫।
\end{assamesetheorem}
\begin{proof}
$৩^{২}+৪^{২}=৫^{২}$।
\end{proof}
\end{examplepair}

\section{লেবেল, প্ৰসংগ আৰু উদ্ধৃতি}
সমীকৰণ, উপপাদ্য বা অনুশীলনীৰ উল্লেখ কৰিবলৈ লেবেল ব্যৱহাৰ কৰিলে পিছত নথি
সলনি কৰিলেও নম্বৰ নিজে নিজে ঠিক থাকে। ইয়াত চিনাকি প্ৰসংগ কমাণ্ডেৰে আগৰ
উদাহৰণবোৰৰ উল্লেখ কৰা হৈছে। নথিৰ class-ৰ অধ্যায়, চিত্ৰ, সাৰণী, সমল, পৰিশিষ্ট আৰু
তথ্যসূত্ৰৰ শিৰোনাম আৰু তাৰিখৰ ৰূপ নিৰ্বাচিত ভাষাত আহে। বাংলা অনুবাদ
Polyglossia-ই দিয়ে; অসমীয়া অনুবাদ \LaTeX{}bangla-ই যোগ কৰে। \pkg{hyperref}
লোড কৰিলে স্বয়ংক্ৰিয় প্ৰসংগৰ নামো অনূদিত হয়। নতুন লেবেল বা উদ্ধৃতি যোগ
কৰাৰ পিছত পুনৰ কম্পাইল কৰক, যাতে প্ৰসংগৰ নম্বৰবোৰ ঠিকভাৱে আহে।
\begin{examplepair}
\autoref{as:eq:speed};
\eqref{as:eq:speed}।

\autoref{as:thm:pythagoras}।
অনুশীলনী \ref{as:ex:custom}।
\end{examplepair}
\verb|\ref|-এ নম্বৰ লিখে, \verb|\eqref|-এ তাৰ চাৰিওফালে বন্ধনী দিয়ে,
আৰু \verb|\autoref|-এ অনূদিত নামসহ উল্লেখ কৰে। নামবোৰৰ ভিতৰত আছে পৰিচ্ছেদ,
উপপৰিচ্ছেদ, সমীকৰণ আৰু পাদটীকা।

আগতে দিয়া নিজৰ প্ৰসংগৰ নাম অক্ষুণ্ণ থাকে। একাধিক উপপাদ্যৰ পৰিৱেশে একে
কাউণ্টাৰ ব্যৱহাৰ কৰিলে প্ৰসংগৰ ধৰণতো hyperref-ৰ সাধাৰণ নিয়ম প্ৰযোজ্য হয়।

\subsection{নাম ইংৰাজীত ৰাখক}
অসমীয়া লিখিও নিৰ্দিষ্ট নাম ইংৰাজীত ৰাখিবলৈ Polyglossia-ৰ প্ৰচলিত caption সলনি কৰাৰ
নিয়ম আৰু hyperref-ৰ প্ৰসংগৰ নাম ব্যৱহাৰ কৰক। পেকেজবোৰ লোড কৰাৰ পিছত
তলৰ অংশ যোগ কৰক। কাউণ্টাৰৰ নম্বৰো ইংৰাজীত বিচাৰিলে
\LaTeX{}bangla-ৰ অপশনত \pkg{changecounternumbering=false} দিয়ক:
\begin{code}
\gappto\captionsassamese{%
  \renewcommand{\chaptername}{Chapter}%
  \renewcommand{\tablename}{Table}%
}
\renewcommand{\sectionautorefname}{Section}
\renewcommand{\tableautorefname}{Table}
\end{code}
বাংলাৰ বাবে \verb|\captionsbengali| ব্যৱহাৰ কৰক।

\subsection{তথ্যসূত্ৰ আৰু উদ্ধৃতি}
\LaTeX{}bangla-ত \pkg{biblatex} আৰু \pkg{natbib} দুয়োটাই ব্যৱহাৰ কৰিব পাৰি।
যিকোনো এটাৰ সৈতে আপোনাৰ তথ্যসূত্ৰৰ \pkg{.bib} ফাইল ব্যৱহাৰ কৰক।

\textbf{biblatex-ৰ সৈতে।} প্ৰথমে \LaTeX{}bangla লোড কৰক, তাৰ পিছত তথ্যসূত্ৰৰ style বাছি লওক:
\begin{code}
\usepackage[language=assamese]{latexbangla}
\setbanglamainfont{Kalpurush}
\usepackage[backend=biber,style=numeric-comp,sorting=none,date=long]{biblatex}
\addbibresource{references.bib}
\usepackage{hyperref}
\end{code}
নমুনা তথ্যসূত্ৰবোৰ \pkg{references.bib} নামেৰে সংৰক্ষণ কৰক। তাৰ পিছত নথিত
\verb|\cite{book,article}| আৰু \verb|\printbibliography| লিখক:
\manualbibliographypair{assamese}{প্ৰসংগ}
নিৰ্বাচিত \LaTeX{} ইঞ্জিন, তাৰ পিছত Biber, আৰু তাৰ পিছত একেই ইঞ্জিন দুবাৰ চলাওক।
নাম আৰু শিৰোনাম লিখাৰ দৰেই থাকে; সংযোগী শব্দ আৰু মাহৰ নামে তথ্যসূত্ৰৰ ভাষা অনুসৰণ কৰে।
সংখ্যা যি অংকত লিখিব, সেই অংকতেই থাকিব: \texttt{2024}ৰ পৰা 2024, আৰু
\texttt{২০২৩}ৰ পৰা ২০২৩। লগত যুক্ত প্ৰত্যয়েও তাক অনুসৰণ কৰে:
\texttt{4th}/\texttt{৪ৰ্থ} আৰু \texttt{2024a}/\texttt{২০২৩ক}। URL আৰু DOI সলনি নহয়।

শব্দবোৰ ইংৰাজীত বিচাৰিলে preamble-ত \verb|\setotherlanguage{english}| দিয়ক আৰু
biblatex-ৰ বিকল্পত \pkg{language=english} আৰু \pkg{autolang=other} যোগ কৰক।

\textbf{natbib-ৰ সৈতে।} বাক্যৰ অংশ হিচাপে উদ্ধৃতিৰ বাবে \verb|\citet|, আৰু
বন্ধনীৰ ভিতৰত উদ্ধৃতিৰ বাবে \verb|\citep| ব্যৱহাৰ কৰক। তথ্যসূত্ৰৰ শব্দ অনুবাদ কৰিবলৈ:
\begin{code}
\usepackage[numbers,sort&compress]{natbib} % Or [authoryear].
\bibliographystyle{plainnatbn}
% In the document:
\citet{book}; \citep{book,article}.
\bibliography{references}
\end{code}
\manualnatbibpair{assamese}
\hologo{BibTeX}-ৰ প্ৰচলিত \pkg{year} আৰু \pkg{journal}-ৰ দৰে field ব্যৱহাৰ কৰক;
Biber-ৰ সলনি \hologo{BibTeX} চলাওক। এই style-বোৰে বৰ্তমানৰ ভাষা অনুসৰণ কৰে;
ইংৰাজীত ৰাখিবলৈ \verb|\setotherlanguage{english}| ঘোষণা কৰাৰ পিছত \pkg{english}
environment ব্যৱহাৰ কৰক।

\begin{tcolorbox}[manualwarning]
প্ৰচলিত \pkg{plainnat}, \pkg{abbrvnat} আৰু \pkg{unsrtnat} style-ৰ ইংৰাজী শব্দ
অনুবাদ নহয়। অনুবাদৰ বাবে সেইবোৰৰ সলনি ক্ৰমে \pkg{plainnatbn},
\pkg{abbrvnatbn} আৰু \pkg{unsrtnatbn} ব্যৱহাৰ কৰক।
আখৰ ভাঙি যোৱা এৰাবলৈ \pkg{abbrvnatbn}-এ বাংলা আৰু অসমীয়াসহ non-ASCII নামৰ প্ৰথম অংশ চমু নকৰে।
\end{tcolorbox}

\subsection{আন পেকেজৰ সৈতে ব্যৱহাৰ}
চিনাকি পেকেজবোৰ ব্যৱহাৰ কৰিয়েই কাম কৰিব পাৰে: গণিতৰ বাবে \pkg{mathtools}
আৰু \pkg{bm}, সাৰণীৰ বাবে \pkg{booktabs}, \pkg{tabularx}, \pkg{longtable} আৰু
\pkg{multirow}। কেপচন সজাবলৈ \pkg{caption} আৰু \pkg{subcaption}, পৃষ্ঠাৰ
ওপৰৰ লেখা সজাবলৈ \pkg{fancyhdr}, শিৰোনামৰ বাবে \pkg{titlesec}, আৰু বাকচত
লেখা ৰাখিবলৈ \pkg{tcolorbox} ব্যৱহাৰ কৰিব পাৰে। এই পেকেজবোৰৰ সৈতে পৰীক্ষা
কৰা হৈছে; প্ৰতিটোৰ বিন্যাস আৰু নক্সা সেই পেকেজেই নিয়ন্ত্ৰণ কৰে।

\Needspace{14\baselineskip}
\hologo{LuaLaTeX}-ত \pkg{amsthm}-ৰ উপপাদ্যৰ শিৰোনামত ``invalid node'' ত্ৰুটি হ’লে
কেৱল শিৰোনামত হাইফেনেচন বন্ধ কৰিবলৈ \pkg{amsthm} লোড কৰাৰ পিছত তলৰ কোড দিয়ক
(BOOKbangla-ত এই সমাধান আগৰে পৰাই আছে):
\begin{code}
\usepackage{iftex,xpatch}
\makeatletter
\ifLuaTeX
  \xpatchcmd{\deferred@thm@head}{\normalfont#1}
    {\normalfont\language=\l@nohyphenation #1}{}
    {\PackageError{amsthm}{Heading patch failed}{}}
\fi
\makeatother
\end{code}

\pkg{cleveref}-ৰ প্ৰসংগৰ নাম আৰু সংযোগী শব্দই স্বয়ংক্ৰিয়ভাৱে বাছনি কৰা
ভাষা অনুসৰণ কৰে। \pkg{amsmath}, \pkg{amsthm} আৰু \pkg{hyperref} ব্যৱহাৰ কৰিলে
সেইবোৰৰ পিছত ইয়াক লোড কৰক।

অসমীয়া আৰু ইংৰাজী ফণ্ট একেলগে ব্যৱহাৰ কৰিও \pkg{microtype} সাধাৰণভাৱে লোড
কৰি আপোনাৰ ইঞ্জিনত উপলব্ধ টাইপোগ্ৰাফীৰ সুবিধাবোৰ ব্যৱহাৰ কৰিব পাৰে।

\section{পুৰণি নথি হালনাগাদ কৰক}
পুৰণি নথিত \pkg{banglamainfont} আৰু \pkg{banglattfont} বিকল্প ৰাখিয়েই কাম
কৰিব পাৰে। নতুন নথিত এই নিৰ্দেশিকাৰ ফণ্ট কমাণ্ডবোৰ ব্যৱহাৰ কৰক। তলৰ
তালিকাত পুৰণি ছেটিংৰ সমতুল্য নতুন কমাণ্ড দিয়া আছে।
\begin{center}
\begin{tabularx}{\linewidth}{@{}lX@{}}
\toprule
\textbf{পুৰণি ছেটিং} & \textbf{বৰ্তমানৰ কমাণ্ড বা বিকল্প} \\
\midrule
\pkg{banglamainfont=Kalpurush} & \texttt{\detokenize{\setbanglamainfont{Kalpurush}}} \\
\pkg{banglattfont=FreeSerif} & \texttt{\detokenize{\setbanglamonofont{FreeSerif}}} \\
\pkg{changecounternumbering=1} & \pkg{changecounternumbering=true} (পূৰ্বনিৰ্ধাৰিত) \\
\pkg{changecounternumbering=0} & \pkg{changecounternumbering=false} \\
\bottomrule
\end{tabularx}
\end{center}
পিছত ফণ্ট বাছনিৰ কমাণ্ড দিলে সংশ্লিষ্ট পেকেজ বিকল্পৰ ঠাইত সেই কমাণ্ডৰ
ছেটিং ব্যৱহাৰ হয়। নম্বৰ সলনি কৰাৰ বিকল্প এতিয়াও বৰ্তমানৰ ইণ্টাৰফেচৰ অংশ;
Boolean আৰু সংখ্যাৰে লিখা দুয়োটা ৰূপেই গ্ৰহণ কৰা হয়। পুৰণি
\pkg{SiyamRupali} নামটোও \pkg{Siyam Rupali} হিচাপে চলে।

নথিত \pkg{feature=0/1/2} থাকিলে সেই বিকল্প বাদ দিয়ক; ভাষাৰ সুবিধাৰ বাবে
এতিয়া পৃথক স্তৰ বাছিব নালাগে। প্ৰয়োজনীয় AMS, প্ৰসংগ আৰু উদ্ধৃতিৰ পেকেজ
লোড কৰি নিজৰ উপপাদ্য বা সমাধানৰ পৰিৱেশ তৈয়াৰ কৰক। মাৰ্জিন, শাৰীৰ ফাঁক,
শিৰোনামৰ যতিচিহ্ন, উপপাদ্যৰ নক্সা আৰু সমীকৰণৰ গণনা পুনৰ আৰম্ভ কৰাৰ নিয়ম
নথিৰ class বা style-এ নিৰ্ধাৰণ কৰে।

পুৰণি \pkg{latin} পৰিৱেশৰ কাম এতিয়া স্বয়ংক্ৰিয় ফণ্ট সলনিয়ে কৰে। ফণ্টৰ
লগতে লেখাৰ ভাষাও সলনি কৰিবলৈ Polyglossia-ৰ ভাষা সলনিৰ কমাণ্ড ব্যৱহাৰ কৰক।
বৰ্তমানৰ Polyglossia-ত অংক ৰূপান্তৰৰ ত্ৰুটি সংশোধন কৰা হৈছে;
পুৰণি workaround-ৰ আৰু প্ৰয়োজন নাই।

\section*{এক নজৰত কমাণ্ডসমূহ}
\phantomsection
\addcontentsline{toc}{section}{এক নজৰত কমাণ্ডসমূহ}
\begin{center}
\begin{tabularx}{\linewidth}{@{}lX@{}}
\toprule
\textbf{কাম} & \textbf{কমাণ্ড বা বিকল্প} \\
\midrule
নথিৰ ভাষা বাছনি & \pkg{language=bangla} (পূৰ্বনিৰ্ধাৰিত) বা \pkg{language=assamese} \\
মূল ফণ্ট বাছনি & \texttt{\detokenize{\setbanglamainfont[features]{font}}} \\
ঐচ্ছিক sans আৰু mono ফণ্ট বাছনি & \texttt{\detokenize{\setbanglasansfont}}, \texttt{\detokenize{\setbanglamonofont}} \\
ইংৰাজী ফণ্ট বাছনি & \texttt{\detokenize{\setmainfont}}, \texttt{\detokenize{\setsansfont}}, \texttt{\detokenize{\setmonofont}} \\
আগৰ কাউণ্টাৰৰ বিন্যাস ৰখা & \pkg{changecounternumbering=false} \\
কাউণ্টাৰৰ মান অসমীয়া অংকত লিখা & \texttt{\detokenize{\tobangla{counter}}} \\
অংকৰ শাৰী ৰূপান্তৰ & \texttt{\detokenize{\numtobangla{0012}}} \\
গণিতত অসমীয়া শব্দ লিখা & \texttt{\detokenize{\text{অসমীয়া}}} \\
বৰ্ণভিত্তিক কাউণ্টাৰ & \texttt{\detokenize{\alph{counter}}} বা \texttt{\detokenize{\Alph{counter}}} \\
\bottomrule
\end{tabularx}
\end{center}

\subsection{নমুনা আৰু সহায়}
সুবিধাবোৰ একেলগে চাবলৈ
\href{https://github.com/Neehan/LaTeXbangla}{ৰিপ'জিটৰীত থকা} বাংলা আৰু অসমীয়া
উদাহৰণ আৰু ফণ্ট নিৰ্দেশিকা চাওক; প্ৰতিটোৰ source আৰু PDF দিয়া আছে।
পৰীক্ষিত class-ৰ ভিতৰত আছে article, report, book আৰু memoir। কিবা এটা
আশা কৰা মতে কাম নকৰিলে এখন সৰু নথি, ফণ্টৰ নাম, ইঞ্জিনৰ নাম আৰু log পঠিয়াওক;
\texttt{\detokenize{\listfiles}}-এ পেকেজৰ সংস্কৰণ লিখি ৰাখে।

যোগাযোগৰ বাবে
\href{https://github.com/Neehan/LaTeXbangla/issues}{GitHub Issues} অথবা
\href{https://groups.google.com/g/latexbangla}{\texttt{latexbangla@googlegroups.com}} ব্যৱহাৰ কৰক।

\smallskip
{\small স্বত্ব ২০১৬, ২০২৬ আদীব হাসান।
\href{https://www.latex-project.org/lppl.txt}{\LaTeX{} Project Public License 1.3c বা পৰৱৰ্তী সংস্কৰণৰ}
অধীনত প্ৰকাশিত। এই নিৰ্দেশিকাত অসমীয়াৰ বাবে Kalpurush আৰু ইংৰাজী মূল লেখাৰ
বাবে TeX Gyre Pagella ব্যৱহাৰ কৰা হৈছে; প্ৰথম উদাহৰণৰ ইংৰাজী ফণ্ট হৈছে
TeX Gyre Adventor। ফণ্টৰ তুলনাত Noto Sans Bengali আৰু Siyam Rupali-ও ব্যৱহাৰ কৰা হৈছে।}

\end{document}
