I want to prevent the changing of the reference number when I duplicate a portion of the content.The following code works when using the plain
bibliography style, but I need to use the IEEEtran
style.
\begin{filecontents}{\jobname.bib}@book{Knuth1984texbook, Author = {Knuth, D.E.}, Title = {The TEXbook, volume A of Computers and typesetting}, Year = {1984}}@book{Chomsky1957, Address = {The Hague}, Author = {Noam Chomsky}, Publisher = {Mouton}, Title = {Syntactic Structures}, Year = {1957}}\end{filecontents}\documentclass[a4paper,conference]{IEEEtran}\makeatletter\newcommand\remembertext[2]{% #1 is a key, #2 is the text \immediate\write\@auxout{\unexpanded{\global\long\@namedef{mytext@#1}{#2}}}% #2%}\newcommand\recalltext[1]{% \ifcsname mytext@#1\endcsname \@nameuse{mytext@#1}% \else ``??'' \fi}\makeatother\begin{document}The fragment copied, which must render [2] instead of [1]: \begin{quote}``\recalltext{foo}''\end{quote}The first cite of the document: \cite{Chomsky1957}The fragment with the second cite that I want to copy: \remembertext{foo}{Donald Knuth's \TeX book \cite{Knuth1984texbook}}\bibliographystyle{IEEEtran}% \bibliographystyle{plain}\bibliography{\jobname}\end{document}