I'd like to use, for this specific instance, letter style enumeration [ like a) b) c) ] . I realize that I can nest one enumerate environment in another and the style will change, but I don't want a dangling "1." from the topmost enumerate environment.
[Tex/LaTex] LyX enumeration style from numbers to letters
#enumeratelyx
Related Solutions
\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}
The enumeration
is strange here, therefore I use a new list named strangenumerate
Since label*=
cannot be applied here for the deeper nested levels (it prints a )
, there are some other strategies:
- Make a conditional on the level of nesting and change the
label
according to this - Refer directly to the counter of the current level, i.e.
strangenumeratei
here.
\documentclass{article}
\usepackage{enumitem}
\newlist{strangenumerate}{enumerate}{2}
\setlist[strangenumerate]{noitemsep}
\setlist[strangenumerate,1]{label={\arabic*)}}
\setlist[strangenumerate,2]{label={\arabic{strangenumeratei}.\arabic*)}}
\begin{document}
\begin{strangenumerate}
\item % item number is 1)
Hello
\item % item number is 2)
How are you?
\begin{strangenumerate}
\item % item number is 2.1)
I'm fine, thank you!
\item % item number is 2.2)
What about you?
\end{strangenumerate}
\item % item number is 3)
Good!
\item % item number is 4)
Do you know where is he?
\begin{strangenumerate}[label={\arabic{strangenumeratei}.\arabic*.}]
\item % item number is 4.1.
No!
\item % item number is 4.2.
Sorry
\end{strangenumerate}
\end{strangenumerate}
\end{document}
Best Answer
Write into
Document->Settings->Preamble
:For deeper values use also [3], [4]. Inside LyX you will still see the 1. If you want to change this too, then you'll have to rewrite your LyX layout file.