Is it possible to define a LaTeX command that takes as input a citation key and gives as output the section of the article, in which this key appeared the first time (inside \cite{}), i.e. where this given reference was first referred to? (not using bibtex or biblatex)

  • Could you clarify what you mean by "not using bibtex or biblatex"? – Mico Feb 23 '16 at 20:10
  • By using the built-in bibliography management of LaTeX. – Moppe Feb 26 '16 at 11:02
  • The "built-in bibliography management [tools] of LaTeX" are rather rudimentary, I'm afraid. Are you talking about a hand-assembled thebibliography environment? – Mico Feb 26 '16 at 11:53
  • Yes, I am. And I do know they are rudimentary, but the situation is what it is. I just want to know, what data is there available on the citations and how can it be accessed? – Moppe Feb 29 '16 at 10:48
  • @Mico they're also required by journals in some situations (i.e. not obsolete), so the question is still interesting. – Chris H Feb 29 '16 at 11:12

I'm not sure about your use case, but here a starting point for you with package backref. At least, it prints the number of section(s) where each bib.-item was cited after the item itself.


  \ifcase #1 %
    No citations.%
    One citation in section #2.%
    #1 citations in sections #2.%


\section{First Section}

\section{Second Section}
\cite{CA}, \cite{MSW00}, \cite{Rei91}

\section{Third Section}
\cite{MSW00}, \cite{Rei91}

\section{Fourth Section}
\cite{CA}, \cite{MSW00}, \cite{Rei91}

\bibitem{HB98} Huynen, M.~A. and Bork, P. 1998. Measuring genome
  evolution. {\itshape Proceedings of the National Academy of Sciences
    USA} 95:5849--5856.

\bibitem{CA} Caprara, A. 1997. Sorting by reversals is difficult. In:
  {\itshape Proceedings of the First Annual International Conference
    on Computational Molecular Biology (RECOMB 97),} New York: ACM.
  pp. 75--83.

\bibitem{MSW00} McLysaght, A., Seoighe, C. and Wolfe, K.~H. 2000. High
  frequency of inversions during eukaryote gene order evolution.  In
  Sankoff, D. and Nadeau, J.~H., editors, {\itshape Comparative
    Genomics}, Dordrecht, NL: Kluwer Academic Press. pp. 47--58.

\bibitem{Rei91} Reinelt, G. 1991. {\itshape The Traveling Salesman -
    Computational Solutions for TSP Applications.} Berlin: Springer



enter image description here

  • The case is, that a book contains a bibliography after each section. To avoid repeating printing references again, it would be useful to say that you can find the reference in the bibliography of this section. An example: You have a citation \cite{MSW00} in section 2. You cite it again in a later section, and you can then cite it as, let's say [2.3] (third reference in section 2). – Moppe Feb 26 '16 at 11:13

A colleague had a solution for the problem:


             {\section*{\refname}%  %% use \bibname instead of
                                 %  %% \refname if using the
                                 %  %% report or book document classes
               % %% ^^ added \the\c@section
                    % %% ^^ added \the\c@section
                    \@clubpenalty \clubpenalty
               {\@latex@warning{Empty `thebibliography' environment}}%



Blah blah blah~\cite{cite1}, and see later~\cite{cite2}.

\bibitem{cite1} Foo bar. 


Bleh bleh bleh~\cite{cite2}. And also~\cite{cite1}.

\bibitem{cite2} Baz bof.


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.