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.
5 Answers
Write into Document->Settings->Preamble
:
\usepackage{enumitem}
\setenumerate{label=A)}
\setenumerate[2]{label=a)}
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.
-
1Thanks for the answer. Is there a way to have these settings apply to a specific enumerate environment? For example, in one part of the document I want the highest level symbol to be letters, and in another part of the document I want the highest level symbol to be numbers.– GusMar 23, 2011 at 15:42
-
Short answer
- To get
a)
, add this to the preamble:\renewcommand{\labelenumi}{\alph{enumi})}
- To get
[a]
, add this to the preamble:\renewcommand{\labelenumi}{[\alph{enumi}]}
If you don't want the change to occur globally, then add this code right before the enumeration (and resotre right after, if needed).
Long answer
In the preamble, use the \renewcommand{indicator}{format}
syntax for each level of heirarchy you would like to change (4 level max. are supported), where indicator is either of the following label indicators:
\labelenumi
-- 1st level\labelenumii
-- 2nd level\labelenumiii
-- 3rd level\labelenumiv
-- 4th level
and format is a macro consisting of enumerators and styles.
The style can be any of the following:
\arabic{enumerator}
, for 1, 2, 3, ...\alph{enumerator}
, for a, b, c, ...\Alph{enumerator}
, for A, B, C, ...\roman{enumerator}
, for i, ii, iii, ...\Roman{enumerator}
, for I, II, III, ...
The enumerator can be any of the following:
enumi
-- 1st levelenumii
-- 2nd levelenumiii
-- 3rd levelenumiv
-- 4th level
I personally prefer the 1.4.2 a)
repeating format, for which you need:
\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\labelenumi\arabic{enumii}.}
\renewcommand{\labelenumiii}{\labelenumii\arabic{enumiii}}
\renewcommand{\labelenumiv}{\alph{enumiv})}
You can set custom labels for individual items:
Use the default "Numbered list" environment in LyX (select from the menu or use the keyboard shortcut ^P E).
Insert a "Custom Item" inset: Open the context menu via Ctrl+click/right click over a list element and select "Custom Item".
In the Custom Item inset, enter a custom label for this particular item.
You will see the default labels in LyX, but the output will use the label from the "Custom Item" box. In LyX:
1. Custom Item[A] Fruits:
a) Custom Item[A.1] orange
b) Custom Item[A.2] apple
will produce in the output file:
A Fruits:
A.1 orange
A.2 apple
-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Jan 21, 2015 at 20:07
-
These answers are all quite old, and Lyx has moved on, adding a module named Customisable Lists (enumitem). The User's Guide indicates how to use it, but in short: if you want to change the behavior of just one enumeration, add the module in the document settings, and then, at the beginning of your list, Insert->Enumerate Options. In ERT write
label=\roman{enumi}.
or however you'd like to format the label. Done! and once you've finished this enumeration, the others will be according to the usual style.
-
1Thanks, @John. I just didn't get it first, that I needed to go to Document -> Settings -> Modules and add the "Customisable Lists (enumitem)". Otherwise there is no "Insert->Enumerate Options" menu item. Nov 1, 2021 at 22:53
in preamble
\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\theenumii}{\arabic{enumii}}
\renewcommand{\labelenumii}{\theenumii.}