44 lines
1.3 KiB
TeX
44 lines
1.3 KiB
TeX
|
|
% 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}}
|
|
% A reference and a score as two cells in a table, the score will be
|
|
% marked as the best (typeset in bold)
|
|
\newcommand{\gonitobestentry}[1]{\gonitoref{#1} & \textbf{\minput{scores/#1.txt}}}
|
|
|