[Tugindia] using \renewcommand with options and arguments
Josy P. Pullockara
josy at ctfd.cmmacs.ernet.in
Fri Oct 15 08:11:40 CEST 2004
Dear TeX users,
Want to \renewcommand \bibitem as shown below without breaking the plain
style bibliography. The below code breaks the plain style. How to fix
it? \bibitem uses the enumiv counter by default for the plain style. How
do I get it incorporated here neatly.
\documentclass{article}
\newcommand{\oldbibitem}[2][]{}
\let\oldbibitem\bibitem
\newcounter{totalbibitem}
\renewcommand{\bibitem}[2][]{\oldbibitem[#1]{#2}\addtocounter{totalbibitem}{1}}
\begin{document}
\cite{cite1, cite2}.
\begin{thebibliography}{9}
\bibitem{cite1} Author1
\bibitem[CITE2]{cite2} Author2
\end{thebibliography}
totalbibitem = \thetotalbibitem
\end{document}
--
Josy P. Pullockara
Scientist, eMail:josy at ctfd.cmmacs.ernet.in
Computational and Theoretical Phone:+91-80-2505 1627
Fluid Dynamics Division, Fax :+91-80-2522 0952
National Aerospace Laboratories Res. :+91-80-2524 5053
----------------------------------------------------------------------
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
More information about the tugindia
mailing list