Last active
September 10, 2020 12:30
-
-
Save IdlePhysicist/93126bcb0b7aca5d7af51f025c5f533e to your computer and use it in GitHub Desktop.
LaTeX templates for Pandoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!TEX TS-program = xelatex | |
% | |
% Latex template for my cave logs | |
% Eoghan, 2019 | |
% | |
\documentclass[11pt]{article} | |
% | |
% Setup for the Typewriter look | |
% | |
\usepackage{manuscript} | |
\usepackage[T1]{fontenc} % To do fadas etc. | |
\usepackage{ulem} | |
\renewcommand{\ULdepth}{3pt} | |
% | |
% Page Layout & Margins | |
% | |
\usepackage{geometry} | |
\geometry{ | |
a4paper, % 210×297 millimeters or 8.27×11.69 inches. In PS 595×842 pt | |
top=21mm, | |
bottom=11mm, | |
left=19mm,%11mm, | |
right=19mm,%11mm, | |
includefoot, | |
footskip=35pt %26pt | |
} | |
% | |
% Section Centring | |
% | |
\usepackage{titlesec} | |
\titlespacing* | |
{\section} | |
{0pt} % Left | |
{20pt}%{59pt} % Before Sep | |
{2pt} % After Sep | |
% 48pt plus 11pt + 11 | |
\titlespacing* | |
{\subsection} | |
{0pt} | |
{18pt} | |
{0pt} | |
\titleformat | |
{\section} % Command | |
{\fontsize{11pt}{20pt}\centering\MakeUppercase} % Format | |
{\thesection} % Label | |
{0em} % Separation | |
{\uline} % Before Code | |
\titleformat | |
{\subsection} | |
{\fontsize{11pt}{18pt}\MakeUppercase} | |
{\thesection} | |
{0em} | |
{\uline} | |
% | |
% Paragraphs | |
% | |
\setlength{\parindent}{0pt} | |
\setlength{\parsep}{12pt} | |
\setlength{\parskip}{12pt} | |
\linespread{1.2} % YESSSS 1.2 IS THE MAGIC NUMBER | |
% | |
% Symbols for Equations | |
% | |
\usepackage{amsmath} | |
% | |
% Hyperlinks | |
% | |
\usepackage[breaklinks=true]{hyperref} | |
\hypersetup{ | |
colorlinks, | |
citecolor=blue, | |
filecolor=blue, | |
linkcolor=blue, | |
urlcolor=black | |
} | |
$if(url)$ | |
\usepackage{url} | |
$endif$ | |
% | |
% Subscripts | |
% | |
% Pandoc remembers whether you used subscripts, assigning True to | |
% its `subscript` variable | |
% It then needs to adopt a default with an incantation like this: | |
$if(subscript)$ | |
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}} | |
$endif$ | |
% | |
% Section numbering. | |
% | |
% Here again is a variable you can specify on the commandline | |
% `markdown2pdf my.txt --number-sections --xetex --template=/wherever/this/is -o my.pdf` | |
$if(numbersections)$ | |
$else$ | |
\setcounter{secnumdepth}{0} | |
$endif$ | |
% | |
% Images | |
% | |
$if(graphics)$ | |
\usepackage{longtable,booktabs} % Stack Exchange said to use it | |
\usepackage{graphicx} | |
% Redefine \includegraphics so that, unless explicit options are | |
% given, the image width will not exceed the width or the height of the page. | |
% Images get their normal width if they fit onto the page, but | |
% are scaled down if they would overflow the margins. | |
\makeatletter | |
\def\ScaleWidthIfNeeded{% | |
\ifdim\Gin@nat@width>\linewidth | |
\linewidth | |
\else | |
\Gin@nat@width | |
\fi | |
} | |
\def\ScaleHeightIfNeeded{% | |
\ifdim\Gin@nat@height>0.9\textheight | |
0.9\textheight | |
\else | |
\Gin@nat@width | |
\fi | |
} | |
\makeatother | |
\setkeys{Gin}{width=\ScaleWidthIfNeeded,height=\ScaleHeightIfNeeded,keepaspectratio} | |
$endif$ | |
% | |
% The Document | |
% | |
\begin{document} | |
$if(title)$ | |
\maketitle | |
$endif$ | |
$if(toc)$ | |
\tableofcontents | |
$endif$ | |
$if(alignment)$ | |
\begin{$alignment$} | |
$endif$ | |
$body$ | |
$if(alignment)$ | |
\end{$alignment$} | |
$endif$ | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!TEX TS-program = xelatex | |
% | |
% Latex template for memos | |
% Eoghan, 2019 | |
% | |
\documentclass[11pt]{article} | |
% | |
% Page Layout & Margins | |
% | |
\usepackage{geometry} | |
\geometry{ | |
a4paper, % 210×297 millimeters or 8.27×11.69 inches. In PS 595×842 pt | |
top=21mm, | |
bottom=11mm, | |
left=11mm, | |
right=11mm, | |
includefoot, | |
footskip=35pt %26pt | |
} | |
% | |
% Setup for the Typewriter look | |
% | |
\usepackage{fontspec} | |
\usepackage[T1]{fontenc} % To do fadas etc. | |
\usepackage{textcomp} | |
\usepackage{ulem} | |
\renewcommand{\ULdepth}{3pt} | |
\setmainfont{Arial} | |
% | |
% Section Centring | |
% | |
\usepackage{titlesec} | |
\titlespacing* | |
{\section} | |
{0pt} % Left | |
{20pt}%{59pt} % Before Sep | |
{2pt} % After Sep | |
% 48pt plus 11pt + 11 | |
\titlespacing* | |
{\subsection} | |
{0pt} | |
{18pt} | |
{0pt} | |
\titleformat | |
{\section} % Command | |
{\fontsize{11pt}{20pt}\centering\MakeUppercase} % Format | |
{\thesection} % Label | |
{0em} % Separation | |
{\uline} % Before Code | |
\titleformat | |
{\subsection} | |
{\fontsize{11pt}{18pt}\MakeUppercase} | |
{\thesection} | |
{0em} | |
{\uline} | |
% | |
% Paragraphs | |
% | |
\setlength{\parindent}{0pt} | |
\setlength{\parsep}{12pt} | |
\setlength{\parskip}{12pt} | |
\linespread{1.2} % YESSSS 1.2 IS THE MAGIC NUMBER | |
% | |
% Symbols for Equations | |
% | |
\usepackage{amsmath} | |
% | |
% Hyperlinks | |
% | |
\usepackage[breaklinks=true]{hyperref} | |
\hypersetup{ | |
colorlinks, | |
citecolor=blue, | |
filecolor=blue, | |
linkcolor=blue, | |
urlcolor=black | |
} | |
$if(url)$ | |
\usepackage{url} | |
$endif$ | |
% | |
% Subscripts | |
% | |
% Pandoc remembers whether you used subscripts, assigning True to | |
% its `subscript` variable | |
% It then needs to adopt a default with an incantation like this: | |
$if(subscript)$ | |
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}} | |
$endif$ | |
% | |
% Lists | |
% | |
\providecommand{\tightlist}{% | |
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} | |
% | |
% Section numbering. | |
% | |
% Here again is a variable you can specify on the commandline | |
% `markdown2pdf my.txt --number-sections --xetex --template=/wherever/this/is -o my.pdf` | |
$if(numbersections)$ | |
$else$ | |
\setcounter{secnumdepth}{0} | |
$endif$ | |
% | |
% Code Blocks | |
% | |
$if(listings)$ | |
\usepackage{listings} | |
\newcommand{\passthrough}[1]{#1} | |
\lstset{defaultdialect=[5.3]Lua} | |
\lstset{defaultdialect=[x86masm]Assembler} | |
\lstset{ | |
% backgroundcolor=\color{backcolour}, | |
% commentstyle=\color{codegreen}, | |
% keywordstyle=\color{magenta}, | |
% numberstyle=\tiny\color{codegray}, | |
% stringstyle=\color{codepurple}, | |
basicstyle=\ttfamily\small\bfseries, | |
breakatwhitespace=false, | |
breaklines=true, | |
captionpos=b, | |
keepspaces=true, | |
numbers=none, | |
numbersep=10pt, | |
showspaces=false, | |
showstringspaces=false, | |
showtabs=false, | |
tabsize=2 | |
} | |
$endif$ | |
% | |
% Images | |
% | |
$if(graphics)$ | |
\usepackage{longtable,booktabs} % Stack Exchange said to use it | |
\usepackage{graphicx} | |
% Redefine \includegraphics so that, unless explicit options are | |
% given, the image width will not exceed the width or the height of the page. | |
% Images get their normal width if they fit onto the page, but | |
% are scaled down if they would overflow the margins. | |
\makeatletter | |
\def\ScaleWidthIfNeeded{% | |
\ifdim\Gin@nat@width>\linewidth | |
\linewidth | |
\else | |
\Gin@nat@width | |
\fi | |
} | |
\def\ScaleHeightIfNeeded{% | |
\ifdim\Gin@nat@height>0.9\textheight | |
0.9\textheight | |
\else | |
\Gin@nat@width | |
\fi | |
} | |
\makeatother | |
\setkeys{Gin}{width=\ScaleWidthIfNeeded,height=\ScaleHeightIfNeeded,keepaspectratio} | |
$endif$ | |
% | |
% The Document | |
% | |
\begin{document} | |
$if(title)$ | |
\maketitle | |
$endif$ | |
$if(toc)$ | |
\tableofcontents | |
$endif$ | |
$if(alignment)$ | |
\begin{$alignment$} | |
$endif$ | |
$body$ | |
$if(alignment)$ | |
\end{$alignment$} | |
$endif$ | |
\end{document} |
- Hyperlinks that include parameters are not clickable in footnotes.
Hyperlinks appear blue still in which partially kills the look of the document. I don't mind the blue citation, but in terms of regular hyperlinks I would prefer them to be black.RESOLVED
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
note.tex
(and probablycave-log.tex
too) links in footnotes do not wrap and therefore links that are long, overflow the page and are unclickable.