Skip to content

Commit

Permalink
Correctly support verbatim-in-notes in template that already supports it
Browse files Browse the repository at this point in the history
Based on Pandoc template change jgm/pandoc@c9cf856
  • Loading branch information
cderv committed May 2, 2023
1 parent 79d93c4 commit 04743ea
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
7 changes: 6 additions & 1 deletion inst/rmarkdown/templates/asa/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
$endif$
\usepackage{textcomp}

$if(verbatim-in-note)$
% For Pandoc feature verbatim_in_note
\usepackage{fancyvrb}
$endif$

%\pdfminorversion=4
% NOTE: To produce blinded version, replace "0" with "1" below.
\newcommand{\blind}{$blinded$}
Expand Down Expand Up @@ -96,7 +101,7 @@
\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$
$if(verbatim-in-note)$
\VerbatimFootnotes % allow verbatim text in footnotes
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
\hypersetup{
$if(title-meta)$
Expand Down
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/elsevier/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(verbatim-in-note)$
% For Pandoc feature verbatim_in_note
\usepackage{fancyvrb}
$endif$
$if(graphics)$
Expand Down
6 changes: 5 additions & 1 deletion inst/rmarkdown/templates/glossa/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
\usepackage[linguistics]{forest} %for nice trees!
\usepackage{longtable}

$if(verbatim-in-note)$
% For Pandoc feature verbatim_in_note
\usepackage{fancyvrb}
$endif$

\title[$if(shorttitle)$$shorttitle$$endif$]{$title$$if(wordcount)$\\ \bigskip \large Word count: $wordcount$$endif$}
% Optional short title inside square brackets, for the running headers.

Expand Down Expand Up @@ -129,7 +134,6 @@
$endif$

$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$

Expand Down
6 changes: 5 additions & 1 deletion inst/rmarkdown/templates/jasa/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$

$if(verbatim-in-note)$
% For Pandoc feature verbatim_in_note
\usepackage{fancyvrb}
$endif$

$if(highlighting-macros)$
% Pandoc syntax highlighting
$highlighting-macros$
Expand Down Expand Up @@ -113,7 +118,6 @@
$endif$

$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$

Expand Down
6 changes: 5 additions & 1 deletion inst/rmarkdown/templates/joss/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
]{biblatex}
\bibliography{$bibliography$}

$if(verbatim-in-note)$
% For Pandoc feature verbatim_in_note
\usepackage{fancyvrb}
$endif$


% --- Page layout -------------------------------------------------------------
\usepackage[top=3.5cm, bottom=3cm, right=1.5cm, left=1.0cm,
Expand Down Expand Up @@ -198,7 +203,6 @@
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(graphics)$
Expand Down
4 changes: 4 additions & 0 deletions inst/rmarkdown/templates/oup_v1/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

% From Pandoc template for its feature
$if(verbatim-in-note)$
% For Pandoc feature verbatim_in_note
\usepackage{fancyvrb}
$endif$
\usepackage{xcolor}
Expand Down Expand Up @@ -137,6 +138,9 @@
% Make links footnotes instead of hotlinks:
\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$
$if(verbatim-in-note)$
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(strikeout)$
% For pandoc feature
$if(pandoc3)$
Expand Down
6 changes: 5 additions & 1 deletion inst/rmarkdown/templates/pihph/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
\usepackage{graphicx}
\usepackage[type={CC}, modifier={by}, version=4.0]{doclicense}

$if(verbatim-in-note)$
% For Pandoc feature verbatim_in_note
\usepackage{fancyvrb}
$endif$

\newcommand\affiliation[1]{{\normalfont\normalsize\itshape#1}}

\pagestyle{simple}
Expand Down Expand Up @@ -174,7 +179,6 @@ \section*{\textcolor{pihphgreen}{Comments invited}}
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$

Expand Down

0 comments on commit 04743ea

Please sign in to comment.