-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
5.4-header.tex
56 lines (50 loc) · 2.53 KB
/
5.4-header.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
\definesubsection{Header}
\begin{identifier}{header}
<level #+> <content .+>
\end{identifier}
\definetextualcomponent{header}{font-weight:bold; font-size: 1-level; indent: true; label: content} \\
The header is a \g{singular line directive}. It represents a section heading. Only the \g{text} held by the \g{content binding} is outputted to the \g{resulting textual component}. The header can only contain \gpl{inline directive}.\\
The length of the \inline$level$ \g{binding} determines the level of the heading. The level may potentially be infinitely high, though the \g{implementation} may represent levels above a certain number in the same manner. It must however support a different representation for at least levels 1 and 2. Generally, the higher the level, the smaller the font size of the heading should be. \\
An \g{implementation} may choose to number each header, where this number prefix is put together by the number prefix of the header on a level one higher followed by a dot and a counter representing how many headers of the same level have appeared until and including the current one since the last header of a higher level. In the case of a level one heading only the counter is used, as there is no higher level prefix to prepend. In the case where no level one higher is contained in the \g{document}, the level is treated as if it existed with the counter for it being 0.\\
The \g{resulting textual component} is associated with a \g{label} of the same name as the \g{text} of the \g{resulting textual component}. \\
\begin{examples}
\begin{examplesource}
# Header
The header is a singular line
directive
## Subsection
That allows neat sectioning!
\end{examplesource}
\begin{exampleoutput}
\textbf{\quad\Large Header}\\
The header is a singular line\\
directive.\\
\textbf{\quad\large Subsection}\\
That allows neat sectioning!\\
\end{exampleoutput}
\begin{examplesource}
# Cooking a Lasagna
Here's what you have to buy:
## Ingredients
A buncha stuff!
## Steps
It's a lengthy recipe, but finally \
you'll have to
#### Bake it
\end{examplesource}
\begin{exampleoutput}
\textbf{\quad\Large 1 Cooking a Lasagna}\\
Here's what you have to buy: \\
\textbf{\quad\large 1.1 Ingredients}\\
A buncha stuff! \\
\textbf{\quad\large 1.2 Steps}\\
It's a lengthy recipe, but finally you'll have to \\
\textbf{\quad\small 1.2.0.1 Bake it}\\
\end{exampleoutput}
\end{examples}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "markless"
%%% TeX-engine: luatex
%%% TeX-command-extra-options: "-shell-escape"
%%% End: