Skip to content

Commit

Permalink
remove a bunch more stuff that's not used
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfenner committed Dec 9, 2023
1 parent f7ff45d commit c849df4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 162 deletions.
4 changes: 3 additions & 1 deletion sample3.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,6 @@ contents longer than one page.
## Thing 49
## Thing 50

Test?
Test?

---
193 changes: 32 additions & 161 deletions template/eisvogel.latex
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,10 @@ $endif$

\usepackage{amsmath,amssymb}
\usepackage{mathtools}
$if(linestretch)$
\usepackage{setspace}
$else$
\usepackage{setspace}
\setstretch{1.0}
$endif$
\usepackage[absolute,overlay]{textpos}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
$if(mathspec)$
\ifxetex{}
\usepackage{mathspec}
Expand All @@ -96,16 +87,14 @@ $if(luatexjapresetoptions)$
\usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
\fi
$endif$
\fi

% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
$if(indent)$
$else$

\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
Expand All @@ -116,15 +105,14 @@ $else$
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$

\usepackage{xcolor}
\definecolor{default-linkcolor}{HTML}{4077C0}
\definecolor{default-filecolor}{HTML}{4077C0}
\definecolor{default-citecolor}{HTML}{4077C0}
\definecolor{default-urlcolor}{HTML}{4077C0}

% TODO: Do we need this feature?
$if(footnotes-pretty)$
% load footmisc in order to customize footnotes (footmisc has to be loaded before hyperref, cf. https://tex.stackexchange.com/a/169124/144087)
\usepackage[hang,flushmargin,bottom,multiple]{footmisc}
Expand All @@ -133,7 +121,10 @@ $if(footnotes-pretty)$
\setlength{\skip\footins}{0.3cm} % set space between page content and footnote
\setlength{\footskip}{0.9cm} % set space between footnote and page bottom
$endif$

\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}

% PDF metadata
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$},
Expand All @@ -160,11 +151,11 @@ $else$
hidelinks,
$endif$
breaklinks=true,
pdfcreator={LaTeX via pandoc with the Eisvogel template}}
pdfcreator={Trusted Computing Group}}


\urlstyle{same} % disable monospaced font for URLs
$if(verbatim-in-note)$
\VerbatimFootnotes{} % allow verbatim text in footnotes
$endif$

$if(geometry)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
$else$
Expand All @@ -181,39 +172,8 @@ $if(logo)$
\usepackage{rotating}
\usepackage{transparent}
$endif$
$if(listings)$
\usepackage{listings}
\newcommand{\passthrough}[1]{#1}
\lstset{defaultdialect=[5.3]Lua}
\lstset{defaultdialect=[x86masm]Assembler}
$endif$
$if(listings-no-page-break)$
\usepackage{etoolbox}
\BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}}
\AfterEndEnvironment{lstlisting}{\end{minipage}\par\addvspace{\topskip}}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(highlighting-macros)$
$highlighting-macros$

% Workaround/bugfix from jannick0.
% See https://github.com/jgm/pandoc/issues/4302#issuecomment-360669013)
% or https://github.com/Wandmalfarbe/pandoc-latex-template/issues/2
%
% Redefine the verbatim environment 'Highlighting' to break long lines (with
% the help of fvextra). Redefinition is necessary because it is unlikely that
% pandoc includes fvextra in the default template.
\usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}}

% Left-justify the document.
\usepackage[document]{ragged2e}
\RaggedRight{}
\sloppy

$endif$
% Customizations to the behavior of tables
$if(tables)$
\usepackage{longtable,booktabs,array}
$if(multirow)$
Expand All @@ -229,11 +189,8 @@ $endif$
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
$endif$
% add backlinks to footnote references, cf. https://tex.stackexchange.com/questions/302266/make-footnote-clickable-both-ways
$if(footnotes-disable-backlinks)$
$else$

\usepackage{footnotebackref}
$endif$
$if(graphics)$
\usepackage{graphicx}
\makeatletter
Expand All @@ -249,15 +206,13 @@ $if(graphics)$
\def\fps@figure{htbp}
\makeatother
$endif$
$if(links-as-notes)$
% Make links footnotes instead of hotlinks:
\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$

$if(strikeout)$
\usepackage[normalem]{ulem}
% Avoid problems with \sout in headers with hyperref
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$

\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
Expand All @@ -266,6 +221,7 @@ $if(numbersections)$
$else$
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
$endif$

$if(block-headings)$
% Make \paragraph and \subparagraph free-standing
\ifx\paragraph\undefined\else
Expand All @@ -277,9 +233,6 @@ $if(block-headings)$
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
$endif$
$if(pagestyle)$
\pagestyle{$pagestyle$}
$endif$

% Make use of float-package and set default placement for figures to H.
% The option H means 'PUT IT HERE' (as opposed to the standard h option which means 'You may put it here if you like').
Expand All @@ -290,40 +243,19 @@ $for(header-includes)$
$header-includes$
$endfor$

%% TCG docs tend to have deeply nested lists, too deep for Pandoc/Latex defaults.
% TCG docs tend to have deeply nested lists, too deep for Pandoc/Latex defaults.
% Increase the limit to 9.
\usepackage{enumitem}
\setlistdepth{9}
\setlist[itemize]{label=\textbullet}
\renewlist{itemize}{itemize}{9}
\setlist[enumerate]{label=\arabic*.}
\renewlist{enumerate}{enumerate}{9}

$if(lang)$
\ifxetex{}
$if(mainfont)$
$else$
% See issue https://github.com/reutenauer/polyglossia/issues/127
\renewcommand*\familydefault{\sfdefault}
$endif$
% Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
\usepackage{polyglossia}
\setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$}
$for(polyglossia-otherlangs)$
\setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$}
$endfor$
\else
\usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
\fi
$endif$
\ifluatex
\usepackage{selnolig} % disable illegal ligatures
\fi

$if(dir)$
\ifxetex
% Load bidi as late as possible as it modifies e.g. graphicx
Expand All @@ -337,38 +269,7 @@ $if(dir)$
\newenvironment{LTR}{\beginL}{\endL}
\fi
$endif$
$if(natbib)$
\usepackage[$natbiboptions$]{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
$endif$
$if(biblatex)$
\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$
$endif$
$if(csl-refs)$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs
\setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
% set entry spacing
\ifnum #2 > 0
\setlength{\parskip}{#2\baselineskip}
\fi
}%
{}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$

$if(csquotes)$
\usepackage{csquotes}
$endif$
Expand All @@ -388,42 +289,20 @@ $endif$
\author{$for(author)$$author$$sep$ \and $endfor$}
\date{$date$}

%%
%% added
%%

%
% language specification
%
% If no language is specified, use English as the default main document language.
%
$if(lang)$$else$
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=english]{babel}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
\else
$if(mainfont)$
$else$
% Workaround for bug in Polyglossia that breaks `\familydefault` when `\setmainlanguage` is used.
% See https://github.com/Wandmalfarbe/pandoc-latex-template/issues/8
% See https://github.com/reutenauer/polyglossia/issues/186
% See https://github.com/reutenauer/polyglossia/issues/127
\renewcommand*\familydefault{\sfdefault}
$endif$
% load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic)
\usepackage{polyglossia}
\setmainlanguage[]{english}
$if(mainfont)$
$else$
% Workaround for bug in Polyglossia that breaks `\familydefault` when `\setmainlanguage` is used.
% See https://github.com/Wandmalfarbe/pandoc-latex-template/issues/8
% See https://github.com/reutenauer/polyglossia/issues/186
% See https://github.com/reutenauer/polyglossia/issues/127
\renewcommand*\familydefault{\sfdefault}
$endif$
% load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic)
\usepackage{polyglossia}
\setmainlanguage[]{english}
$for(polyglossia-otherlangs)$
\setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
$endfor$
\fi
$endif$

$if(page-background)$
\usepackage[pages=all]{background}
$endif$

%
% for the background color of the title page
Expand Down Expand Up @@ -503,9 +382,6 @@ $endif$
%
\definecolor{heading-color}{RGB}{35,61,130}
\addtokomafont{section}{\color{heading-color}}
% When using the classes report, scrreprt, book,
% scrbook or memoir, uncomment the following line.
%\addtokomafont{chapter}{\color{heading-color}}

%
% variables for title, author and date
Expand Down Expand Up @@ -540,7 +416,7 @@ $endif$
$endif$

%
% remove paragraph indention
% remove paragraph indentation
%
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
Expand Down Expand Up @@ -692,11 +568,6 @@ $else$
}
{}
} \fancyfoot{}
% \lhead[$if(header-right)$$header-right$$else$$date$$endif$]{$if(header-left)$$header-left$$else$title$endif$}
% \chead[$if(header-center)$$header-center$$else$$endif$]{$if(header-center)$$header-center$$else$$endif$}
% \rhead[$if(header-left)$$header-left$$else$title$endif$]{$if(header-right)$$header-right$$else$$date$$endif$}
% \lfoot[$if(footer-right)$$footer-right$$else$\thepage$endif$]{$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$}
% \cfoot[$if(footer-center)$$footer-center$$else$$endif$]{$if(footer-center)$$footer-center$$else$$endif$}
\fancyfoot[C]
{
\begin{textblock*}{8.5in}(0in,10.7in)
Expand Down

0 comments on commit c849df4

Please sign in to comment.