git.iko.soy/typeable/pandoc
on master help sign in
latex template: move special treatment of \sout.

It needs to be inside the if(strikeout) condition, after the ulem package is imported; otherwise we try to renewcommand{\sout} when \sout isn't yet defined.

commit654c39a7d2de17149feb180703f371f2f54e41a5 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 21 Jan 2011, 19:24 (16 years ago) parentd072692
7 files changed+5−13
templates/latex.template+2−2 tests/biblatex-citations.latex−2 tests/latex-reader.latex+1−1 tests/lhs-test.latex−2 tests/lhs-test.latex+lhs−2 tests/natbib-citations.latex−2 tests/writer.latex+2−2
templates/latex.template+2−2
@@ -47,6 +47,8 @@ $if(tables)$
4747$endif$
4848$if(strikeout)$
4949\usepackage[normalem]{ulem}
50+% avoid problems with \sout in headers with hyperref:
51+\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
5052$endif$
5153$if(subscript)$
5254\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
@@ -67,8 +69,6 @@ $if(graphics)$
6769\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
6870$endif$
6971\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
70−% avoid problems with \sout in headers with hyperref:
71−\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
7272\setlength{\parindent}{0pt}
7373\setlength{\parskip}{6pt plus 2pt minus 1pt}
7474$if(numbersections)$
tests/biblatex-citations.latex−2
@@ -5,8 +5,6 @@
55\usepackage{biblatex}
66\bibliography{biblio}
77\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
8−% avoid problems with \sout in headers with hyperref:
9−\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
108\setlength{\parindent}{0pt}
119\setlength{\parskip}{6pt plus 2pt minus 1pt}
1210\setcounter{secnumdepth}{0}
tests/latex-reader.latex+1−1
@@ -6,9 +6,9 @@
66
77\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
88\usepackage[breaklinks=true,unicode=true]{hyperref}
9+\usepackage[normalem]{ulem}
910% avoid problems with \sout in headers with hyperref:
1011\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
11−\usepackage[normalem]{ulem}
1212\usepackage{enumerate}
1313\usepackage{fancyvrb}
1414\usepackage{graphicx}
tests/lhs-test.latex−2
@@ -3,8 +3,6 @@
33\usepackage[mathletters]{ucs}
44\usepackage[utf8x]{inputenc}
55\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
6−% avoid problems with \sout in headers with hyperref:
7−\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
86\setlength{\parindent}{0pt}
97\setlength{\parskip}{6pt plus 2pt minus 1pt}
108\setcounter{secnumdepth}{0}
tests/lhs-test.latex+lhs−2
@@ -5,8 +5,6 @@
55\usepackage{listings}
66\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
77\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
8−% avoid problems with \sout in headers with hyperref:
9−\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
108\setlength{\parindent}{0pt}
119\setlength{\parskip}{6pt plus 2pt minus 1pt}
1210\setcounter{secnumdepth}{0}
tests/natbib-citations.latex−2
@@ -5,8 +5,6 @@
55\usepackage{natbib}
66\bibliographystyle{plainnat}
77\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
8−% avoid problems with \sout in headers with hyperref:
9−\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
108\setlength{\parindent}{0pt}
119\setlength{\parskip}{6pt plus 2pt minus 1pt}
1210\setcounter{secnumdepth}{0}
tests/writer.latex+2−2
@@ -11,6 +11,8 @@
1111}\makeatother
1212\usepackage{enumerate}
1313\usepackage[normalem]{ulem}
14+% avoid problems with \sout in headers with hyperref:
15+\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
1416\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
1517\usepackage{url}
1618\usepackage{graphicx}
@@ -24,8 +26,6 @@
2426\let\Oldincludegraphics\includegraphics
2527\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
2628\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
27−% avoid problems with \sout in headers with hyperref:
28−\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
2929\setlength{\parindent}{0pt}
3030\setlength{\parskip}{6pt plus 2pt minus 1pt}
3131\setcounter{secnumdepth}{0}