I'm using \citeall with a custom entry formatter to list all the entries in my bib file, but I'd like to conditionally format entries from a specific journal. To do this, I've tried using \ifthenelse to string compare against the result of \citefield{key}{journaltitle}, but it's not working. Snippet:
\newcommand{\completecite}[1]{%
\ifstrequal{\citefield{#1}{journaltitle}}{CoRR}{TRUE}{FALSE}
}
\citeall[\completecite]
spits out "FALSE" for every entry, even though
\newcommand{\completecite}[1]{%
\citefield{#1}{journaltitle}
}
\citeall[\completecite]
has many outputs that are "CoRR". I figure the problem is that the string \citefield{#1}{journaltitle} is being compared against "CoRR", when what I want is to compare against the result of calling the \citefield macro.
I've tried \expandafter and various other more elaborate string compare examples, but nothing has worked yet. I've tinkered with the xstring, xifthen and pdftexcmds packages too. Heck, even using etoolbox's \ifdefstring as
\newcommand{\completecite}[1]{%
\ifdefstring{\citefield{#1}{journaltitle}}{CoRR}{TRUE}{FALSE}
}
\citeall[\completecite]
didn't work.
