Background
I am currently working on submitting a journal manuscript and am trying to convert my original manuscript from elsarticle
class to cas-dc
based on feedback and recommendations from Elsevier. My code will successfully typeset my document every other time. It runs through, creates the following error message, I re-run and then it deletes the .aux
file and successfully compiles.
Error message:! Missing = inserted for \ifnum.
Normally this would not be an issue but as @PhelypeOleinik pointed out in his answer to my original question, I need to successfully compile the document twice in order to get things like author and title notes to work.
Similar questions
I have looked at the following answer/questions without much success:
Compilation problem with siunitx (returning error regarding ifnum): claims that it's an issue with how versions are maintained and dated, suggests that user update Tex distribution. I have updated everything in MikTex and repeatedly checked for updates until no more updates were available. Issue persists.
Missing=inserted for \ifnum: no answer suggests a potential issue with
beamer
. I am not usingbeamer
, do not think that it is an issue.Missing = inserted for \ifnum error when generating bibliography using natbib : suggests deleting the bib
aux
file and rerunning. This wont work because I need to re-run without deleting theaux
file in order to get all the notes to show up.Missing = inserted for \ifnum. \usepackage: alternately suggest look at the first answer in this list and updating packages/MikTex distribution. I have already updated anything without success.
Error “Missing = inserted for \ifnum”: suggests that it is an issue with how the user was using
pgfmath
functions intikz
package. In my MWE I am not usingtikz
directly (to my knowledge) and issue persists.
MWE
Below is a minimum working example that replicates the issue. I use \input
a lot to keep separate files clean and have replicated that structure here in case that is somehow related. All of the separate files are in the same folder.
In draft_paper.tex
\listfiles
\documentclass[sort&compress]{cas-dc}
\input{settings_options_parameters} % contains all of the settings/options that I don't think we'll need to change very often
\begin{document}
\input{frontmatter}
\end{document}
In settings_options_parameters.tex
\usepackage{natbib}
\usepackage{lipsum}
\ExplSyntaxOn
\keys_set:nn { stm / mktitle } { nologo }
\ExplSyntaxOff
In frontmatter.tex
Based heavily on the documentation for cas-dc
here.
\title[mode=title]{Test Title: 101 Reasons Why I Can't \LaTeX}
\tnotemark[1]
\tnotetext[1]{This document is the result of blood, sweat, tears and taxpayer money.}
\author[1]{Dummy Author One}[%
type=author,
orcid=]
\cormark[1]
\fnmark[1]
\ead[url]{[email protected], \url{fakewebaddress.com}}
\credit{Everything}
\address[1]{Nowheresville, North America}
\author[1]{Dummy Author Two}[%
type=author,
orcid=]
\cormark[2]
\fnmark[2]
\ead[url]{[email protected], \url{phishingsupplies.com}}
\credit{Nothing}
\author[1]{Dummy Author Two}[%
type=author,
orcid=]
\cormark[1,2]
\fnmark[1,2]
\ead[url]{[email protected], \url{hackingsupplies.com}}
\credit{Nothing}
\address[1]{Nowheresville, North America}
\cortext[cor1]{Corresponding author}
\cortext[cor2]{Principal corresponding author}
\fntext[fn1]{This is the first author footnote. but is commonto third author as well.}
\fntext[fn2]{Another author footnote, this is a very longfootnote and it should be a really long footnote. But thisfootnote is not yet sufficiently long enough to make two linesof footnote text.}
% Abstract
\begin{abstract}[SUMMARY]
\lipsum[1-1]
\end{abstract}
% Key words
\begin{keywords}
\LaTeX \sep Science \sep Crying
\end{keywords}
\maketitle
Results
These are images of the end result, the first time it compiles, the second time it throws the error mentioned above and it never shows the title notes \tnotemark
or author notes \cormark
The log
file after the error is thrown can be found here. \listfiles
has been added, but if anything else should be added please let me know.
Many thanks for any help on this issue!