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:

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.
multibib
package warns of a similar limitation (see § 1.3 Limitations). – jon Jul 29 '13 at 20:40\cite{
with\cite{1
and\bibitem{
with\bibitem{1
in the 1st paper, etc. – Chris H Jul 30 '13 at 10:32