[comp.text] LaTeX cite command problem

miller@sunybcs.UUCP (02/21/87)

I am having trouble with the \cite command in one instance:  I have
a cite command that is long (i.e., \cite{blah1,blah2,...,blahalot}).
It would take up about 3/4 of a line if it started at the beginng
of a line.  However, when processed, the citation starts midway
through a line and then just runs over past the right margin.

Is there someway to change the \cite macro so that when the
citations are printed that there are spaces between the citations?
(Presumably, it would then be able to make a sensible line break.)

Thanks in advance,

Russ Miller
Assistant Professor
SUNY/Buffalo Computer Science
(716) 636-3295  office
(716) 636-3180  messages

========================================================================
| UUCP   :  ..!{ames,allegra,decvax,watmath}!sunybcs!miller            |
| CSNET  :  miller@buffalo                                             |
| ARPA   :  miller%buffalo@csnet-relay                                 |
| BITNET :  miller@sunybcs.BITNET                                      |
========================================================================

jmsellens@watdragon.UUCP (02/23/87)

In article <2410@sunybcs.UUCP> miller@sunybcs.UUCP (Russ Miller) writes:
>Is there someway to change the \cite macro so that when the
>citations are printed that there are spaces between the citations?
>(Presumably, it would then be able to make a sensible line break.)

I had this question asked of me before, and since it may be of general
usefullness, I have taken the liberty of posting rather than mailing
directly.

Try putting this after your \documentstyle command (most stolen from
latex.tex version 2.09):

\makeatletter
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\,}\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
\hbox{\csname b@\@citeb\endcsname}}}{#1}}
\makeatother

I added the thin space (\,) after the , and I think this might solve
your problem.

John Sellens -- Logic Programming and Artificial Intelligence Group

{decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdragon!jmsellens
jmsellens@dragon.waterloo.{edu,CDN} jsellens@watmta.BITNET
jmsellens%dragon@waterloo.csnet