LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Vladimir Volovich <[log in to unmask]>
Date: Wed, 30 Jul 1997 02:52:26 +0400
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: text/plain (116 lines)
This is a multi-part message in MIME format.

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


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:



\input citehack  % Correct come LaTeX commands


\cite[...]{...}  % here one may use Russian letters


\bibitem[...]{...} Something   % here one may use Russian letters



With best regards,

Content-Type: application/x-tex; name="citehack.tex"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="citehack.tex"


% This is the \IeC command (from inputenc),
% corrected thanks to David Carlisle:

\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

    {\@citea\def\@citea{,\penalty\@m\ }%
     \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
         {Citation `\@citeb' on page \thepage \space undefined}}%
       {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}

    {\gdef \@multiplelabels {%
       \@latex@warning@no@line{There were multiply-defined labels}}%
     \@latex@warning@no@line{Label `#2' multiply defined}}%

% This is a modified \@testdef command taken from Babel:
\def\@testdef #1#2#3{%
  \expandafter\let\expandafter\bbl@tempa\csname #1@#2\endcsname
  \ifx \bbl@tempa \bbl@tempb
  \else \@tempswatrue \fi\let\IeC\org@IeC}