While trying to define a macro that "enhances" \citet (i.e. enables me to produce references looking the way I want them to look), a bunch of errors are generated which do not make any sense to me.
Code: Select all
\newcommand{\helperListCfCitet}[3]{
h1:(#2)\\
\whereischar[q]{#2}{,}
\newcounter{myc}
\setcounter{myc}{\theresult}
h2:(\themyc)\\
\addtocounter{myc}{-1}
h3:(\substr{#2}{1}{\themyc})\\
\citet{\substr{#2}{1}{\themyc}}
}
Gives the following errors:
etc. etc.! Undefined control sequence.
<argument> \equal
{tyrvinencharacterizingevolving2006,q45}{}
l.52 ...et{tyrvinencharacterizingevolving2006,q45}
?
! Argument of \@tempc has an extra }.
<inserted text>
\par
l.52 ...et{tyrvinencharacterizingevolving2006,q45}
?
Runaway argument?
{\TE@neg }\def \@tempb {\@tempc }\ifx \@tempa \@tempb \toks@ \expandafter \ETC.
! Paragraph ended before \@tempc was complete.
<to be read again>
\par
l.52 ...et{tyrvinencharacterizingevolving2006,q45}
?
! Missing \endcsname inserted.
<to be read again>
\toks@
l.52 ...et{tyrvinencharacterizingevolving2006,q45}
?
! Missing \endcsname inserted.
<to be read again>
\toks@
l.52 ...et{tyrvinencharacterizingevolving2006,q45}
I get the idea that I need to tell Latex to first evaluate the \substr expression and only pass on the result to \citet. But I have no idea what command to use.
A minimal examples is attached. Since I couldn't upload the bib-file, here it comes (test.bib)
Code: Select all
@article{tyrvinencharacterizingevolving2006,
title = {Characterizing the evolving research on enterprise content management},
volume = {15},
url = {http://www.ingentaconnect.com/content/pal/0960085x/2006/00000015/00000006/art00009},
doi = {10.1057/palgrave.ejis.3000648},
number = {6},
journal = {European Journal of Information Systems},
author = {Pasi Tyrväinen and Tero Päivärinta and Airi Salminen and Juhani Iivari},
month = dec,
year = {2006},
keywords = {1,2,3,4},
pages = {627--634},
comment = {general model of ECM research issues},
comment = {include content perspective}
}
Any would be greatly appreciated. Thanks a bunch in advance,
Michael