I am writing my PhD thesis and I am using an adapted version of the memoir-class + IEEEtran.bst for the bibliography style.
The idea is to create a specific List of Publications exclusively with the papers of the PhD canditate. This List of Publications is divided in two sections:'pub' denoting peer-reviewed papers, and 'pubOther' for other publications. Inside the document, the command \selfcite{} is used for citations in aforementioned List of Publications.
I get errors if I use \selfcite{} INSIDE a caption, while everything works fine if it is used elsewhere.
Here I copy the error I get:
! Undefined control sequence.
<argument> ...@tempc }\fi \fi \def \@tempa {\@nil
}\ifx \@tempa \@nnil \else...
l.96 ...ncies. (Source: \selfcite{JS2009})}
?
While here I copy the piece of code describing the List of Publications and the command \selfcite
\RequirePackage[resetlabels]{multibib} % Used for multiple bibliographies, as this class enables the use of a separate List of Publications
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% We define two 'sections' in our own List of Publications, but it can be %
% expanded as desired. Here, 'pub' denotes peer-reviewed papers (journals, %
% conferences), and 'pubOther' denote other publications (popular article, %
% invited talk, workshop, ...). Use \selfcite{<key>} to cite these %
% These two lists need to be separately compiled: 'bibtex pub' %
% 'bibtex pubOther' %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\newcites{pub}{Peer-reviewed}
\newcites{pubOther}{Other}
\newcommand\biblabelprefix{}
\newdimen\b@belwidth
\newdimen\b@b@lwidth
\newcommand\setbabelwidth[1]{{%
\newbox\tmp
\setbox\tmp=\hbox{#1}%
\global\b@belwidth=\wd\tmp
}}
\renewcommand\@biblabel[1]{{%
\newbox\tmp
\setbox\tmp=\hbox{#1}%
\@tempdima=\wd\tmp%
\@tempdimb=\m@ne\@tempdima
\advance\@tempdimb by \b@belwidth
\rule{\@tempdimb}{0pt}[\biblabelprefix#1]%
}}
\def\@bibitem#1{%
\item\if@filesw
\immediate\write\@auxout{\string\bibcite{#1}{\biblabelprefix\the\value{\@listctr}}}%
\fi\ignorespaces}
\renewcommand{\@fnsymbol}[1]{%
\ensuremath{%
\ifcase#1\or \dagger\or \ddagger\or
\mathsection\or \|\or \mathparagraph\or **\or \dagger\dagger
\or \ddagger\ddagger \else\@ctrerr\fi
}
}
\newcommand\blfootnote[1]{% Enable a footnote at begin of chapter to say e.g. parts of this chapter were published in ...
\xdef\@thefnmark{\null}
\@footnotetext{%
\hspace{-1.8em}
#1
}
}
\@ifundefined{@mb@citenamelist}{\def\@mb@citenamelist{cite,citep,citet,citealp,citealt}}{\relax}
\def\selfcite#1{\setcitestyle{open={[\initials}}\citepub{#1}\setcitestyle{open={[}}}
\newcommand\listofpublications{{%
\small
\setbabelwidth{10}
\microtypesetup{protrusion=false}%
\renewcommand{\bibsection}{%no chapter but simply section
\section{\bibname}
\prebibhook
}
\renewcommand{\biblabelprefix}{\initials}% Add prefix to biblabel for publications
\continuouslabelstrue
\bibliographystylepub{IEEEtran2}%
\bibliographystylepubOther{IEEEtran2}%
\chapter{List of publications}
\scriptsize
\bibliographypub{IEEEabrv,\bibfile}
\bibliographypubOther{IEEEabrv,\bibfile}%
\microtypesetup{protrusion=true}%
}}
\makeatother
Can you please help me to find the problem? Thanks!
\protectbefore it. – koleygr Oct 20 '18 at 11:14