From ae3d34dfcb8b0387a2ba57345176f2bc7850e963 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Mon, 17 Jan 2022 17:43:32 +0100 Subject: [PATCH] Remove other/autozoil-extras as separate files --- {{cookiecutter.paper_repo_name}}/Makefile | 2 +- .../autozoil-extras.tex | 6 --- {{cookiecutter.paper_repo_name}}/extras.tex | 52 +++++++++++++++++++ .../helpers/prepare-arxiv-package.sh | 2 +- .../other-extras.tex | 43 --------------- 5 files changed, 54 insertions(+), 51 deletions(-) delete mode 100644 {{cookiecutter.paper_repo_name}}/autozoil-extras.tex delete mode 100644 {{cookiecutter.paper_repo_name}}/other-extras.tex diff --git a/{{cookiecutter.paper_repo_name}}/Makefile b/{{cookiecutter.paper_repo_name}}/Makefile index 1a93880..304668f 100644 --- a/{{cookiecutter.paper_repo_name}}/Makefile +++ b/{{cookiecutter.paper_repo_name}}/Makefile @@ -7,7 +7,7 @@ HAS_APPENDIX={{cookiecutter.with_appendix}} LATEX_TEMPLATE={{cookiecutter.latex_template}} WITH_ARXIV_PACKAGE={{cookiecutter.with_arxiv_package}} -CONTENT_TEX_SOURCES=$(filter-out $(PAPER_ID).tex config.tex other-extras.tex autozoil-extras.tex extras.tex metadata.tex preamble.tex the-appendix.tex, $(shell ls **/*.tex)) +CONTENT_TEX_SOURCES=$(filter-out $(PAPER_ID).tex config.tex extras.tex metadata.tex preamble.tex the-appendix.tex, $(shell ls **/*.tex)) CURRENT_DIR=$(shell pwd) AUTOZOIL_DIR?=/opt/autozoil diff --git a/{{cookiecutter.paper_repo_name}}/autozoil-extras.tex b/{{cookiecutter.paper_repo_name}}/autozoil-extras.tex deleted file mode 100644 index 6509ae4..0000000 --- a/{{cookiecutter.paper_repo_name}}/autozoil-extras.tex +++ /dev/null @@ -1,6 +0,0 @@ -{% raw %} -\newcommand{\code}[1]{\texttt{#1}} -\newcommand{\noqa}[1]{} -\newcommand{\noqall}[1]{} -\newcommand{\eng}[1]{\textit{#1}} -{% endraw %} diff --git a/{{cookiecutter.paper_repo_name}}/extras.tex b/{{cookiecutter.paper_repo_name}}/extras.tex index e04af6d..71b9a5b 100644 --- a/{{cookiecutter.paper_repo_name}}/extras.tex +++ b/{{cookiecutter.paper_repo_name}}/extras.tex @@ -1,5 +1,57 @@ {% raw %} + +% DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU'RE DOING +% IF YOU NEED PAPER-SPECIFIC PACKAGES/DEFINITIONS, ADD THEM TO preamble.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}}} + +% Autozoil-related commands +\newcommand{\code}[1]{\texttt{#1}} +\newcommand{\noqa}[1]{} +\newcommand{\noqall}[1]{} +\newcommand{\eng}[1]{\textit{#1}} + \input{other-extras} \input{autozoil-extras} diff --git a/{{cookiecutter.paper_repo_name}}/helpers/prepare-arxiv-package.sh b/{{cookiecutter.paper_repo_name}}/helpers/prepare-arxiv-package.sh index b2bd0ca..2dafb26 100755 --- a/{{cookiecutter.paper_repo_name}}/helpers/prepare-arxiv-package.sh +++ b/{{cookiecutter.paper_repo_name}}/helpers/prepare-arxiv-package.sh @@ -132,7 +132,7 @@ fi copy_to_project bibliography.bib -perl -pne 's/^\s*\\usepackage\{xurl\}$//' -i "$project_dir/other-extras.tex" +perl -pne 's/^\s*\\usepackage\{xurl\}$//' -i "$project_dir/extras.tex" heredir=`pwd` diff --git a/{{cookiecutter.paper_repo_name}}/other-extras.tex b/{{cookiecutter.paper_repo_name}}/other-extras.tex deleted file mode 100644 index a44e4f7..0000000 --- a/{{cookiecutter.paper_repo_name}}/other-extras.tex +++ /dev/null @@ -1,43 +0,0 @@ -{% 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}} -% 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}}} -{% endraw %}