Save the following in your working directory as xc.sty
:
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xc}
[2011/09/02 v0.1 eXternal Citations (DPC+EG)]
\def\externalcitedocument{\@ifnextchar[\XC@{\XC@[]}}
\def\XC@[#1]#2{{%
\makeatletter
\def\XC@prefix{#1}%
\XC@next#2.aux\relax\\}}
\def\XC@next#1\relax#2\\{%
\edef\XC@list{#2}%
\XC@loop{#1}}
\def\XC@aux{%
\ifx\XC@list\@empty\else\expandafter\XC@explist\fi}
\def\XC@explist{\expandafter\XC@next\XC@list\\}
\def\XC@loop#1{\openin\@inputcheck#1\relax
\ifeof\@inputcheck
\PackageWarning{xc}{^^JNo file #1^^JLABELS NOT IMPORTED.^^J}%
\expandafter\XC@aux
\else
\PackageInfo{xc}{IMPORTING LABELS FROM #1}%
\expandafter\XC@read\fi}
\def\XC@read{%
\read\@inputcheck to\XC@line
\expandafter\XC@test\XC@line...\XC@}
\long\def\XC@test#1#2#3#4\XC@{%
\ifx#1\bibcite
\bibcite{\XC@prefix#2}{#3}%
\else\ifx#1\@input
\edef\XC@list{\XC@list#2\relax}%
\fi\fi
\ifeof\@inputcheck\expandafter\XC@aux
\else\expandafter\XC@read\fi}
\endinput
%%
%% End of file `xc.sty'.
Then say, in your derived.tex
document,
\externalcitedocument{main}
(where main.tex
is the document you are taking the citations from). Now
\cite{xyz}
in derived.tex
will do what you want.
The interface is just the same as xr's: you can also specify a prefix
\externalcitedocument[A-]{main}
and use \cite{A-xyz}
in derived.tex
.
The xc.sty
file has been obtained from xr.sty
with some very simple transformations:
xr
-> xc
XR
-> XC
\externaldocument
-> \externalcitedocument
\newlabel
-> \bibcite
You can redefine the thebibliography
environment to add a convenient vertical (negative) space; a little example in which I decrease the vertical spacing by 5pt
(the line marked with % NEW
):
\documentclass{amsart}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{test,
title = "The title",
author = "The Author",
journal = "The Journal",
year = "2012"}
\end{filecontents*}
\makeatletter
\renewenvironment{thebibliography}[1]{%
\@xp\section\@xp*\@xp{\refname}%
\normalfont\footnotesize\labelsep .5em\relax
\renewcommand\theenumiv{\arabic{enumiv}}\let\p@enumiv\@empty
\vspace*{-5pt}% NEW
\list{\@biblabel{\theenumiv}}{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth \advance\leftmargin\labelsep
\usecounter{enumiv}}%
\sloppy \clubpenalty\@M \widowpenalty\clubpenalty
\sfcode`\.=\@m
}{%
\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
\endlist
}
\makeatother
\begin{document}
\cite{test}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
I would suggest you, however, not to decrease this spacing since doing so the heading and the first reference will appear too close.
Best Answer
Author list
Some common problems:
author = "Del Negro, Marco"
orauthor = "Marco {Del Negro}"
.van
,von
,de
,junior
,senior
are placed incorrectlyFor entries with two or more authors, failure to use the keyword
and
as the separator between names. For instance, the following field uses commas inappropriately:It should be
be consistent with spacing between multiple initials, e.g. sometimes they are exported as
Smith, M.~L.
while others doSmith, M.L.
, orSmith, M. L.
.biblatex
treatSmith, M. L.
andSmith, M.~L.
alike, so there is rarely something to be won using~
between name initials.Smith, M.L.
on the other hand will not be recognised as a name with two first name initials, but rather as only one very unusual first name "M.L.", which may be abbreviated to "M.".