X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["3310" "Wed" "30" "July" "1997" "02:52:26" "+0400" "Vladimir Volovich" "TeX@VVV.VSU.RU" nil "115" "Correction to bibliography-related commands" "^Date:" nil nil "7" nil nil nil nil nil] nil) Received: from listserv.gmd.de (listserv.gmd.de [192.88.97.1]) by mail.Uni-Mainz.DE (8.8.5/8.8.5) with ESMTP id LAA23331; Wed, 30 Jul 1997 11:16:09 +0200 (MET DST) Received: from lsv1.listserv.gmd.de by listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <10.70F4EDBC@listserv.gmd.de>; Wed, 30 Jul 1997 11:16:08 +0200 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 177285 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Wed, 30 Jul 1997 11:15:37 +0200 Received: from cc.vsu.ru (root@VSU-Relarn.Relarn.ru [194.226.29.62]) by relay.urz.uni-heidelberg.de (8.7.6/8.7.4) with ESMTP id LAA05743 for ; Wed, 30 Jul 1997 11:15:26 +0200 (MET DST) Received: (from uucp@localhost) by cc.vsu.ru (8.8.6-VSU/8.8.6/ai) with UUCP id CAA24317 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Wed, 30 Jul 1997 02:53:22 +0400 Received: from vvv (vvv@localhost [127.0.0.1]) by vvv.vrn.ru (8.8.5/8.8.5) with SMTP id CAA00142 for ; Wed, 30 Jul 1997 02:52:27 +0400 X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.1.42 i586) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------49AD844F7440AD1D6F907B3D" Message-ID: <33DE742A.674CE2EC@vvv.vsu.ru> Reply-To: Mailing list for the LaTeX3 project Date: Wed, 30 Jul 1997 02:52:26 +0400 From: Vladimir Volovich Sender: Mailing list for the LaTeX3 project To: Multiple recipients of list LATEX-L Subject: Correction to bibliography-related commands Status: R X-Status: X-Keywords: X-UID: 2287 This is a multi-part message in MIME format. --------------49AD844F7440AD1D6F907B3D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I found some `bug' in \bibitem and \cite commands, when they are used with Russian letters. In particuler, I wanted to make it possible to use Russian letters in four places: \cite[russian text]{label with russian letters} \bibitem[russian text]{label with russian letters} If I use inputenc package, then any attempts to use russian letters in these fiels would fail. The informaiton written to AUX file is incorrect, etc... So, I had to hack some commands in order to resolve this problem. My solution is attached to this message. What do you think about this? Anyway, something should be changed in a LaTeX kernel to work around this problem. Currently, I use this like the following: \documentclass{article} \usepackage[english,russian]{babel} \usepackage[koi8-r]{inputenc} \input citehack % Correct come LaTeX commands \begin{document} \cite[...]{...} % here one may use Russian letters \begin{thebibliography} \bibitem[...]{...} Something % here one may use Russian letters \end{thebibliography} \end{document} With best regards, Vladimir. --------------49AD844F7440AD1D6F907B3D Content-Type: application/x-tex; name="citehack.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="citehack.tex" \makeatletter % % This is the \IeC command (from inputenc), % corrected thanks to David Carlisle: % \def\org@IeC{% \ifx\protect\@typeset@protect \expandafter\@firstofone \else \noexpand\IeC \fi} \def\tmp@IeC#1{\string\IeC\space{\string#1 }} % % This is a modified \@bibitem command; % we added \let\protect\noexpand, like in \@lbibitem, % because the item may include, e.g. \IeC {...} % or some other protected commands. % \def\@bibitem#1{\item\if@filesw {\let\protect\noexpand\immediate\write\@auxout {\string\bibcite{#1}{\the\value{\@listctr}}}}\fi\ignorespaces} \def\@citex[#1]#2{\let\IeC\tmp@IeC\edef\reserved@a{#2}\let\IeC\org@IeC \let\@citea\@empty \@cite{\@for\@citeb:=\reserved@a\do {\@citea\def\@citea{,\penalty\@m\ }% \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% \G@refundefinedtrue \@latex@warning {Citation `\@citeb' on page \thepage \space undefined}}% {\hbox{\csname b@\@citeb\endcsname}}}}{#1}} \def\@newl@bel#1#2#3{\let\IeC\tmp@IeC \@ifundefined{#1@#2}% \relax {\gdef \@multiplelabels {% \@latex@warning@no@line{There were multiply-defined labels}}% \@latex@warning@no@line{Label `#2' multiply defined}}% \global\@namedef{#1@#2}{#3}\let\IeC\org@IeC} % % This is a modified \@testdef command taken from Babel: % \def\@testdef #1#2#3{% \let\IeC\tmp@IeC \expandafter\let\expandafter\bbl@tempa\csname #1@#2\endcsname \def\bbl@tempb{#3}% \ifx\bbl@tempa\relax\else \edef\bbl@tempa{\expandafter\strip@prefix\meaning\bbl@tempa}\fi \edef\bbl@tempb{\expandafter\strip@prefix\meaning\bbl@tempb}% \ifx \bbl@tempa \bbl@tempb \else \@tempswatrue \fi\let\IeC\org@IeC} \makeatother --------------49AD844F7440AD1D6F907B3D--