File: enum.tex

package info (click to toggle)
latexml 0.8.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,920 kB
  • sloc: xml: 109,048; perl: 30,224; sh: 179; javascript: 28; makefile: 13
file content (167 lines) | stat: -rw-r--r-- 3,525 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}

\section{Itemizations}
\begin{itemize}
\item Line one
\item Line two
\end{itemize}

\begin{itemize}[label=\dag]
\item Line one
\item Line two
\end{itemize}

\section{Enumerations}
\begin{enumerate}[labelindent=\parindent,leftmargin=*]
\item Line one
\item Line two
\end{enumerate}

\begin{enumerate}[leftmargin=*] % labelindent=0pt by default.
\item Line one
\item Line two
\end{enumerate}

\begin{enumerate}[leftmargin=\parindent]
\item Line one
\item Line two
\end{enumerate}

\begin{enumerate}[labelindent=\parindent, leftmargin=*, label=\Roman*., widest=III,align=left]
\item Line one
\item Line two
\end{enumerate}

\begin{enumerate}                                                     [label=\fbox{\arabic*}]
\item Line one
\item Line two
\end{enumerate}

\newlist{fonty}{enumerate}{1}
\setlist[fonty]{font=\bf}
\begin{fonty}[label=\arabic*)]  \item A \item B\end{fonty}
\begin{fonty}[label=\roman*{]}]  \item A \item B\end{fonty}

\section{References}
See items \ref{AA},\ref{AB}.
\begin{enumerate}[label=\roman*)]
  \item\label{AA} aye aye
  \item\label{AB} aye bee
\end{enumerate}
See items \ref{BA},\ref{BB}.
\begin{enumerate}[label=\roman*),ref=\roman*]
  \item\label{BA} bee aye
  \item\label{BB} bee bee
\end{enumerate}

\section{Inline Enumerations}
Some text:
\begin{enumerate*}[labelindent=\parindent,leftmargin=*]
\item Line one
\item Line two
\end{enumerate*}
And more.

And so:
\begin{enumerate*}[label=\arabic*),itemjoin={{, and then }}, itemjoin*={{, and finally }}] 
\item this \item that \item the other
\end{enumerate*}

\section{Nested Enumerations}
Some text
\begin{enumerate}[label=(\alph*), labelindent=\parindent,
leftmargin=*, start=12]
\item Line one
\begin{enumerate}[label=(\alph{enumi}.\roman*), leftmargin=*, start=7]
\item Line one, first
\end{enumerate}
\item roc\'{\i}n flaco, y
\begin{enumerate}[label=(\alph{enumi}.\roman*), leftmargin=*, resume]
\item Line one, second
\end{enumerate}
\end{enumerate}
And more.


Some text
\begin{description}[font=\sffamily\bfseries, leftmargin=3cm,style=nextline]
\item[Lo primero que ten\'{\i}a el Quijote] the first
\item[Lo segundo] the second
\item[Lo tercero] the third
\item[Y por \'{u}ltimo, lo cuarto] last
\end{description}
And so on.

\newlist{legal}{enumerate}{10}
\setlist[legal]{label*=\arabic*.}
\begin{legal}
\item A
  \begin{legal}
    \item AA
    \item AB
    \end{legal}
\item B
  \begin{legal}
    \item BA
    \item BB
    \end{legal}
  \end{legal}

\section{Series}
\newlist{cont}{enumerate}{2}
\setlist[cont,1,2]{label=(\arabic*), resume}

\begin{cont}
\item A Thing
\end{cont}
\begin{cont}
\item A Thing
\end{cont}
\begin{cont}
\item A Thing
\end{cont}
  
\begin{enumerate}[series=foo]
\item A Thing
\end{enumerate}
\begin{enumerate}
\item Entirely different Things
\item Entirely different Things
\end{enumerate}
\begin{enumerate}[resume=foo]
\item Another Thing
\end{enumerate}

\section{New Lists}
\newlist{ingredients}{itemize}{1}
\setlist[ingredients]{label=\textbullet}
\newlist{steps}{enumerate}{2}
\setlist[steps,1,2]{label=(\arabic*), ref=[\arabic*]}

\newlist{isteps}{enumerate*}{2}
\setlist[isteps,1,2]{label=(\arabic*)}


\begin{ingredients}
\item flour
\item eggs
\item milk
\end{ingredients}

\begin{steps}
\item first\label{first}
\item second\label{second}
\item third\label{third}
\end{steps}
with steps \ref{first},\ref{second} and \ref{third}.

Inline:
\begin{isteps}
\item first
\item second
\item third
\end{isteps}

\end{document}