I am trying to implement my own version of \affiliation
and \author
to use in my posters.
I would like to have options to show indices of affiliations in the form of \arabic
, \alph
and \fnsymbol
.
Arabic and alph outputs both work correctly, but not \fnsymbol
.
MWE:
\documentclass[]{article}
\usepackage{etoolbox}
\begin{document}
\newcounter{x}
\csxdef{tmp}{}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\alph{x},}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\alph{x}}
Authorname$^{\csuse{tmp}}$ %
\setcounter{x}{0}
\csxdef{tmp}{}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\arabic{x},}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\arabic{x}}
Authorname$^{\csuse{tmp}}$ %
\setcounter{x}{0}
\csxdef{tmp}{}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\fnsymbol{x},}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\fnsymbol{x}}
Authorname$^{\csuse{tmp}}$ %
\setcounter{x}{0}
\csxdef{tmp}{}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\alph{x},}
\stepcounter{x}
\csxdef{tmp}{\csuse{tmp}\alph{x}}
Authorname$^{\csuse{tmp}}$ %
\end{document}
The output:
And error messages:
Missing } inserted. ...csuse{tmp} $\to$ Authorname$^{\csuse{tmp}
I understand, that \fnsymbol
produces math-mode output, and my code is missing proper switching between text and math modes, but I cannot find where this happens.
\textsuperscript{...}
instead of$^{...}$
seems to be fine. – campa Sep 21 '15 at 15:15\textsuperscript
is implemented and made proper correction for my purpose. – Intercombats Sep 21 '15 at 15:55\csuse
etc. here? I can't say whether they cause the problem, but it looks strange on first glance – user31729 Sep 21 '15 at 18:43\newcommand{\printauthor}[1]{ \csuse{author#1}$^{\csuse{authfa#1}}$% }
, whereauth#N
stores name of the author, andauthfa#N
- symbols, corresponding to affiliations (numbers, letters or fnsymbols). – Intercombats Sep 21 '15 at 19:04