pandoc/default.context

137 lines
3 KiB
Text
Raw Normal View History

$if(context-lang)$
\mainlanguage[$context-lang$]
2012-03-05 19:33:13 -05:00
$endif$
$if(context-dir)$
\setupalign[$context-dir$]
\setupdirections[bidi=on,method=two]
$endif$
2011-08-23 10:25:30 -04:00
% Enable hyperlinks
\setupinteraction
[state=start$if(style)$,
style=$style$$endif$$if(linkcolor)$,
color=$linkcolor$,
contrastcolor=$linkcolor$$endif$$if(title)$,
title=$title$$endif$$if(subtitle)$,
subtitle=$subtitle$$endif$$if(author)$,
author=$author$$endif$$if(keywords)$,
keyword=$keywords$$endif$]
% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter,section,subsection,subsubsection][chapter,section]
\setupinteractionscreen[option=bookmark]
$if(papersize)$
\setuppapersize[$for(papersize)$$papersize$$sep$,
$endfor$]
$endif$
$if(layout)$
\setuplayout[$for(layout)$$layout$$sep$,
$endfor$]
$endif$
$if(pagenumbering)$
\setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,
$endfor$]
$endif$
\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes] % use microtypography
\setupalign[hz,hanging]
\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted
$if(mainfont)$
\definefontfamily[mainfont][serif][$mainfont$]
$endif$
$if(sansfont)$
\definefontfamily[sansfont][sans][$sansfont$]
$endif$
$if(monofont)$
\definefontfamily[monofont][mono][$monofont$][features=none]
$endif$
$if(mathfont)$
\definefontfamily[mathfont][math][$mathfont$]
$endif$
\setupbodyfont[mainfont$if(fontsize)$,$fontsize$$endif$]
$if(whitespace)$
\setupwhitespace[$whitespace$]
$else$
2011-08-23 10:25:30 -04:00
\setupwhitespace[medium]
$endif$
$if(interlinespace)$
\setupinterlinespace[$interlinespace$]
$endif$
2011-08-23 10:25:30 -04:00
\setuphead[chapter] [style=\tfd]
\setuphead[section] [style=\tfc]
\setuphead[subsection] [style=\tfb]
\setuphead[subsubsection][style=\bf]
$if(headertext)$
\setupheadertexts[$headertext$]
$endif$
$if(footertext)$
\setupfootertexts[$footertext$]
$endif$
$if(number-sections)$
$else$
\setuphead[chapter, section, subsection, subsubsection][number=no]
$endif$
2011-07-19 12:02:59 -07:00
2011-08-23 10:25:30 -04:00
\definedescription
[description]
2015-06-28 23:35:43 +02:00
[headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging]
2011-07-19 12:02:59 -07:00
2011-08-23 10:28:41 -04:00
\setupitemize[autointro] % prevent orphan list intro
\setupitemize[indentnext=no]
2011-07-19 12:02:59 -07:00
\setupfloat[figure][default={here,nonumber}]
\setupfloat[table][default={here,nonumber}]
2011-08-23 10:25:30 -04:00
\setupthinrules[width=15em] % width of horizontal rules
2011-07-19 12:02:59 -07:00
$for(header-includes)$
$header-includes$
$endfor$
\starttext
$if(title)$
\startalignment[center]
\blank[2*big]
{\tfd $title$}
$if(subtitle)$
\blank[3*medium]
{\tfa $subtitle$}
$endif$
2011-07-19 12:02:59 -07:00
$if(author)$
\blank[3*medium]
{\tfa $for(author)$$author$$sep$\crlf $endfor$}
$endif$
$if(date)$
\blank[2*medium]
{\tfa $date$}
$endif$
\blank[3*medium]
\stopalignment
$endif$
$if(abstract)$
\midaligned{\bf Abstract}
\startnarrower[2*middle]
$abstract$
\stopnarrower
\blank[big]
$endif$
2011-07-19 12:02:59 -07:00
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
\completecontent
$endif$
$if(lot)$
\completelistoftables
$endif$
$if(lof)$
\completelistoffigures
2011-07-19 12:02:59 -07:00
$endif$
$body$
$for(include-after)$
$include-after$
$endfor$
\stoptext