Skip to content

Commit

Permalink
Add a check on subtitle for #265
Browse files Browse the repository at this point in the history
  • Loading branch information
kmccurley committed Nov 17, 2024
1 parent 417c1c8 commit f3aaac5
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions iacrcc/iacrcc.cls
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@
}{}
\fi
\if\relax\expandafter\detokenize\expandafter{\@IACR@title@subtitle}\relax\else
\expandafter\checkstring\expandafter{\@IACR@title@subtitle}{subtitle argument to title must be plain text}%
\gdef\@IACR@title@subtitle@defined{}%
\fi
}
Expand Down
8 changes: 8 additions & 0 deletions iacrcc/tests/compile_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1361,4 +1361,12 @@ def test36_test():
assert bibtex_keys[i][0] == labels[i][0]
assert bibtex_keys[i][1] == labels[i][1]
assert len(bibtex_keys) == 10

def test37_test():
path = Path('test37')
with tempfile.TemporaryDirectory() as tmpdirpath:
files = [path / Path('main.tex'), path / Path('iacrcc.cls')]
res = run_engine('-pdf', files, tmpdirpath)
# It should fail because of a bad subtitle.
assert res['proc'].returncode == 12

1 change: 1 addition & 0 deletions iacrcc/tests/test37/iacrcc.cls
34 changes: 34 additions & 0 deletions iacrcc/tests/test37/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
%%%% 1. DOCUMENTCLASS %%%%
\documentclass{iacrcc}
%%%% NOTES:
\newcommand\niceguy{Fester Bestertester}
\license{CC-by}

% NOTE: There are two affiliations, referred to by 1,2
\addauthor[orcid={0000-0003-1010-8157},
inst={1},
footnote={Work done while working for XYZ.}]{Alice Accomplished}
\addaffiliation[ror=02t274463,country={United States}]{University of California, Santa Barbara}

\title[running={Thoughts on binary functions},
subtitle={A story about \niceguy is here},
plaintext={Thoughts about "binary" functions and \$\ on $GF(p)$ by Fester Bestertester at 30°C}]{%
Thoughts about "binary" functions and \$\ on $GF(p)$ by \niceguy\ at 30°C}
\begin{document}

\maketitle

%%%% 5. ABSTRACT %%%%
\begin{abstract}
In this paper we prove that the One-Time-Pad has perfect security, unless you use
double encryption with {$\mathsf{SingleKey}$}.

\end{abstract}
\begin{textabstract}
In this paper we prove that the One-Time-Pad has perfect security, unless you use
double encryption with a single key.
\end{textabstract}
\section{Just a section}
With not much in it.

\end{document}

0 comments on commit f3aaac5

Please sign in to comment.