4

I saw two posts related to my question. And I tried to merge the two but my limited understanding of Latex does not allow me to do so...

I want to use first level enumeration like 1. 2. 3. , which means I do not have change anything. However, for the second-level enumeration, I would like to put it as Khmer Unicode alphabet with a dot after it ក. ខ. គ.

Khmer Unicode Enumerate: Change Enumerate Items to Khmer Unicode Alphabet

How to change to [] from (): Enumerated list with square brackets

And this is what I want. Khmer Enumerate

3
  • Can you provide your code?
    – Say OL
    Oct 12, 2016 at 13:59
  • @SayOL I just use \item[ក] there. If I change all environment to Khmer, it is file but 1 becomes ១ etc. I just wanna use 1 and ក for some special occasions.
    – Panha
    Oct 22, 2016 at 7:48
  • 1
    We do not need to map Latin alphabets to Khmer alphabets anymore. We just use polyglossia package. I have already done it.
    – Say OL
    Oct 22, 2016 at 9:28

2 Answers 2

4
\documentclass[12pt,a4paper]{article}
\usepackage{polyglossia}
\newfontfamily{\khmerfont}{Khmer OS}
\setdefaultlanguage[numerals=arabic]{khmer}
\usepackage{enumitem}
\makeatletter
\let\@alph\@khmeralph
\setlist[enumerate,2]{label=(\alph*)}
\makeatother
\usepackage{multicol}
\begin{document}
    \begin{enumerate}[start=3]
        \item 
        \begin{multicols}{2}
        \begin{enumerate}
            \item ធាតុនីមួយៗ
            \item ធាតុនីមួយៗ
            \item ធាតុនីមួយៗ
            \item ធាតុនីមួយៗ
        \end{enumerate}
        \end{multicols}
    \end{enumerate}
\end{document}

enter image description here

2

Here is a variant which does not change the main font, derived from Change Enumerate Items to Khmer Unicode Alphabet. It changes to Khmer labeling only locally.

\documentclass{article}
\usepackage{fontspec}
\makeatletter
\def\khmercount#1{\expandafter\@khmercount\csname c@#1\endcsname}
\def\@khmercount#1{{% extend as needed!
  \fontspec{Khmer OS}%
  \ifcase#1\or
   ^^^^1780\or
   ^^^^1781\or
   ^^^^1782\or
   ^^^^1783\or
   ^^^^1784\or
   ^^^^1785\or
   ^^^^1786\else
   \@ctrerr\fi}}
\makeatother
\usepackage{multicol}
\begin{document}
  \begin{enumerate}
  \item
    \begin{multicols}{2}
      {%
      \def\theenumii{\khmercount{enumii}}
      \def\labelenumii{[\theenumii]}
      \begin{enumerate}
        \item \label{one} one
        \item two
        \item three
        \item four
      \end{enumerate}%
      }%
    \end{multicols}
  \item
    \begin{multicols}{2}
      \begin{enumerate}
        \item one
        \item two
        \item three
        \item four
      \end{enumerate}
    \end{multicols}
  \end{enumerate}
  See item~\ref{one}.
\end{document}

enter image description here

You must log in to answer this question.

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