💾 Archived View for eoghan.speleo.dev › files › log › cave-log.tex.dep.txt captured on 2024-08-18 at 17:03:31.

View Raw

More Information

⬅️ Previous capture (2022-06-04)

-=-=-=-=-=-=-

%!TEX TS-program = xelatex
%
% Latex template for my cave logs
% 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=11mm,
    bottom=11mm,
    left=11mm,
    right=11mm,
    includefoot,
    footskip=26pt
}

% Move all page numbers to the right
\usepackage{fancyhdr}
\fancyhf{} % clear all header and footers
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\rfoot{\thepage}
%\rfoot{\vspace*{0.75\baselineskip}\thepage}
\pagestyle{fancy}


%
% Setting Font
%
\usepackage{fontspec}
\setmainfont{Helvetica}


%
% Paragraphs
%
\setlength{\parindent}{0pt}
\setlength{\parsep}{12pt}
\setlength{\parskip}{12pt}
%\setlength{\baselineskip}{16pt} % 16 pt line height less 11pt font
\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=blue
}
$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}{$toc-depth$}
$endif$

%
% Section Centring
%
\usepackage{titlesec}
\titlespacing*
    {\section}
    {0pt} % Left
    {59pt} % Before Sep
    {2pt} % After Sep
    % 48pt plus 11pt + 11

\titlespacing*
    {\subsection}
    {0pt}
    {28pt}
    {-10pt}

\titleformat
    {\section} % Command
    {\normalfont\fontsize{25pt}{80pt}\bfseries\centering} % Format
    {\thesection} % Label
    {0em} % Separation
    {} % Before Code

\titleformat
    {\subsection}
    {\normalfont\fontsize{18pt}{18pt}\bfseries}
    {\thesection}
    {0em}
    {}


%
% 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}