Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Citations in captions (LATEX)

1,167 views
Skip to first unread message

Andreas B. Wellm

unread,
Jun 25, 1997, 3:00:00 AM6/25/97
to

Hello,

I wonder whether someone knows a way to use citations in the caption of
a floating object like a picture, as a construct like this gives an
error message :

\begin{figure}[p]
[....(some picture)...]
\caption{Picture courtesy of \cite{some_company})
\end{figure}

results in an error message like:

File: sample.ps Graphic file (type eps)
<sample.ps>
! Illegal parameter number in definition of \reserved@a.
<to be read again>
)
l.319 ...Picture Courtesy of \cite{some_company}}

?

Andreas B. Wellm
a.b....@bham.ac.uk
--

================================================================
A.B.Wellm |
University of Birmingham |
School of Chemical Engineering | Grosse Gedanken brauchen
Edgbaston, Birmingham B15 2TT | nicht nur Fluegel
Tel: (0) 121 / 414 5303 | sondern auch ein Fahrgestell
Fax: (0) 121 / 414 5324 | zum Landen
email: a.b....@bham.ac.uk |
http://sun1.bham.ac.uk/a.b.wellm/ |
================================================================

Peter Møller Neergaard

unread,
Jul 3, 1997, 3:00:00 AM7/3/97
to Andreas B. Wellm

Andreas B. Wellm <a.b....@bham.ac.uk> wrote:

> \begin{figure}[p]
> [....(some picture)...]
> \caption{Picture courtesy of \cite{some_company})
> \end{figure}

A general and helpfull advise to avoid to many errors in ones documents is
to follow the syntax of LaTeX. It prescribes that a `{' is ended with `}'
so if you change your last `)' to `}' your example should run fine (after
defining an appropriate \bib_item{some_company}). ;-)

Peter

--
__ _
Peter Møller Neergaard / \-' ) ,,, WWW: http://www.diku.dk/
Dept. of Computer Science | | ()|||||||[:::) students/turtle/
University of Copenhagen \__,-._) '''
E-mail: tur...@diku.dk
[ The army is nothing but whites sending blacks to war against ]
[ the yellows to defend, what they have stolen from the reds -- Hair ]

Robin Fairbairns

unread,
Jul 3, 1997, 3:00:00 AM7/3/97
to

In article <33B20DED...@bham.ac.uk>,

Andreas B. Wellm <a.b....@bham.ac.uk> wrote:
>I wonder whether someone knows a way to use citations in the caption of
>a floating object like a picture, as a construct like this gives an
>error message :
>
>\begin{figure}[p]
>[....(some picture)...]
> \caption{Picture courtesy of \cite{some_company})
^
Judging by the error message output below, this was a typo...

>\end{figure}
>
>results in an error message like:
>
>File: sample.ps Graphic file (type eps)
> <sample.ps>
>! Illegal parameter number in definition of \reserved@a.
><to be read again>
> )
>l.319 ...Picture Courtesy of \cite{some_company}}

You've got two options. The simple one is to say \protect\cite{blah}

The more sensible one is to get your system upgraded to something more
recent than 1995/06/01: in all subsequent releases, \cite is a robust
command, in an (apparently vain) attempt to staunch the flow of
complaints like this from people who haven't read LaTeX manuals[1].

[1] For example, Leslie Lamport, LaTeX A document Preparation System;
Addison-Wesley, Reading, Mass, 1994, ISBN 0-201-52983-1, p.210.
--
Robin (Campaign for Real Radio 3) Fairbairns r...@cl.cam.ac.uk
U of Cambridge Computer Lab, Pembroke St, Cambridge CB2 3QG, UK
Home page: http://www.cl.cam.ac.uk/users/rf/robin.html

0 new messages