| 1 |
% |
| 2 |
% bibcheck.sty |
| 3 |
% |
| 4 |
% Copyright (c) 2001, Radhakrishnan CV <[email protected]> |
| 5 |
% Rajagopal CV <[email protected]> |
| 6 |
% http://www.river-valley.com |
| 7 |
% |
| 8 |
% River Valley Technologies, Cotton Hills |
| 9 |
% Trivandrum, India 695034 |
| 10 |
% |
| 11 |
% Tel: +91 471 233 7501 |
| 12 |
% |
| 13 |
% This program is free software; you can redistribute it and/or |
| 14 |
% modify it under the terms of the GNU General Public License |
| 15 |
% as published by the Free Software Foundation; either version 2 |
| 16 |
% of the License, or (at your option) any later version. |
| 17 |
% |
| 18 |
% This program is distributed in the hope that it will be useful, |
| 19 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
% GNU General Public License for more details. |
| 22 |
% |
| 23 |
% You should have received a copy of the GNU General Public License |
| 24 |
% along with this program (gpl.txt); if not, write to the Free |
| 25 |
% Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
| 26 |
% MA 02111-1307, USA. |
| 27 |
% |
| 28 |
% $Id: gpl,v 1.1 2001/02/07 11:30:43 cvr Exp $ |
| 29 |
% |
| 30 |
\NeedsTeXFormat{LaTeX2e} |
| 31 |
\def\Fileversion$#1: #2 ${\gdef\fileversion{#2}} |
| 32 |
\def\Filedate$#1: #2 #3 ${\gdef\filedate{#2}} |
| 33 |
\Fileversion$Revision: 1.1 $ |
| 34 |
\Filedate$Date: 2001/02/07 11:30:43 $ |
| 35 |
\ProvidesPackage{bibcheck} |
| 36 |
[\filedate\space\fileversion\space check uncited bibitems (CVR)] |
| 37 |
\PackageWarningNoLine{bibcheck} |
| 38 |
{****************************************\MessageBreak |
| 39 |
Package bibcheck v,\fileversion\space loaded\MessageBreak |
| 40 |
[check uncited bibitems (CVR)]\MessageBreak |
| 41 |
****************************************} |
| 42 |
|
| 43 |
\newwrite\uncitedwrite |
| 44 |
\immediate\openout\uncitedwrite=\jobname.uncited |
| 45 |
\def\definecitelabel#1{\expandafter\gdef\csname CVRBIB#1\endcsname{1}} |
| 46 |
\def\@checkbiblabel#1{% |
| 47 |
\expandafter\ifx\csname CVRBIB#1\endcsname\relax |
| 48 |
\typeout{*******************************************************} |
| 49 |
\typeout{This bibitem [\Xbiblabel] with KEY [#1] is NOT CITED} |
| 50 |
\typeout{*******************************************************} |
| 51 |
\immediate\write\uncitedwrite{Bibitem [\Xbiblabel] with key [#1] not cited} |
| 52 |
\immediate\write\uncitedwrite{} |
| 53 |
\else \relax |
| 54 |
% \typeout{**********************************************************} |
| 55 |
% \typeout{This bibitem with LABEL [#1] is cited in the body text} |
| 56 |
% \typeout{**********************************************************} |
| 57 |
\fi} |
| 58 |
|
| 59 |
\def\@citex[#1]#2{% |
| 60 |
\let\@citea\@empty |
| 61 |
\@cite{\@for\@citeb:=#2\do |
| 62 |
{\@citea\def\@citea{,\penalty\@m\ }% |
| 63 |
\definecitelabel{\@citeb}% |
| 64 |
\edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% |
| 65 |
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi |
| 66 |
\@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% |
| 67 |
\G@refundefinedtrue |
| 68 |
\@latex@warning |
| 69 |
{Citation `\@citeb' on page \thepage \space undefined}}% |
| 70 |
{\hbox{\csname b@\@citeb\endcsname}}}}{#1}} |
| 71 |
|
| 72 |
\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw |
| 73 |
{\def\Xbiblabel{#1}\@checkbiblabel{#2}% |
| 74 |
\let\protect\noexpand |
| 75 |
\immediate |
| 76 |
\write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} |
| 77 |
\def\@bibitem#1{\item\if@filesw |
| 78 |
\def\Xbiblabel{\the\value{\@listctr}}% |
| 79 |
\@checkbiblabel{#1}% |
| 80 |
\immediate\write\@auxout |
| 81 |
{\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces} |
| 82 |
|
| 83 |
\endinput |
| 84 |
|
| 85 |
%% |
| 86 |
%% End of package bibcheck.sty |
| 87 |
%% |