-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
5.3-lists.tex
57 lines (52 loc) · 2.39 KB
/
5.3-lists.tex
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
\definesubsection{Lists}
\begin{identifier}{ordered-list}
<number ~d+>\.<content .*>
(<spacing ~_+> <content .*>)*
\end{identifier}
\begin{identifier}{unordered-list}
- <content .*>
(<spacing ~_+> <content .*>)*
\end{identifier}
\definetextualcomponent{ordered list}{margin: left}
\definetextualcomponent{ordered list item}{display: list-item; list-item-prefix: number}
\definetextualcomponent{unordered list}{margin: left}
\definetextualcomponent{unordered list item}{display: list-item; list-item-prefix: dot} \\
The lists are \gpl{spanning line directive} and mark the enumeration of one or more items of a list. They can contain any \g{directive} with the condition that the \gpl{directive} are matched against the \g{text} of the \g{resulting textual component}. \\
After the respective list \g{identifier} has been \glink{match}{matched}, a new respective item \g{textual component} in which the higher \g{level} \g{text} is contained, is inserted for each \g{match} into the spanning \g{resulting textual component}. A single \g{match} may span over multiple \gpl{line} if the \g{text} \glink{match}{matched} by the \inline$spacing$ \g{binding} is of the same length as that of the \inline$number$ \g{binding}. In such a case, each item \g{match} itself is treated like a \g{spanning line directive} where the \g{content binding} is concatenated. \\
Ordered list items must be numbered by the \g{decimal number} given by the \inline$number$ \g{binding}, even if there is no order to how the numbers appear in the list or if there are duplicates. \\
\begin{examples}
\begin{examplesource}
- Finish this spec
- Implement a parser
\end{examplesource}
\begin{exampleoutput}
\begin{minipage}{0.5\textwidth}
\begin{itemize}[noitemsep]
\item Finish this spec
\item Implement a parser
\end{itemize}
\end{minipage}
\end{exampleoutput}
\begin{examplesource}
1.Buy some ingredients
2.Clean the kitchen
Don't forget the sink!
5.Watch TV
\end{examplesource}
\begin{exampleoutput}
\begin{minipage}{0.5\textwidth}
\begin{enumerate}[noitemsep]
\item Buy some ingredients
\item Clean the kitchen\\Don't forget the sink!
\setcounter{enumi}{4}
\item Watch TV
\end{enumerate}
\end{minipage}
\end{exampleoutput}
\end{examples}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "markless"
%%% TeX-engine: luatex
%%% TeX-command-extra-options: "-shell-escape"
%%% End: