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.
1) How do I make the 'REFERENCES' title start on a new line, AFTER the centred line?
You don't. As you've noticed, revtex4
style inserts a short horizontal rule immediately ahead of the bibliography and does not provide a separate header (such as "REFERENCES"). If you need to use the revtex4
document class, do not modify this very basic and distinctive document layout feature.
2) How can I get the bibitem numbering to be formatted like in square brackets, normal character format? (The prb standards I found say they should be in square brackets)
The revtex4
document class automatically loads the natbib
package. Thus, inserting the instruction
\setcitestyle{numbers,square}
in the preamble will give you non-superscript numbers encased in square brackets.
That said, you should seriously reconsider whether you really have to change the citation call-out style. On page 110 of the user guide of revtex4
class, under section 28.4.2, "prb", one finds:
PRB requires superscript citations.
Thus, if you provide the prb
option to the \documentclass
instruction, you should almost certainly not change the citation call-out style to plain-numbers-encased-in-brackets.
\documentclass[twocolumn,prb]{revtex4} % prb is Physics Review B
\usepackage{amsmath} % need for subequations
\usepackage{graphicx} % need for figures
\usepackage{amssymb}
\usepackage{hyperref} % no need to provide 'pdftex' option
\setcitestyle{numbers,square} % do reconsider whether this is necessary or advisable
\begin{document}
\section{Conclusion}
There are articles that would be missed if only one or two databases\slash sources were searched.\cite{1}
%%\appendix
%%\section*{References}
\begin{thebibliography}{1}
\bibitem{1}
D Baye and P-H Heenen,
J.\ Phys. A:Math.\ Gen., \textbf{19}, 2041--2059 (1986).
\end{thebibliography}
\end{document}
Best Answer
I'm not sure why you wish to use square wheels, but, since you do, perhaps something like this would suit:
Here is the result of the square wheels defined in the code: