Bibliography will now only be output if \cite is used at least once
parent
6f753c7e15
commit
c7e8247e93
14
lvspec.cls
14
lvspec.cls
|
@ -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
|
% Paragraph numbering and example environment
|
||||||
|
@ -667,9 +678,12 @@
|
||||||
|
|
||||||
\AtEndDocument{%
|
\AtEndDocument{%
|
||||||
\pnumoff\@hrestore
|
\pnumoff\@hrestore
|
||||||
|
% only output bibliography if \cite was used
|
||||||
|
\iflvspec@bib
|
||||||
\bibliographystyle{plain}
|
\bibliographystyle{plain}
|
||||||
\renewcommand{\bibname}{References}
|
\renewcommand{\bibname}{References}
|
||||||
\bibliography{common}
|
\bibliography{common}
|
||||||
|
\fi
|
||||||
\begingroup
|
\begingroup
|
||||||
\markright{Index}
|
\markright{Index}
|
||||||
\small
|
\small
|
||||||
|
|
Loading…
Reference in New Issue