1
0
Fork 0

Bibliography will now only be output if \cite is used at least once

master
Mike Gerwitz 2013-08-22 11:56:45 -04:00
parent 6f753c7e15
commit c7e8247e93
1 changed files with 17 additions and 3 deletions

View File

@ -124,6 +124,17 @@
}}
% we'll output a bibliography if \cite is used
\newif\iflvspec@bib
\let\cite@orig\cite
\def\cite{%
\global\lvspec@bibtrue
% restore original command and re-invoke
\global\let\cite\cite@orig
\cite
}
%%
% Paragraph numbering and example environment
@ -667,9 +678,12 @@
\AtEndDocument{%
\pnumoff\@hrestore
\bibliographystyle{plain}
\renewcommand{\bibname}{References}
\bibliography{common}
% only output bibliography if \cite was used
\iflvspec@bib
\bibliographystyle{plain}
\renewcommand{\bibname}{References}
\bibliography{common}
\fi
\begingroup
\markright{Index}
\small