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.
16 source-style=template="listingblock",subs=("callouts",)
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!
34 subsnormal=quotes,specialwords,replacements,attributes,macros,specialcharacters,replacements2
35 #subsnormal=quotes,specialwords,replacements,attributes,macros,passthroughs,specialcharacters,replacements2
36 subsverbatim=callouts,specialcharacters,replacements2
38 # Screen width in pixels.
61 # I needed to rewrite some regular expressions because '<' and '>' have not been escaped to '<' and '>'
64 [\\]?<(?P<index>\d+)>=callout
67 (?su)[\\]?<<(?P<attrlist>[\w"].*?)>>=xref2
72 (?m)^(.*)\s\+$=\1 !..backslash..!newline!..braceleft..!!..braceright..!
74 # -- Spaced em dashes (entity reference —)
75 (^|[^-\\])--($|[^-])=\1--\2
78 # (C) Copyright (entity reference ©)
79 (?<!\\)\(C\)=!..backslash..!textcopyright!..braceleft..!!..braceright..!
82 # (R) registered trade mark (entity reference ®
83 (?<!\\)\(R\)=!..backslash..!textregistered!..braceleft..!!..braceright..!
86 # (TM) Trademark (entity reference ™)
87 (?<!\\)\(TM\)=!..backslash..!texttrademark!..braceleft..!!..braceright..!
90 # ... Ellipsis (entity reference …)
91 (?<!\\)\.\.\.=!..backslash..!dots!..braceleft..!!..braceright..!
94 # Recognize escaped unicode characters
95 # FIXME: these should be uncommented, but then there are encoding
98 #&#([0-9]*);=!..backslash..!unichar!..braceleft..!\1!..braceright..!
99 #&#x([0123456789abcdefABCDEF]*);=!..backslash..!unichar!..braceleft..!{eval:0x\1}!..braceright..!
102 ->=!..backslash..!textrightarrow!..braceleft..!!..braceright..!
103 # => right double arrow (have to enter math mode)
104 =>=!..dollar..!!..backslash..!Rightarrow!..braceleft..!!..braceright..!!..dollar..!
106 <-=!..backslash..!textleftarrow!..braceleft..!!..braceright..!
107 # <= left double arrow (have to enter math mode)
108 <\==!..dollar..!!..backslash..!Leftarrow!..braceleft..!!..braceright..!!..dollar..!
109 # --> long right arrow (have to enter math mode)
110 -->=!..backslash..!textrightarrow!..braceleft..!!..braceright..!
111 # ==> long right double arrow (have to enter math mode)
112 =\=>=!..dollar..!!..backslash..!Rightarrow!..braceleft..!!..braceright..!!..dollar..!
113 # <-- long left arrow (have to enter math mode)
114 <--=!..backslash..!textleftarrow!..braceleft..!!..braceright..!
115 # <== long left double arrow (have to enter math mode)
116 <\=\==!..dollar..!!..backslash..!Leftarrow!..braceleft..!!..braceright..!!..dollar..!
143 # Ruler is interpreted as a page break.
148 !..backslash..!href!..braceleft..!{link}!..braceright..!!..braceleft..!!..percent..!
149 !..backslash..!includegraphics[{scale?scale={scale},}{width?width={width}pt,}{height? height={height}pt}]!..braceleft..!{target}!..braceright..!
150 {link#}!..braceright..!
155 \\hypertarget\{{id}\}\{\}
158 \includegraphics[{scale?scale={scale},}{width?width={width}pt,}{height? height={height}pt}]\{{target}\}%
163 [indexterm-inlinemacro]
165 !..backslash..!index!..braceleft..!{1}{2?!{2}}{3?!{3}}!..braceright..!
167 [indexterm2-inlinemacro]
169 # Single entry index term that is visible in the primary text flow.
170 !..backslash..!index!..braceleft..!{1}!..braceright..!{1}
172 [footnote-inlinemacro]
174 !..backslash..!footnote!..braceleft..!{0}!..braceright..!
176 [footnoteref-inlinemacro]
179 [callout-inlinemacro]
183 [literal-inlinemacro]
186 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} \begin\{itemize\}|\end\{itemize\}
191 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
196 list={title?\minisec\{{title}\}} \par{id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} |
197 item=\begin\{quote\}|\end\{quote\}
199 term=\noindent\textbf\{%|\}
203 [listtags-horizontal]
204 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} \begin\{description\}|\end\{description\}
212 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
217 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
218 item=\begin\{quotation\}|\end\{quotation\}
225 list={title?\minisec\{{title}\}} {id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} \begin\{enumerate\}|\end\{enumerate\}
232 [listtags-bibliography]
233 list=biblist={title?\minisec\{{title}\}} {id?\label\{{id}\}\\hypertarget\{{id}\}\{\}} \begin\{description\} | \end\{description\}
240 superscript=!..backslash..!textsuperscript!..braceleft..!|!..braceright..!
241 subscript=!..backslash..!textsubscript!..braceleft..!|!..braceright..!
248 emphasis=!..backslash..!emph!..braceleft..!|!..braceright..!
249 strong=!..backslash..!textbf!..braceleft..!|!..braceright..!
250 monospaced=!..backslash..!texttt!..braceleft..!|!..braceright..!
251 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..!
254 # $$ inline passthrough.
259 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{1={name}:{target}}!..braceright..!
261 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{1={name}:{target}}!..braceright..!
263 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{1={name}:{target}}!..braceright..!
265 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{1={name}:{target}}!..braceright..!
267 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{1={target}}!..braceright..!
269 !..backslash..!href!..braceleft..!{name}:{target}!..braceright..!!..braceleft..!{1={target}}!..braceright..!
271 !..backslash..!href!..braceleft..!{target}!..braceright..!!..braceleft..!{1={target}}!..braceright..!
274 !..backslash..!label!..braceleft..!{target}!..braceright..!!..backslash..!hypertarget!..braceleft..!{target}!..braceright..!!..braceleft..!{0={target}}!..braceright..!
276 [anchor2-inlinemacro]
277 !..backslash..!label!..braceleft..!{1}!..braceright..!!..backslash..!hypertarget!..braceleft..!{1}!..braceright..!!..braceleft..!{2={1}}!..braceright..!
279 [anchor3-inlinemacro]
280 {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..!
283 {style#}{style$page:!..backslash..!pageref!..braceleft..!{target}!..braceright..!}
284 {style#}{style$autoref:!..backslash..!autoref!..braceleft..!{target}!..braceright..!}
285 {style#}{style$ref:!..backslash..!ref!..braceleft..!{target}!..braceright..!}
286 {style#}{latex-use-bibliography-environment#}{style$cite:!..backslash..!cite!..braceleft..!{target}!..braceright..!}
287 {style#}{latex-use-bibliography-environment%}{style$cite:!..backslash..!hyperlink!..braceleft..!{target}!..braceright..!!..braceleft..!{0=[{target}]}!..braceright..!}
288 {style%}!..backslash..!hyperlink!..braceleft..!{target}!..braceright..!!..braceleft..!{0=[{target}]}!..braceright..!
292 {3#}{3$page:!..backslash..!pageref!..braceleft..!{1}!..braceright..!}
293 {3#}{3$autoref:!..backslash..!autoref!..braceleft..!{1}!..braceright..!}
294 {3#}{3$ref:!..backslash..!ref!..braceleft..!{1}!..braceright..!}
295 {3#}{latex-use-bibliography-environment#}{3$cite:!..backslash..!cite!..braceleft..!{1}!..braceright..!}
296 {3#}{latex-use-bibliography-environment%}{3$cite:!..backslash..!hyperlink!..braceleft..!{1}!..braceright..!!..braceleft..!{2=[{1}]}!..braceright..!}
297 {3%}!..backslash..!hyperlink!..braceleft..!{1}!..braceright..!!..braceleft..!{2=[{1}]}!..braceright..!
300 # Special word substitution.
302 !..backslash..!emph!..braceleft..!{words}!..braceright..!
304 !..backslash..!texttt!..braceleft..!{words}!..braceright..!
306 !..backslash..!textbf!..braceleft..!{words}!..braceright..!
310 # Paragraph substitution.
312 {title%} \par{latex-indent-paragraphs!\noindent\{\}}
313 {title#} \paragraph\{{title}:\}
314 \label\{{id}\}\\hypertarget\{{id}\}\{\}
319 # The literal block employs the same markup.
320 template::[literalblock]
323 # The verse block employs the same markup.
324 template::[verseblock]
326 [admonitionparagraph]
327 # The admonition block employs the same markup.
328 template::[admonitionblock]
334 # FIXME: without the FANCYVRBSTOP we would get an unwanted
335 # blank line before \end{Verbatim}.
347 # in the output .tex. This might be a bug/feature in AsciiDoc
348 # when {newline} is thrown at it.
351 \minisec\{{caption=}{title}\}
352 \label\{{id}\}\\hypertarget\{{id}\}\{\}
353 \begin\{Verbatim\}[frame=single]{newline}
355 {newline}FANCYVRBSTOP
362 \label\{{id}\}\\hypertarget\{{id}\}\{\}
371 \label\{{id}\}\\hypertarget\{{id}\}\{\}
380 \label\{{id}\}\\hypertarget\{{id}\}\{\}
382 ifndef::latex-use-colored-sidebar-blocks[]
383 \setlength\{\tabcolsep\}\{0pt\}
384 \rowcolors\{1\}\{\}\{\}
385 \begin\{tabular\}\{l>\{\columncolor[gray]\{.75\}\}rcl\}
389 \begin\{minipage\}\{4in\}
390 endif::latex-use-colored-sidebar-blocks[]
391 ifdef::latex-use-colored-sidebar-blocks[]
392 \fcolorbox\{SidebarBorderColor\}\{SidebarBackgroundColor\}\{\parbox\{\textwidth\}\{
393 endif::latex-use-colored-sidebar-blocks[]
398 ifdef::latex-use-colored-sidebar-blocks[]
401 endif::latex-use-colored-sidebar-blocks[]
402 ifndef::latex-use-colored-sidebar-blocks[]
405 endif::latex-use-colored-sidebar-blocks[]
410 \label\{{id}\}\\hypertarget\{{id}\}\{\}
423 \minisec\{{caption=}{title}\}
424 \label\{{id}\}\\hypertarget\{{id}\}\{\}
432 \begin\{addmargin*\}[0em]\{0em\}
433 \label\{{id}\}\\hypertarget\{{id}\}\{\}
434 \begin\{minipage\}\{\\linewidth\}
435 {icons#} \includegraphics\{{icon={iconsdir}/{name}.png}\}
436 {icons%} \minisec\{{caption}\}
437 \rule\{\\linewidth\}\{2pt\}
438 \par\{\}\\noindent\{\}|\par\{\}\\noindent\{\}%
439 \rule[.25\baselineskip]\{\\linewidth\}\{2pt\}
444 # Same as numbered list.
445 [listdef-bibliography]
451 # Same as labeled list.
462 [tabletags-monospaced]
478 colspec=>\{{colalign@left:\\raggedright}{colalign@center:\\centering}{colalign@right:\\raggedleft}\}p\{ {colwidth}pt \}
479 bodyrow=| \tabularnewline
480 headdata=\{\\bfseries\{\}|\} {colnumber@{colcount}::&}
481 footdata=\{\\bfseries\{\}|\} {colnumber@{colcount}::&}
482 bodydata=| {colnumber@{colcount}:%:&}
488 ifdef::latex-use-colored-tables[]
489 \rowcolors\{1\}\{TableEvenColor\}\{TableOddColor\}
490 \setlength\arrayrulewidth\{1.5pt\}
491 \arrayrulecolor\{TableBorderColor\}
492 endif::latex-use-colored-tables[]
493 {eval:{rowcount}{gt}{latex-table-rowlimit}} \begin\{longtable\}\{
494 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|sides:|}
495 {eval:{rowcount}{gt}{latex-table-rowlimit}} {colspecs}
496 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|sides:|}
497 {eval:{rowcount}{gt}{latex-table-rowlimit}} \}
498 {eval:{rowcount}{gt}{latex-table-rowlimit}} \hypertarget\{{id}\}\{\}
499 {eval:{rowcount}{gt}{latex-table-rowlimit}} \caption\{{title}\}
500 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|topbot:\hline}
501 {eval:{rowcount}{gt}{latex-table-rowlimit}} {headrows}
502 {eval:{rowcount}{gt}{latex-table-rowlimit}} {headrows#} \endhead
503 {eval:{rowcount}{gt}{latex-table-rowlimit}} {footrows}
504 {eval:{rowcount}{gt}{latex-table-rowlimit}} {footrows#} \endlastfoot
505 {eval:{rowcount}{gt}{latex-table-rowlimit}}
506 {eval:{rowcount}{gt}{latex-table-rowlimit}} {bodyrows}
507 {eval:{rowcount}{gt}{latex-table-rowlimit}} {frame$all|topbot:\hline}
508 {eval:{rowcount}{gt}{latex-table-rowlimit}} \label\{{id}\}
509 {eval:{rowcount}{gt}{latex-table-rowlimit}} \end\{longtable\}
510 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title%} \par{latex-indent-paragraphs!\noindent}
511 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title#} \begin\{table\}
512 {eval:{rowcount}{lt}={latex-table-rowlimit}} \hypertarget\{{id}\}\{\}
513 {eval:{rowcount}{lt}={latex-table-rowlimit}} \caption\{{title}\}
514 {eval:{rowcount}{lt}={latex-table-rowlimit}} \begin\{minipage\}\{\\textwidth\}
515 {eval:{rowcount}{lt}={latex-table-rowlimit}} \renewcommand\{\\thefootnote\}\{\\thempfootnote\}
516 {eval:{rowcount}{lt}={latex-table-rowlimit}} \centering
517 {eval:{rowcount}{lt}={latex-table-rowlimit}} \begin\{tabular\}\{lllllllllllllll
518 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|sides:|}
519 {eval:{rowcount}{lt}={latex-table-rowlimit}} {colspecs}
520 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|sides:|}
521 {eval:{rowcount}{lt}={latex-table-rowlimit}} \}
522 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|topbot:\hline}
523 {eval:{rowcount}{lt}={latex-table-rowlimit}} {headrows}
524 {eval:{rowcount}{lt}={latex-table-rowlimit}} {bodyrows}
525 {eval:{rowcount}{lt}={latex-table-rowlimit}} {footrows}
526 {eval:{rowcount}{lt}={latex-table-rowlimit}} {frame$all|topbot:\hline}
527 {eval:{rowcount}{lt}={latex-table-rowlimit}} \end\{tabular\}
528 {eval:{rowcount}{lt}={latex-table-rowlimit}} \renewcommand\{\\footnoterule\}\{\}
529 {eval:{rowcount}{lt}={latex-table-rowlimit}} \end\{minipage\}
530 {eval:{rowcount}{lt}={latex-table-rowlimit}} \label\{{id}\}
531 {eval:{rowcount}{lt}={latex-table-rowlimit}} {title#} \end\{table\}
534 ifdef::doctype-article[]
536 endif::doctype-article[]
538 ifdef::doctype-book[]
539 ^Dedication$=dedication
540 endif::doctype-book[]
544 ifdef::latex-use-bibliography-environment[]
545 ^(Bibliography|References)$=bibliography
546 endif::latex-use-bibliography-environment[]
548 ^Appendix.*$=appendix
551 ^Figures$=list-of-figures
561 \label\{{id}\}\\hypertarget\{{id}\}\{\}
568 \label\{{id}\}\\hypertarget\{{id}\}\{\}
571 ifdef::latex-use-bibliography-environment[]
573 \label\{{id}\}\\hypertarget\{{id}\}\{\}
574 \begin\{thebibliography\}\{99\}
576 \end\{thebibliography\}
577 endif::latex-use-bibliography-environment[]
581 \label\{{id}\}\\hypertarget\{{id}\}\{\}
585 \label\{{id}\}\\hypertarget\{{id}\}\{\}
594 \label\{{id}\}\\hypertarget\{{id}\}\{\}
600 # Untitled elements between header and first section title.
601 ifdef::doctype-book[]
604 \label\{preamble\}\\hypertarget\{{preamble}\}\{\}
605 endif::doctype-book[]
610 ifdef::doctype-book[]
612 endif::doctype-book[]
616 \hypertarget\{{id}\}\{\}
622 \hypertarget\{{id}\}\{\}
627 \hypertarget\{{id}\}\{\}
628 \subsection\{{title}\}
633 \hypertarget\{{id}\}\{\}
634 \subsubsection\{{title}\}
639 #\hypertarget\{{id}\}\{\}
645 # FIXME: if the "backgroundcolor" entry is present as below, the
646 # background comes out black and is unreadable in PDF, although it is
648 # \lstset\{basicstyle=\footnotesize\ttfamily,showstringspaces=false,breaklines,frame=single, rulecolor=\color\{ListingBorderColor\}, backgroundcolor=\color\{ListingBackgroundColor\}, xleftmargin=0cm, linewidth=0.95\textwidth\}
652 {encoding$UTF-8:}% coding: utf-8
653 \documentclass [a4paper,abstracton,titlepage,halfparskip,openany,draft]\{{doctype@article:scrartcl:scrbook}\}
654 \pagestyle\{{latex-use-running-title-headings?headings}{latex-use-running-title-headings!plain}\}
656 \usepackage\{makeidx\}
657 \usepackage[table]\{xcolor\}
659 \definecolor\{LinkColor\}\{rgb\}\{0.33,0.42,0.18\}
660 \definecolor\{TableEvenColor\}\{rgb\}\{0.93,1,0.8\}
661 \definecolor\{TableOddColor\}\{rgb\}\{0.93,1,1\}
662 \definecolor\{TableBorderColor\}\{rgb\}\{0.55,0.67,0.73\}
663 \definecolor\{ListingBorderColor\}\{rgb\}\{0.55,0.55,0.55\}
664 \definecolor\{ListingBackgroundColor\}\{rgb\}\{0.95,0.95,0.95\}
665 \definecolor\{SidebarBorderColor\}\{rgb\}\{0.95,0.95,0.95\}
666 \definecolor\{SidebarBackgroundColor\}\{rgb\}\{1,1,0.93\}
667 \usepackage\{type1ec\}
668 \usepackage[{language=english}]\{babel\}
671 pdftitle=\{{doctitle}\},
672 pdfauthor=\{{author}\},
679 \usepackage\{enumerate\}
680 \usepackage\{graphicx\}
681 \usepackage\{longtable\}
682 \usepackage[T1]\{fontenc\}
684 \usepackage[{encoding@ISO-8859-1:latin1}{encoding@UTF-8:utf8x}{encoding!utf8x}]\{inputenc\}
685 \usepackage\{textcomp\}
687 %\usepackage\{listings\}
688 %\usepackage\{verbatim\}
689 %\usepackage\{moreverb\}
690 \usepackage\{fancyvrb\}
691 \usepackage\{upquote\}
692 \usepackage\{bookman\}
694 \newcommand*\FancyVerbStopString\{FANCYVRBSTOP\}
696 %\lstset\{basicstyle=\footnotesize\ttfamily,showstringspaces=false,breaklines,frame=single, rulecolor=\color\{ListingBorderColor\}, xleftmargin=0cm, linewidth=0.95\textwidth\}
698 {latex-indent-paragraphs%\setlength\{\\parskip\}\{1ex plus 0.5ex minus 0.2ex\}}
701 \DeclareRobustCommand*\textsubscript[1]\{%
702 \@textsubscript\{\selectfont#1\}\}
703 \def\@textsubscript#1\{%
704 \{\m@th\ensuremath\{_\{\mbox\{\fontsize\sf@size\z@#1\}\}\}\}\}
707 \subject\{{subject}\}
709 \author\{{author}{email?, \href\{mailto:{email}\}\{{email}\}}\}
711 %\publishers\{\begin\{tabular\}\{ll\} {revision?\textbf\{Revision:\} & {revision} \\ } {keywords?\textbf\{Keywords:\} & {keywords} \\ } \end\{tabular\}\}
717 %\newcommand{\texttesh}{\textteshlig\/}
719 \label\{header\}\\hypertarget\{header\}\{\}
720 {doctitle#\maketitle}
723 \label\{footer\}\\hypertarget\{footer\}\{\}