6

I'm compiling a journal in which each paper is a \section*, using \include to put the whole thing together. Reference-wise each paper has the following format:

``Lorem''.\footnote{Bostock \cite{bostock2} p.~87.}
``Ipsum''.\footnote{Ibid.~p.~133.}

\begin{thebibliography}{99}

\bibitem{bostock2} Bostock, D. (2009) \emph{Philosophy of Mathematics}. Oxford: Wiley-Blackwell.

\end{thebibliography}

This works reasonably, but I've realised it's buggy if two papers use the same label (which, since papers are typeset separately, is very possible). So if Paper 1 only cites bostock2 but Paper 2 cites bostock1 and bostock2 in that order, the footnotes that ought to read [1] in Paper 1 will read [2].

I appreciate that this is a very messy way to be doing things anyway, but is there a minimally-disruptive way (viz. one that doesn't involve making non-specialists spend even more time rearranging someone else's bibliography than they do already) to fix this?


MWE:

\documentclass{article}
\begin{document}

\section*{Paper 1}

Ipsum \cite{ipsum}, % I want this to produce the text '[1]', since it is number 1 in this paper's bibliography.
Dolor \cite{dolor}

\begin{thebibliography}{9}
\bibitem{ipsum} Ipsum
\bibitem{dolor} Dolor
\end{thebibliography}

\section*{Paper 2}

Lorem \cite{lorem}, Ipsum \cite{ipsum}

\begin{thebibliography}{9}
\bibitem{lorem} Lorem
\bibitem{ipsum} Ipsum
\end{thebibliography}

\end{document}
  • Sadly that wouldn't solve the issue; in the example I explain above, it's entirely legitimate for Paper 1 and Paper 2 both to cite the same work but for Paper 1 to cite it as [1] and Paper 2 as [2]. The papers should be able to stand alone with their bibliographies as fully referenced, as is the convention (as far as I know) in journals. – dbmag9 Jul 29 '13 at 20:13
  • Sorry, I missed the word 'journal' and was speaking of a book of collected articles (where a centralized bibliography makes more sense); and I don't use numerical bibliography styles either, so I should've kep my mouth shut. (However, I still advocate on principle using a more intelligent bib label philosophy.) As for your specific problem I'd be very interested to hear if a solution (rather than 'mere' workarounds) is possible. I think even the multibib package warns of a similar limitation (see § 1.3 Limitations). – jon Jul 29 '13 at 20:40
  • I can only offer a workaround - automate the process of find&replace the bibitems and citations, prepending the sequence number of the paper in the journal or something. It wouldn't be too hard to code something in VB/python, though for a short list you could do it manually -- replace \cite{ with \cite{1 and \bibitem{ with \bibitem{1 in the 1st paper, etc. – Chris H Jul 30 '13 at 10:32
  • As far as I can see it, you only get warnings about multiply defined labels and no errors. Despite that it still compiles correctly. But I can only guess, because I don't know all the features of your document. Could you please include a MWE that contains the 'error/problem'. – Martin - マーチン Jul 30 '13 at 12:00
  • @ChrisH That occurred to me, but I'd still much rather there was a software solution (since paper order isn't fixed until later in the process, this would require labels like 'SmithBostock09pom' which are somewhat unwieldy and feels like cheating). – dbmag9 Jul 30 '13 at 13:32
1

You can apply ChrisH's prefix solution as a software fix by modifying the macros to add the prefix automatically. To do this, add in the preamble:

% Save old cite/bibitem command(s)
\let\oldcite\cite
\let\oldtextcite\textcite % Add others as needed
\let\oldbibitem\bibitem

% Add new counter to increment at each paper
\newcounter{papernum}
\def\nextpaper{\stepcounter{papernum}}

% Define new cite/bibitem command(s) with prefix applied
\def\mynewcite#1{\oldcite{\thepapernum#1}}%
\def\mynewtextcite#1{\oldtextcite{\thepapernum#1}}%
\def\mynewbibitem#1{\oldbibitem{\thepapernum#1}}%

% Reroute original commands to new commands
\let\cite\mynewcite%
\let\textcite\mynewtextcite%
\let\bibitem\mynewbibitem%

And then the only other change needed is to add \nextpaper at the beginning of each paper. As noted in the code below, you could apply this to all \section* commands, but you would need to take care that the counter is not incremented in places where it shouldn't be (like right before the references are typeset, in this case).

As desired, the output becomes:

bibliography

Full Code

\documentclass{article}
\begin{document}

% Save old cite/bibitem command(s)
\let\oldcite\cite
\let\oldtextcite\textcite % Add others as needed
\let\oldbibitem\bibitem

% Add new counter to increment at each paper
\newcounter{papernum}
\def\nextpaper{\stepcounter{papernum}}

% Define new cite/bibitem command(s) with prefix applied
\def\mynewcite#1{\oldcite{\thepapernum#1}}%
\def\mynewtextcite#1{\oldtextcite{\thepapernum#1}}%
\def\mynewbibitem#1{\oldbibitem{\thepapernum#1}}%

% Reroute original commands to new commands
\let\cite\mynewcite%
\let\textcite\mynewtextcite%
\let\bibitem\mynewbibitem%

\section*{Paper 1}\nextpaper %This could be wrapped into whatever unit you use to start a new paper; just make sure another sectioning command (in this case, References is also a \section*) doesn't increment the counter in places you don't want it to.
Ipsum \cite{ipsum}, % I want this to produce the text '[1]', since it is number 1 in this paper's bibliography.
Dolor \cite{dolor}

\begin{thebibliography}{9}
\bibitem{ipsum} Ipsum
\bibitem{dolor} Dolor
\end{thebibliography}

\section*{Paper 2}\nextpaper
Lorem \cite{lorem}, Ipsum \cite{ipsum}

\begin{thebibliography}{9}
\bibitem{lorem} Lorem
\bibitem{ipsum} Ipsum
\end{thebibliography}

\end{document}

Alternative

Just another thought...

ChrisH also commented, "I assume joining PDFs isn't an option, as articles may share a page?" This is actually a strategy employed by some journals, where papers are designed with wider margins and no header/pagenumber. These "camera-ready" papers can be added to the journal doc with pdfpages and have the header/pagenumber generated within the bigger package and overlaid on the papers (via a mechanism similar to the answer here).

For example, the IEEEtran.cls class is designed with this approach in mind. Excerpts from the documentation note:

  • The margins are increased as the height of the text is reduced to about 9.25in. In particular, the bottom margin will become larger than that of the top as IEEE wants extra clearance at the bottom. The text height will not be exactly 9.25in, but will vary slightly with the normal font size to ensure an integer number of lines in a column.

  • Headings and page numbers are not displayed in the headers or footers. This, coupled with symmetric horizontal margins, will mean that there will not be a noticeable difference between one and two sided options.

and

Publication IDs are not to be placed by the author on camera ready conference papers so \pubid{} is disabled in conference mode. Instead the bottom margin is automatically increased by IEEEtran when in conference mode to give IEEE room for such marks at the time of publication. In draft mode, the publisher ID mark will not be printed at the bottom of the titlepage, but room will be cleared for it.

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.