-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
5-line-directives.tex
38 lines (29 loc) · 3.89 KB
/
5-line-directives.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
\definesection{Line Directives}
In order for a \g{directive} to be a \g{line directive}, its \g{identifier} must \g{match} the beginning of a \g{line}. \\
A \g{textual component} specified by a \g{line directive} can potentially contain any other \g{textual component}. Therefore, any \g{directive} is potentially recognisable within a \g{line directive}, including other \gpl{line directive}. However, a \g{line directive} may explicitly restrict which \gpl{directive} are recognised within itself. A \g{line directive} cannot cross the boundaries of another \g{line directive} of a different kind. If such a case were to occur, the current \g{line directive} is forcibly ended without regard for any possible trailing \g{match}.
\definesubsubsection{Singular Line Directives}
A \g{line directive} is a \g{singular line directive} if it is only ever active for a single \g{line}. If it is matched on two consecutive \gpl{line} this results in two separate \gpl{resulting textual component}. \\
When a \g{singular line directive} is \glink{processing}{processed}, processing begins anew over the \g{content binding} until the end of the \g{line} is reached, at which point the \g{resulting textual component} is ended. After that, control is handed back to the \g{standard processing loop}.
\definesubsubsection{Spanning Line Directives}
A \g{line directive} is a \g{spanning line directive} if the \g{identifier} contains a \g{content binding}, and if \glink{match}{matches} on consecutive \gpl{line} of the \g{identifier} are interpreted as a single \g{match}. The semantics of such a spanning match are as follows: Only a single \g{resulting textual component} is produced for all the consecutively \glink{match}{matching} \gpl{line}. The \g{text} of this \g{resulting textual component} is produced by concatenating the contents of the \g{content binding} on each \g{line}. If the \g{content binding} does not \g{match} the \g{newline} on every \g{line}, the \g{newline} must be inserted between each \g{string} of the \g{content binding}. \\
When a \g{spanning line directive} is \glink{processing}{processed}, processing begins anew over the \g{content binding} until the end of the \g{line} is reached. Standard end of \g{line} \g{interpretation} proceeds. If the following \g{line} \glink{match}{matches} the same \g{spanning line directive} as before, processing begins anew over the \g{content binding} thereof without any new \gpl{resulting textual component} being started or inserted. If the following \g{line} does not \g{match} the same \g{spanning line directive} as before, the \g{resulting textual component} is ended and control is handed back to the \g{standard processing loop}.
\definesubsubsection{Guarded Line Directives}
A \g{line directive} is a \g{guarded line directive} if its \glink{match}{matched} region is specified by two \gpl{identifier} that each match a single \g{line}. The \g{text} of the \g{resulting textual component} is the \g{text} from the \g{line} immediately after the \g{line} the first \g{identifier} \glink{match}{matches} until and including the \g{line} immediately before the \g{line} the second \g{identifier} \glink{match}{matches}. \\
When a \g{guarded line directive} is \glink{processing}{processed}, processing begins anew over the \g{content binding} until the the part of the \g{identifier} after the \g{content binding} is \glink{full match}{fully matched}, at which point the \g{resulting textual component} is ended and control is handed back to the \g{standard processing loop}.
\input{5.1-paragraph.tex}
\input{5.2-blockquote.tex}
\input{5.3-lists.tex}
\input{5.4-header.tex}
\input{5.5-horizontal-rule.tex}
\input{5.6-code-block.tex}
\input{5.7-instruction.tex}
\input{5.8-comment.tex}
\input{5.9-embed.tex}
\input{5.10-footnote.tex}
\input{5.11-alignment.tex}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "markless"
%%% TeX-engine: luatex
%%% TeX-command-extra-options: "-shell-escape"
%%% End: