paper-cutter/{{cookiecutter.paper_repo_name}}/other-extras.tex
Filip Gralinski 67c788fe69 Init from an internal repo.
Commit d5b6f8e831fc5c933af5ceb1267f51ef6af6c438
2020-11-24 08:33:07 +01:00

41 lines
1.1 KiB
TeX

{% raw %}
% various custom definitions
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[textsize=tiny]{todonotes}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{latexsym}
% so that footnotes in tables would work
% https://tex.stackexchange.com/questions/109467/footnote-in-tabular-environment
\usepackage{footnote}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\makesavenoteenv{table*}
% for better typesetting of URLs
\usepackage{xurl}
% input without unwanted end-of-line characters
\newcommand\minput[1]{%
\input{#1}%
\ifhmode\ifnum\lastnodetype=11 \unskip\fi\fi}
% Gonito stuff
\usepackage{hyperref}
\usepackage{xstring}
% Format a reference to a Gonito submission
\newcommand{\gonitoref}[1]{\{\href{https://gonito.net/q/#1}{\StrMid{#1}{1}{6}}\}}
% A bare score from Gonito
\newcommand{\gonitobarescore}[1]{\minput{scores/#1.txt}}
% A score from Gonito along with a reference
\newcommand{\gonitoscore}[1]{\gonitobarescore{#1} \gonitoref{#1}}
% A reference and a score as two cells in a table
\newcommand{\gonitoentry}[1]{\gonitoref{#1} & \minput{scores/#1.txt}}
{% endraw %}