4 # Asciidoc configuration file.
5 # latex backend, generates LaTeX conformant markup.
7 # Originally created by Benjamin Klum, later modified by Geoff Eddy.
10 subs=quotes,replacements,attributes,macros,specialcharacters,replacements2
13 # The listing block uses a LaTeX verbatim environment where special characters don't need to be escaped.
14 # Hence only "callouts" substitution should be applied.
23 latex-table-rowlimit=20
24 latex-use-bibliography-environment!
25 latex-indent-paragraphs!
26 latex-recognize-escaped-unicode!
27 latex-use-custom-list-items!
28 latex-use-colored-tables!
29 latex-use-running-title-headings!
30 latex-use-colored-sidebar-blocks!
33 subsnormal=quotes,specialwords,replacements,attributes,macros,specialcharacters,replacements2
34 #subsnormal=quotes,specialwords,replacements,attributes,macros,passthroughs,specialcharacters,replacements2
35 subsverbatim=callouts,specialcharacters
37 # Screen width in pixels.
60 # I needed to rewrite some regular expressions because '<' and '>' have not been escaped to '<' and '>'
63 [\\]?<(?P<index>\d+)>=callout
66 (?su)[\\]?<<(?P<attrlist>[\w"].*?)>>=xref2
71 (?m)^(.*)\s\+$=\1 !..backslash..!newline!..braceleft..!!..braceright..!
73 # -- Spaced em dashes (entity reference —)
74 (^|[^-\\])--($|[^-])=\1--\2
77 # (C) Copyright (entity reference ©)
78 (?<!\\)\(C\)=!..backslash..!textcopyright!..braceleft..!!..braceright..!
81 # (R) registered trade mark (entity reference ®
82 (?<!\\)\(R\)=!..backslash..!textregistered!..braceleft..!!..braceright..!
85 # (TM) Trademark (entity reference ™)
86 (?<!\\)\(TM\)=!..backslash..!texttrademark!..braceleft..!!..braceright..!
89 # ... Ellipsis (entity reference …)
90 (?<!\\)\.\.\.=!..backslash..!dots!..braceleft..!!..braceright..!
93 # Recognize escaped unicode characters
94 # FIXME: these should be uncommented, but then there are encoding
97 #&#([0-9]*);=!..backslash..!unichar!..braceleft..!\1!..braceright..!
98 #&#x([0123456789abcdefABCDEF]*);=!..backslash..!unichar!..braceleft..!{eval:0x\1}!..braceright..!
101 ->=!..backslash..!textrightarrow!..braceleft..!!..braceright..!
102 # => right double arrow (have to enter math mode)
103 =>=!..dollar..!!..backslash..!Rightarrow!..braceleft..!!..braceright..!!..dollar..!
105 <-=!..backslash..!textleftarrow!..braceleft..!!..braceright..!
106 # <= left double arrow (have to enter math mode)
107 <\==!..dollar..!!..backslash..!Leftarrow!..braceleft..!!..braceright..!!..dollar..!
108 # --> long right arrow (have to enter math mode)
109 -->=!..backslash..!textrightarrow!..braceleft..!!..braceright..!
110 # ==> long right double arrow (have to enter math mode)
111 =\=>=!..dollar..!!..backslash..!Rightarrow!..braceleft..!!..braceright..!!..dollar..!
112 # <-- long left arrow (have to enter math mode)
113 <--=!..backslash..!textleftarrow!..braceleft..!!..braceright..!
114 # <== long left double arrow (have to enter math mode)
115 <\=\==!..dollar..!!..backslash..!Leftarrow!..braceleft..!!..braceright..!!..dollar..!
142 # Ruler is interpreted as a page break.
147 !..backslash..!href!..braceleft..!{link}!..braceright..!!..braceleft..!!..percent..!
148 !..backslash..!includegraphics[{scale?scale={scale},}{width?width={width}pt,}{height? height={height}pt}]!..braceleft..!{target}!..braceright..!
149 {link#}!..braceright..!
154 \hypertarget\{{id}\}\{\}
157 \includegraphics[{scale?scale={scale},}{width?width={width}pt,}{height? height={height}pt}]\{{target}\}%
162 [indexterm-inlinemacro]
164 !..backslash..!index!..braceleft..!{1}{2?!{2}}{3?!{3}}!..braceright..!
166 [indexterm2-inlinemacro]
168 # Single entry index term that is visible in the primary text flow.
169 !..backslash..!index!..braceleft..!{1}!..braceright..!{1}
171 [footnote-inlinemacro]
173 !..backslash..!footnote!..braceleft..!{0}!..braceright..!
175 [footnoteref-inlinemacro]
178 [callout-inlinemacro]
182 [literal-inlinemacro]
185 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\hypertarget\{{id}\}\{\}} \begin\{itemize\}|\end\{itemize\}
190 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
195 list={title?\minisec\{{title}\}} \par{id?\label\{{id}\}\hypertarget\{{id}\}\{\}} |
196 item=\begin\{quote\}|\end\{quote\}
198 term=\noindent\textbf\{%|\}
202 [listtags-horizontal]
203 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\hypertarget\{{id}\}\{\}} \begin\{description\}|\end\{description\}
211 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
216 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
217 item=\begin\{quotation\}|\end\{quotation\}
224 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
231 [listtags-bibliography]
232 list=biblist={title?\minisec\{{title}\}} {id?\label\{{id}\}\hypertarget\{{id}\}\{\}} \begin\{description\} | \end\{description\}
239 superscript=!..backslash..!textsuperscript!..braceleft..!|!..braceright..!
240 subscript=!..backslash..!textsubscript!..braceleft..!|!..braceright..!
247 emphasis=!..backslash..!emph!..braceleft..!|!..braceright..!
248 strong=!..backslash..!textbf!..braceleft..!|!..braceright..!
249 monospaced=!..backslash..!texttt!..braceleft..!|!..braceright..!
250 doublequoted=!..backslash..!{language!textquotedblleft}{language?{language@.german:glqq}}{language?{language@english:textquotedblleft}}!..braceleft..!!..braceright..!|!..backslash..!{language?{language@.german:grqq}}{language?{language@english:textquotedblright}}{language!textquotedblright}!..braceleft..!!..braceright..!
253 # $$ inline passthrough.
258 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{0={name}:{target}}!..braceright..!
260 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{0={name}:{target}}!..braceright..!
262 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{0={name}:{target}}!..braceright..!
264 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{0={name}:{target}}!..braceright..!
266 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{0={target}}!..braceright..!
268 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{0={target}}!..braceright..!
270 !..backslash..!href!..braceleft..!{target}!..braceright..!!..braceleft..!{0={target}}!..braceright..!
273 !..backslash..!label!..braceleft..!{target}!..braceright..!!..backslash..!hypertarget!..braceleft..!{target}!..braceright..!!..braceleft..!{0={target}}!..braceright..!
275 [anchor2-inlinemacro]
276 !..backslash..!label!..braceleft..!{1}!..braceright..!!..backslash..!hypertarget!..braceleft..!{1}!..braceright..!!..braceleft..!{2={1}}!..braceright..!
278 [anchor3-inlinemacro]
279 {latex-use-bibliography-environment?!..backslash..!bibitem!..braceleft..!{1}!..braceright..!} {latex-use-bibliography-environment!!..backslash..!item[{1}]} !..backslash..!label!..braceleft..!{1}!..braceright..!!..backslash..!hypertarget!..braceleft..!{1}!..braceright..!!..braceleft..!!..braceright..!
282 {style#}{style$page:!..backslash..!pageref!..braceleft..!{target}!..braceright..!}
283 {style#}{style$autoref:!..backslash..!autoref!..braceleft..!{target}!..braceright..!}
284 {style#}{style$ref:!..backslash..!ref!..braceleft..!{target}!..braceright..!}
285 {style#}{latex-use-bibliography-environment#}{style$cite:!..backslash..!cite!..braceleft..!{target}!..braceright..!}
286 {style#}{latex-use-bibliography-environment%}{style$cite:!..backslash..!hyperlink!..braceleft..!{target}!..braceright..!!..braceleft..!{0=[{target}]}!..braceright..!}
287 {style%}!..backslash..!hyperlink!..braceleft..!{target}!..braceright..!!..braceleft..!{0=[{target}]}!..braceright..!
291 {3#}{3$page:!..backslash..!pageref!..braceleft..!{1}!..braceright..!}
292 {3#}{3$autoref:!..backslash..!autoref!..braceleft..!{1}!..braceright..!}
293 {3#}{3$ref:!..backslash..!ref!..braceleft..!{1}!..braceright..!}
294 {3#}{latex-use-bibliography-environment#}{3$cite:!..backslash..!cite!..braceleft..!{1}!..braceright..!}
295 {3#}{latex-use-bibliography-environment%}{3$cite:!..backslash..!hyperlink!..braceleft..!{1}!..braceright..!!..braceleft..!{2=[{1}]}!..braceright..!}
296 {3%}!..backslash..!hyperlink!..braceleft..!{1}!..braceright..!!..braceleft..!{2=[{1}]}!..braceright..!
299 # Special word substitution.
301 !..backslash..!emph!..braceleft..!{words}!..braceright..!
303 !..backslash..!texttt!..braceleft..!{words}!..braceright..!
305 !..backslash..!textbf!..braceleft..!{words}!..braceright..!
309 # Paragraph substitution.
311 {title%} \par{latex-indent-paragraphs!\noindent{}}
312 {title#} \paragraph\{{title}\}
313 \label\{{id}\}\hypertarget\{{id}\}\{\}
318 # The literal block employs the same markup.
319 template::[literalblock]
322 # The verse block employs the same markup.
323 template::[verseblock]
325 [admonitionparagraph]
326 # The admonition block employs the same markup.
327 template::[admonitionblock]
333 # FIXME: we get SPURIOUS TEXT at the beginning, but can't delete it.
334 # Putting "[]" after the \begin{lstlisting} in the LaTeX output works,
335 # but inserting the same "[]" below doesn't.
338 \\minisec\{{caption=Listing: }{title}\}
339 \label\{{id}\}\hypertarget\{{id}\}\{\}
340 \begin\{verbatim\}|\end\{verbatim\}
342 % FIXXME: dirty hack to circumvent missing \n after verbatim
346 \label\{{id}\}\hypertarget\{{id}\}\{\}
355 \label\{{id}\}\hypertarget\{{id}\}\{\}
364 \label\{{id}\}\hypertarget\{{id}\}\{\}
366 ifndef::latex-use-colored-sidebar-blocks[]
367 \setlength\{\tabcolsep\}\{0pt\}
368 \rowcolors\{1\}\{\}\{\}
369 \begin\{tabular\}\{l>\{\columncolor[gray]\{.75\}\}rcl\}
373 \begin\{minipage\}\{4in\}
374 endif::latex-use-colored-sidebar-blocks[]
375 ifdef::latex-use-colored-sidebar-blocks[]
376 \fcolorbox\{SidebarBorderColor\}\{SidebarBackgroundColor\}\{\parbox\{\textwidth\}\{
377 endif::latex-use-colored-sidebar-blocks[]
382 ifdef::latex-use-colored-sidebar-blocks[]
385 endif::latex-use-colored-sidebar-blocks[]
386 ifndef::latex-use-colored-sidebar-blocks[]
389 endif::latex-use-colored-sidebar-blocks[]
394 \label\{{id}\}\hypertarget\{{id}\}\{\}
407 \minisec\{{caption=}{title}\}
408 \label\{{id}\}\hypertarget\{{id}\}\{\}
416 \begin\{addmargin*\}[0em]\{0em\}
417 \label\{{id}\}\hypertarget\{{id}\}\{\}
418 \begin\{minipage\}\{\linewidth\}
419 {icons#} \includegraphics\{{icon={iconsdir}/{name}.png}\}
420 {icons%} \minisec\{{caption}\}
421 \rule\{\linewidth\}\{2pt\}
422 \par\{\}\noindent\{\}|\par\{\}\noindent\{\}%
423 \rule[.25\baselineskip]\{\linewidth\}\{2pt\}
428 # Same as numbered list.
429 [listdef-bibliography]
435 # Same as labeled list.
446 [tabletags-monospaced]
462 colspec=>\{{colalign@left:\\raggedright}{colalign@center:\\centering}{colalign@right:\\raggedleft}\}p\{ {colwidth}pt \}
463 bodyrow=| \tabularnewline
464 headdata=\{\bfseries\{\}|\} {colnumber@{colcount}::&}
465 footdata=\{\bfseries\{\}|\} {colnumber@{colcount}::&}
466 bodydata=| {colnumber@{colcount}:%:&}
472 ifdef::latex-use-colored-tables[]
473 \rowcolors\{1\}\{TableEvenColor\}\{TableOddColor\}
474 \setlength\arrayrulewidth\{1.5pt\}
475 \arrayrulecolor\{TableBorderColor\}
476 endif::latex-use-colored-tables[]
477 {eval:{rowcount}{gt}{latex-table-rowlimit}} \begin\{longtable\}\{
478 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|sides:|}
479 {eval:{rowcount}{gt}{latex-table-rowlimit}} {colspecs}
480 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|sides:|}
481 {eval:{rowcount}{gt}{latex-table-rowlimit}} \}
482 {eval:{rowcount}{gt}{latex-table-rowlimit}} \hypertarget\{{id}\}\{\}
483 {eval:{rowcount}{gt}{latex-table-rowlimit}} \caption\{{title}\}
484 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|topbot:\hline}
485 {eval:{rowcount}{gt}{latex-table-rowlimit}} {headrows}
486 {eval:{rowcount}{gt}{latex-table-rowlimit}} {headrows#} \endhead
487 {eval:{rowcount}{gt}{latex-table-rowlimit}} {footrows}
488 {eval:{rowcount}{gt}{latex-table-rowlimit}} {footrows#} \endlastfoot
489 {eval:{rowcount}{gt}{latex-table-rowlimit}}
490 {eval:{rowcount}{gt}{latex-table-rowlimit}} {bodyrows}
491 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|topbot:\hline}
492 {eval:{rowcount}{gt}{latex-table-rowlimit}} \label\{{id}\}
493 {eval:{rowcount}{gt}{latex-table-rowlimit}} \end\{longtable\}
494 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title%} \par{latex-indent-paragraphs!\noindent}
495 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title#} \begin\{table\}
496 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title#} \begin\{center\}
497 {eval:{rowcount}{lt}={latex-table-rowlimit}} \hypertarget\{{id}\}\{\}
498 {eval:{rowcount}{lt}={latex-table-rowlimit}} \caption\{{title}\}
499 {eval:{rowcount}{lt}={latex-table-rowlimit}} \begin\{tabular\}\{lllllllllllllll
500 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|sides:|}
501 {eval:{rowcount}{lt}={latex-table-rowlimit}} {colspecs}
502 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|sides:|}
503 {eval:{rowcount}{lt}={latex-table-rowlimit}} \}
504 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|topbot:\hline}
505 {eval:{rowcount}{lt}={latex-table-rowlimit}} {headrows}
506 {eval:{rowcount}{lt}={latex-table-rowlimit}} {bodyrows}
507 {eval:{rowcount}{lt}={latex-table-rowlimit}} {footrows}
508 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|topbot:\hline}
509 {eval:{rowcount}{lt}={latex-table-rowlimit}} \end\{tabular\}
510 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title#} \end\{center\}
511 {eval:{rowcount}{lt}={latex-table-rowlimit}} \label\{{id}\}
512 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title#} \end\{table\}
515 ifdef::doctype-article[]
517 endif::doctype-article[]
519 ifdef::doctype-book[]
520 ^Dedication$=dedication
521 endif::doctype-book[]
525 ifdef::latex-use-bibliography-environment[]
526 ^(Bibliography|References)$=bibliography
527 endif::latex-use-bibliography-environment[]
529 ^Appendix.*$=appendix
532 ^Figures$=list-of-figures
542 \label\{{id}\}\hypertarget\{{id}\}\{\}
549 \label\{{id}\}\hypertarget\{{id}\}\{\}
552 ifdef::latex-use-bibliography-environment[]
554 \label\{{id}\}\hypertarget\{{id}\}\{\}
555 \begin\{thebibliography\}\{99\}
557 \end\{thebibliography\}
558 endif::latex-use-bibliography-environment[]
562 \label\{{id}\}\hypertarget\{{id}\}\{\}
566 \label\{{id}\}\hypertarget\{{id}\}\{\}
575 \label\{{id}\}\hypertarget\{{id}\}\{\}
581 # Untitled elements between header and first section title.
582 ifdef::doctype-book[]
585 \label\{preamble\}\hypertarget\{preamble\}\{\}
586 endif::doctype-book[]
591 ifdef::doctype-book[]
593 endif::doctype-book[]
597 \hypertarget\{{id}\}\{\}
603 \hypertarget\{{id}\}\{\}
608 \hypertarget\{{id}\}\{\}
609 \subsection\{{title}\}
614 \hypertarget\{{id}\}\{\}
615 \subsubsection\{{title}\}
620 \hypertarget\{{id}\}\{\}
626 # FIXME: if the "backgroundcolor" entry is present as below, the
627 # background comes out black and is unreadable in PDF, although it is
629 # \lstset\{basicstyle=\footnotesize\ttfamily,showstringspaces=false,breaklines,frame=single, rulecolor=\color\{ListingBorderColor\}, backgroundcolor=\color\{ListingBackgroundColor\}, xleftmargin=0cm, linewidth=0.95\textwidth\}
633 {encoding$UTF-8:}% coding: utf-8
634 \documentclass [a4paper,abstracton,titlepage]\{{doctype@article:scrartcl:scrbook}\}
635 \pagestyle\{{latex-use-running-title-headings?headings}{latex-use-running-title-headings!plain}\}
636 \usepackage\{makeidx\}
637 \usepackage[table]\{xcolor\}
639 \definecolor\{LinkColor\}\{rgb\}\{0.33,0.42,0.18\}
640 \definecolor\{TableEvenColor\}\{rgb\}\{0.93,1,0.8\}
641 \definecolor\{TableOddColor\}\{rgb\}\{0.93,1,1\}
642 \definecolor\{TableBorderColor\}\{rgb\}\{0.55,0.67,0.73\}
643 \definecolor\{ListingBorderColor\}\{rgb\}\{0.55,0.55,0.55\}
644 \definecolor\{ListingBackgroundColor\}\{rgb\}\{0.95,0.95,0.95\}
645 \definecolor\{SidebarBorderColor\}\{rgb\}\{0.95,0.95,0.95\}
646 \definecolor\{SidebarBackgroundColor\}\{rgb\}\{1,1,0.93\}
647 \usepackage\{type1ec\}
648 \usepackage[{language=english}]\{babel\}
651 pdftitle=\{{doctitle}\},
652 pdfauthor=\{{author}\},
659 \usepackage\{enumerate\}
660 \usepackage\{graphicx\}
661 \usepackage\{longtable\}
662 \usepackage[T1]\{fontenc\}
664 \usepackage[{encoding@ISO-8859-1:latin1}{encoding@UTF-8:utf8x}{encoding!utf8x}]\{inputenc\}
665 \usepackage\{textcomp\}
667 %\usepackage\{listings\}
668 \usepackage\{verbatim\}
669 \usepackage\{moreverb\}
670 \usepackage\{upquote\}
672 %\lstset\{basicstyle=\footnotesize\ttfamily,showstringspaces=false,breaklines,frame=single, rulecolor=\color\{ListingBorderColor\}, xleftmargin=0cm, linewidth=0.95\textwidth\}
674 {latex-indent-paragraphs%} \setlength\{\\parskip\}\{1ex plus 0.5ex minus 0.2ex\}
677 \DeclareRobustCommand*\textsubscript[1]\{%
678 \@textsubscript\{\selectfont#1\}\}
679 \def\@textsubscript#1\{%
680 \{\m@th\ensuremath\{_\{\mbox\{\fontsize\sf@size\z@#1\}\}\}\}\}
683 \subject\{{subject}\}
685 \author\{{author}{email?, \href\{mailto:{email}\}\{{email}\}}\}
687 \publishers\{\begin\{tabular\}\{ll\} {revision?\textbf\{Revision:\} & {revision} \\ } {keywords?\textbf\{Keywords:\} & {keywords} \\ } \end\{tabular\}\}
693 %\newcommand{\texttesh}{\textteshlig\/}
695 \label\{header\}\\hypertarget\{header\}\{\}
696 {doctitle#\maketitle}
699 \label\{footer\}\hypertarget\{footer\}\{\}