Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LaTeX problem

  1. Aug 2, 2006 #1
    I'm creating a large document in LaTeX, with several figures. Some of these figures have citations within the captions, which is causing problems since I am creating a list of figures, with captions, at the start of the document. A figure that appears midway through has a reference that should be number 30 based on its appearance in the main text, but because the list of figures is compiled first, it is labelled number 1. How do I get around this?
     
  2. jcsd
  3. Aug 2, 2006 #2

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    try putting teh citation in the text either prior to or just after the figure......
     
  4. Aug 3, 2006 #3

    J77

    User Avatar

    If you only have several figures, manually input the citation numbers into the captions.

    eg. don't use \cite but type out ''[3]''
     
  5. Aug 3, 2006 #4

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    Try writing out the citation in the caption and not as a reference.....
     
  6. Aug 4, 2006 #5
    Thanks for the help, I had hoped there was some way to do it automatically, rather than just typing it out. I'm sure LaTeX must be capable of doing it somehow, I had thought maybe something using \protect. Oh well, I'll just have to admit defeat I guess.
     
  7. Aug 4, 2006 #6
    Latex should not have a problem with citation in a caption (footnotes is a whole other matter). Can you recreate the problem in a minimal example and post it?
    For eksample the following seems to work

    Code (Text):
    \documentclass[article]{memoir}
    \begin{document}
    \listoffigures*\newpage
    \begin{figure}\caption{ddfg 1\cite{citation-here}}\end{figure}
    \begin{figure}\caption{ddfg 2}\end{figure}
    \begin{figure}\caption{ddfg 3}\end{figure}
    \begin{figure}\caption{ddfg 4}\end{figure}
    \begin{figure}\caption{ddfg 5\cite{citation-here}}\end{figure}
    \begin{figure}\caption{ddfg 6}\end{figure}
    \bibliography{bib-file-here}
    \bibliographystyle{plain}
    \end{document}
    otherwise news:comp.text.tex might be able to help (but they will most likely ask for a minimal example as well).
     
  8. Aug 10, 2006 #7
    There would be no problem ordinarily, but the references appear in the text also, and not in the same order as the figures appear. So perhaps an example would be something like:

    Code (Text):
    \documentclass[article]{memoir}
    \begin{document}
    \listoffigures*\newpage
    Blah blah blah \cite{citation-two}.
    \begin{figure}\caption{ddfg 1\cite{citation-one}}\end{figure}
    \begin{figure}\caption{ddfg 2}\end{figure}
    \begin{figure}\caption{ddfg 3}\end{figure}
    \begin{figure}\caption{ddfg 4}\end{figure}
    \begin{figure}\caption{ddfg 5\cite{citation-two}}\end{figure}
    \begin{figure}\caption{ddfg 6}\end{figure}
    Blah blah blah \cite{citation-one}.
    \bibliography{bib-file-here}
    \bibliographystyle{plain}
    \end{document}
    I want the order of the references to be as they are in the text.
     
  9. Aug 11, 2006 #8
  10. Nov 16, 2006 #9
    Follow up on nottocite.sty

    As pointed out in nottocite.sty, all you really need to do is provide a short version of the caption (to be used in the list of figures) that does not include the citation:

    \caption[short version in square brackets without citation, to appear in list of figures]{long version in curly braces with \cite{entrylabelx}, to appear in body with actual figure}

    Therefore, the number assigned to \cite{entrylabelx} corresponds to the citation counter value when the long version of the caption is processed in the body of the document. There is no need to use nottocite.sty if you are ok with providing captions this way.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: LaTeX problem
  1. Problems with LaTeX (Replies: 4)

Loading...