TeX - LaTeX Asked by Christian Bartholomew on December 31, 2020
Any idea how to get this kind of format? I’m struggling to get a consistent indentation after the section names (0.1, 0.2, etc)
It looks to me like the screenshot could have been produced with the help of the enumitem
package and its newlist
and setlist
macros.
documentclass{article}
usepackage{newtxtext,newtxmath} % optional -- Times Roman text and math font
usepackage{enumitem}
newlist{spenumerate}{enumerate}{2} % 'spenumerate' -- short for 'special enumerate'
setlist[spenumerate,1]{label=bfseries thesection.arabic*}
setlist[spenumerate,2]{label=bfseries alph*.}
begin{document}
begin{spenumerate}
item
begin{spenumerate}
item a
item b
item c
item d
item e
item f
end{spenumerate}
item
begin{spenumerate}
item A
item B
item C
item D
item E
item f
end{spenumerate}
end{spenumerate}
end{document}
Correct answer by Mico on December 31, 2020
The "standard"* configuration method for setting the enumeration label format is redefining labelenumi
(top level), labelenumii
(nested level), etc. Sticking to that basic method gives
documentclass{article}
% theenumi is arabic{enumi}
renewcommandlabelenumi{textbf{0.theenumi}}
% theenumii is alph{enumii}
renewcommandlabelenumii{textbf{theenumii.}}
%
begin{document}
noindent Hello there. This line shows the left margin.
begin{enumerate}
item
begin{enumerate}
item odd
item even
item even positive
item multiples
item pals
item empty
end{enumerate}
item
begin{enumerate}
item alpha
item bravo
item charlie
item delta
item echo
item foxtrot
end{enumerate}
end{enumerate}
end{document}
I don't know that your "0" refers to, but you probably want it to give some other counter value.
Note * "Standard" in the sense that it is the style of the built-in document classes. List environments like "enumerate" aren't defined in basic LaTeX., but in the document class.
Answered by Donald Arseneau on December 31, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP