git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #141 from adunning/keywords

ConTeXt/LaTeX/Beamer clean-up

commitef963c30605d7f0558b9cfbf7183f0aa4aad688e authorJohn MacFarlane <jgm@berkeley.edu> dateThu 12 Nov 2015, 16:00 (11 years ago) parent12a0110e0bd757
3 files changed+68−46
default.beamer+9−7 default.context+27−21 default.latex+32−18
default.beamer+9−7
@@ -21,7 +21,7 @@ $endif$
2121\setbeamertemplate{caption label separator}{: }
2222\setbeamercolor{caption name}{fg=normal text.fg}
2323$if(fontfamily)$
24−\usepackage[$fontfamilyoptions$]{$fontfamily$}
24+\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
2525$else$
2626\usepackage{lmodern}
2727$endif$
@@ -43,20 +43,20 @@ $endif$
4343 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
4444 \newcommand{\euro}{€}
4545$if(mainfont)$
46− \setmainfont[$mainfontoptions$]{$mainfont$}
46+ \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
4747$endif$
4848$if(sansfont)$
49− \setsansfont[$sansfontoptions$]{$sansfont$}
49+ \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
5050$endif$
5151$if(monofont)$
52− \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$monofontoptions$$endif$]{$monofont$}
52+ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
5353$endif$
5454$if(mathfont)$
55− \setmathfont(Digits,Latin,Greek)[$mathfontoptions$]{$mathfont$}
55+ \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
5656$endif$
5757$if(CJKmainfont)$
5858 \usepackage{xeCJK}
59− \setCJKmainfont[$CJKoptions$]{$CJKmainfont$}
59+ \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
6060$endif$
6161\fi
6262% use upquote if available, for straight quotes in verbatim environments
@@ -68,8 +68,10 @@ $endif$
6868}{}
6969$if(lang)$
7070\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
71− \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$$sep$,$endfor$,main=$babel-lang$]{babel}
71+ \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
72+$if(babel-newcommands)$
7273 $babel-newcommands$
74+$endif$
7375\else
7476 \usepackage{polyglossia}
7577 \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
default.context+27−21
@@ -8,31 +8,38 @@ $endif$
88% Enable hyperlinks
99\setupinteraction
1010 [state=start,
11− style=$if(style)$$style$$else$normal$endif$,
12− color=$if(linkcolor)$$linkcolor$$else$black$endif$,
13− contrastcolor=$if(linkcolor)$$linkcolor$$else$black$endif$$if(title)$,
14− title=$title$$endif$$if(subtitle)$,
15− subtitle=$subtitle$$endif$$if(author)$,
16− author=$for(author)$$author$$sep$; $endfor$$endif$$if(keywords)$,
17− keyword=$keywords$$endif$]
11+$if(title)$
12+ title={$title$},
13+$endif$
14+$if(subtitle)$
15+ subtitle={$subtitle$},
16+$endif$
17+$if(author)$
18+ author={$for(author)$$author$$sep$; $endfor$},
19+$endif$
20+$if(keywords)$
21+ keyword={$for(keywords)$$keywords$$sep$; $endfor$},
22+$endif$
23+ style=$linkstyle$,
24+ color=$linkcolor$,
25+ contrastcolor=$linkcontrastcolor$]
1826% make chapter, section bookmarks visible when opening document
1927\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
2028\setupinteractionscreen[option=bookmark]
2129\setuptagging[state=start]
2230
2331$if(papersize)$
24−\setuppapersize[$for(papersize)$$papersize$$sep$,
25− $endfor$]
32+\setuppapersize[$for(papersize)$$papersize$$sep$,$endfor$]
2633$endif$
2734$if(layout)$
28−\setuplayout[$for(layout)$$layout$$sep$,
29− $endfor$]
35+\setuplayout[$for(layout)$$layout$$sep$,$endfor$]
3036$endif$
3137$if(pagenumbering)$
32−\setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,
33− $endfor$]
38+\setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,$endfor$]
3439$endif$
35−\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes] % use microtypography
40+% use microtypography
41+\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes,pnum=yes]
42+\definefontfeature[smallcaps][smallcaps][protrusion=quality,expansion=quality,onum=yes,pnum=yes]
3643\setupalign[hz,hanging]
3744\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted
3845$if(mainfont)$
@@ -48,13 +55,12 @@ $if(mathfont)$
4855\definefontfamily[mathfont][math][$mathfont$]
4956$endif$
5057\setupbodyfont[mainfont$if(fontsize)$,$fontsize$$endif$]
51−$if(whitespace)$
52−\setupwhitespace[$whitespace$]
53−$else$
54−\setupwhitespace[medium]
58+\setupwhitespace[$if(whitespace)$$whitespace$$else$medium$endif$]
59+$if(indenting)$
60+\setupindenting[$for(indenting)$$indenting$$sep$,$endfor$]
5561$endif$
5662$if(interlinespace)$
57−\setupinterlinespace[$interlinespace$]
63+\setupinterlinespace[$for(interlinespace)$$interlinespace$$sep$,$endfor$]
5864$endif$
5965
6066\setuphead[chapter] [style=\tfd,header=empty]
@@ -65,10 +71,10 @@ $endif$
6571\setuphead[subsubsubsubsection][style=\it]
6672
6773$if(headertext)$
68−\setupheadertexts[$headertext$]
74+\setupheadertexts$for(headertext)$[$headertext$]$endfor$
6975$endif$
7076$if(footertext)$
71−\setupfootertexts[$footertext$]
77+\setupfootertexts$for(footertext)$[$footertext$]$endfor$
7278$endif$
7379$if(number-sections)$
7480$else$
default.latex+32−18
@@ -1,6 +1,6 @@
11\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
22$if(fontfamily)$
3−\usepackage[$fontfamilyoptions$]{$fontfamily$}
3+\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
44$else$
55\usepackage{lmodern}
66$endif$
@@ -26,20 +26,20 @@ $endif$
2626 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
2727 \newcommand{\euro}{€}
2828$if(mainfont)$
29− \setmainfont[$mainfontoptions$]{$mainfont$}
29+ \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
3030$endif$
3131$if(sansfont)$
32− \setsansfont[$sansfontoptions$]{$sansfont$}
32+ \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
3333$endif$
3434$if(monofont)$
35− \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$monofontoptions$$endif$]{$monofont$}
35+ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
3636$endif$
3737$if(mathfont)$
38− \setmathfont(Digits,Latin,Greek)[$mathfontoptions$]{$mathfont$}
38+ \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
3939$endif$
4040$if(CJKmainfont)$
4141 \usepackage{xeCJK}
42− \setCJKmainfont[$CJKoptions$]{$CJKmainfont$}
42+ \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
4343$endif$
4444\fi
4545% use upquote if available, for straight quotes in verbatim environments
@@ -54,23 +54,35 @@ $if(geometry)$
5454$endif$
5555\usepackage{hyperref}
5656\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
57−\hypersetup{breaklinks=true,
58− unicode=true,$if(title-meta)$
59− pdftitle={$title-meta$},$endif$$if(author-meta)$
60− pdfauthor={$author-meta$},$endif$$if(subtitle)$
61− pdfsubject={$subtitle$},$endif$$if(keywords)$
62− pdfkeywords={$keywords$},$endif$
57+\hypersetup{unicode=true,
58+$if(title-meta)$
59+ pdftitle={$title-meta$},
60+$endif$
61+$if(author-meta)$
62+ pdfauthor={$author-meta$},
63+$endif$
64+$if(subtitle)$
65+ pdfsubject={$subtitle$},
66+$endif$
67+$if(keywords)$
68+ pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$},
69+$endif$
70+$if(colorlinks)$
6371 colorlinks=true,
64− citecolor=$if(citecolor)$$citecolor$$else$black$endif$,
65− urlcolor=$if(urlcolor)$$urlcolor$$else$black$endif$,
66− linkcolor=$if(linkcolor)$$linkcolor$$else$black$endif$,
67− pdfborder={0 0 0}$if(hidelinks)$,
68− hidelinks$endif$}
72+ linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
73+ citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
74+ urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
75+$else$
76+ pdfborder={0 0 0},
77+$endif$
78+ breaklinks=true}
6979\urlstyle{same} % don't use monospace font for urls
7080$if(lang)$
7181\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
72− \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$$sep$,$endfor$,main=$babel-lang$]{babel}
82+ \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
83+$if(babel-newcommands)$
7384 $babel-newcommands$
85+$endif$
7486\else
7587 \usepackage{polyglossia}
7688 \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
@@ -196,7 +208,9 @@ $include-before$
196208$endfor$
197209$if(toc)$
198210{
211+$if(colorlinks)$
199212\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
213+$endif$
200214\setcounter{tocdepth}{$toc-depth$}
201215\tableofcontents
202216}