git.iko.soy/typeable/pandoc
on master help sign in
LaTeX template: Move hyperref before polyglossia.

This avoids an error "Please load package hyperref before bidi package, and then try to run xelatex on your document again". See jgm/pandoc-templates #96.

commit68b460db92ec0cdc920ef9b77f469917b70a17e8 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 27 May 2015, 12:23 (11 years ago) parent4a9aaf6
4 files changed+31−31
data/templates+1−1 tests/lhs-test.latex+17−17 tests/lhs-test.latex+lhs+2−2 tests/writer.latex+11−11
data/templates+1−1

Submodule changed.

tests/lhs-test.latex+17−17
@@ -23,6 +23,23 @@
2323\usepackage{microtype}
2424\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
2525}{}
26+\ifxetex
27+ \usepackage[setpagesize=false, % page size defined by xetex
28+ unicode=false, % unicode breaks when used with xetex
29+ xetex]{hyperref}
30+\else
31+ \usepackage[unicode=true]{hyperref}
32+\fi
33+\hypersetup{breaklinks=true,
34+ bookmarks=true,
35+ pdfauthor={},
36+ pdftitle={},
37+ colorlinks=true,
38+ citecolor=blue,
39+ urlcolor=blue,
40+ linkcolor=magenta,
41+ pdfborder={0 0 0}}
42+\urlstyle{same} % don't use monospace font for urls
2643\usepackage{color}
2744\usepackage{fancyvrb}
2845\newcommand{\VerbBar}{|}
@@ -61,23 +78,6 @@
6178\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
6279\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
6380\newcommand{\NormalTok}[1]{{#1}}
64−\ifxetex
65− \usepackage[setpagesize=false, % page size defined by xetex
66− unicode=false, % unicode breaks when used with xetex
67− xetex]{hyperref}
68−\else
69− \usepackage[unicode=true]{hyperref}
70−\fi
71−\hypersetup{breaklinks=true,
72− bookmarks=true,
73− pdfauthor={},
74− pdftitle={},
75− colorlinks=true,
76− citecolor=blue,
77− urlcolor=blue,
78− linkcolor=magenta,
79− pdfborder={0 0 0}}
80−\urlstyle{same} % don't use monospace font for urls
8181\setlength{\parindent}{0pt}
8282\setlength{\parskip}{6pt plus 2pt minus 1pt}
8383\setlength{\emergencystretch}{3em} % prevent overfull lines
tests/lhs-test.latex+lhs+2−2
@@ -23,8 +23,6 @@
2323\usepackage{microtype}
2424\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
2525}{}
26−\usepackage{listings}
27−\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
2826\ifxetex
2927 \usepackage[setpagesize=false, % page size defined by xetex
3028 unicode=false, % unicode breaks when used with xetex
@@ -42,6 +40,8 @@
4240 linkcolor=magenta,
4341 pdfborder={0 0 0}}
4442\urlstyle{same} % don't use monospace font for urls
43+\usepackage{listings}
44+\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
4545\setlength{\parindent}{0pt}
4646\setlength{\parskip}{6pt plus 2pt minus 1pt}
4747\setlength{\emergencystretch}{3em} % prevent overfull lines
tests/writer.latex+11−11
@@ -23,17 +23,6 @@
2323\usepackage{microtype}
2424\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
2525}{}
26−\usepackage{fancyvrb}
27−\VerbatimFootnotes
28−\usepackage{graphicx,grffile}
29−\makeatletter
30−\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
31−\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
32−\makeatother
33−% Scale images if necessary, so that they will not overflow the page
34−% margins by default, and it is still possible to overwrite the defaults
35−% using explicit options in \includegraphics[width, height, ...]{}
36−\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
3726\ifxetex
3827 \usepackage[setpagesize=false, % page size defined by xetex
3928 unicode=false, % unicode breaks when used with xetex
@@ -51,6 +40,17 @@
5140 linkcolor=magenta,
5241 pdfborder={0 0 0}}
5342\urlstyle{same} % don't use monospace font for urls
43+\usepackage{fancyvrb}
44+\VerbatimFootnotes
45+\usepackage{graphicx,grffile}
46+\makeatletter
47+\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
48+\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
49+\makeatother
50+% Scale images if necessary, so that they will not overflow the page
51+% margins by default, and it is still possible to overwrite the defaults
52+% using explicit options in \includegraphics[width, height, ...]{}
53+\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
5454\usepackage[normalem]{ulem}
5555% avoid problems with \sout in headers with hyperref:
5656\pdfstringdefDisableCommands{\renewcommand{\sout}{}}