-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path5.2-blockquote.tex
62 lines (57 loc) · 2.86 KB
/
5.2-blockquote.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
58
59
60
61
62
\definesubsection{Blockquote}
\begin{identifier}{blockquote-header}
\~ <content !(\| )+>(\| <body .*>)?
(<spacing ~|+> <body .*>)*
\end{identifier}
\begin{identifier}{blockquote}
\| <content .*>
\end{identifier}
\definetextualcomponent{blockquote header}{margin: left; font-weight: bold}
\definetextualcomponent{blockquote}{margin: left} \\
The blockquote header is a \g{singular line directive} that identifies the source of a quote. Only the \g{text} held by the \g{content binding} is outputted into the \g{resulting textual component}. The blockquote header \g{content binding} can only contain \gpl{inline directive}. If the \inline$body$ \g{binding} is present, then the blockquote header's \g{resulting textual component} is closed, and parsing resumes as if at a block toplevel, meaning a blockquote will be parsed next. This allows a shorter form of combined header and body. 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$content$ \g{binding} plus the two prefix characters. \\
The blockquote is a \g{spanning line directive} that identifies a body of \g{text} that is being quoted. The blockquote can contain any \g{directive} with the condition that the \gpl{directive} are matched against the \g{text} of the \g{resulting textual component}. \\
An implementation may choose to group the \comp{blockquote header} and \comp{blockquote} together and reorder them if they are found consecutive to one another. However, a body can only ever be grouped together with a single header. In the case where a header lies between two bodies, the header is counted to belong to the second body. If a header is found without a corresponding body, the \g{implementation} may \glink{signalling}{signal} a \g{warning}. \\
\begin{examples}
\begin{examplesource}
~ This Document
| The blockquote header is a \
| singular line directive.
\end{examplesource}
\begin{exampleoutput}
\begin{blockquote}[This Document]
The blockquote header is a singular line directive.
\end{blockquote}
\end{exampleoutput}
\begin{examplesource}
| Unattributed text.
\end{examplesource}
\begin{exampleoutput}
\begin{blockquote}
Unattributed text.
\end{blockquote}
\end{exampleoutput}
\begin{examplesource}
~ Yukari | Hello there!
\end{examplesource}
\begin{exampleoutput}
\begin{blockquote}[Yukari]
Hello there!
\end{blockquote}
\end{exampleoutput}
\begin{examplesource}
~ Yukari | I....
| I have nothing left to add.
\end{examplesource}
\begin{exampleoutput}
\begin{blockquote}[Yukari]
I....\linebreak
I have nothing left to add.
\end{blockquote}
\end{exampleoutput}
\end{examples}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "markless"
%%% TeX-engine: luatex
%%% TeX-command-extra-options: "-shell-escape"
%%% End: