3

I am working on a large document in Bangla using this package setting. This changes the section and subsection numbers to Bengali. However, it doesn't change the numbering style to Bengali for nested lists. My desired output is shown in the figure:

enter image description here

But I got this using the following MWE. As you can see from the image, for the nested list, English alphabets are used. I want to replace those with the Bengali alphabets (ক, খ, গ, etc). How can this be done? It is also helpful if third level nested listing is possible!

enter image description here

\documentclass[10pt,a4paper,showtrims]{memoir}

%https://tex.stackexchange.com/questions/563720/change-numbering-style-to-bengali-in-nested-ordered-list/563725#563725
%https://latex3.github.io/babel/guides/locale-bengali.html

\usepackage{babel}
\babelprovide[import,onchar = fonts ids,maparabic,alph=alphabetic]{bengali}
\babelfont[bengali]{rm}[Renderer=Harfbuzz,AutoFakeBold,AutoFakeSlant=0.3]{Kalpurush}
\babelcharproperty{`।}{locale}{bengali}
%\babelprovide[maparabic,alph=alphabetic]{bengali}
%\babelprovide[mapdigits,alph=alphabetic]{bengali}

%\usepackage[bengali, provide=*]{babel}
%\babelprovide[mapdigits]{bengali}  % or alternatively maparabic

\begin{document}

\begin{enumerate}
    \item আইটেম ১
    \begin{enumerate}
        \item নেস্টেড আইটেম ১
        \item নেস্টেড আইটেম ২
    \end{enumerate}
    \item আইটেম ২
\end{enumerate}

\end{document}

Note: I have already tried Change numbering style to Bengali in nested ordered list and got nothing.

3
  • You’re trying to import Bengali with \babelprovide twice, using different options.
    – Davislor
    Dec 1, 2021 at 9:23
  • @Davislor The options are not co-related and it works fine. Is there any performance issue?
    – mmr
    Dec 1, 2021 at 9:24
  • I have edited my code using single \babelprovide.
    – mmr
    Dec 1, 2021 at 16:33

1 Answer 1

2

After hours of surfing and reading documentations, I came up with a solution.

Adding main option to \babelprovide command solved the problem. It's peculiar, but works at last.

Edited MWE:

\documentclass[10pt,a4paper,showtrims]{memoir}

\usepackage{babel}
\babelprovide[import,main,onchar = fonts ids,maparabic,alph=alphabetic]{bengali} %% <--- here is the solution :D 
\babelfont[bengali]{rm}[Renderer=Harfbuzz,AutoFakeBold,AutoFakeSlant=0.3]{Kalpurush}
\babelcharproperty{`।}{locale}{bengali}

%\babelprovide[main]{bengali}

\begin{document}

\begin{enumerate}
    \item আইটেম ১
    \begin{enumerate}
        \item নেস্টেড আইটেম ১
        \item নেস্টেড আইটেম ২
    \end{enumerate}
    \item আইটেম ২
\end{enumerate}

\end{document}

My output:

enter image description here

3
  • Without main, you never actually change the language of your document. It mostly works because the onchar= option switches when you actually type in the Bengali script, but this doesn’t change the meaning of commands such as \alph. Those still use default English settings.
    – Davislor
    Dec 2, 2021 at 7:29
  • If you want only some parts of your document in Bengali, you can switch those with \begin{otherlanguage}{bengali}.
    – Davislor
    Dec 2, 2021 at 7:31
  • Thankkkkkkkkkkkk
    – Sebastiano
    Dec 8, 2021 at 7:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .