Discussion:
error messages I don't understand
(too old to reply)
Dr Engelbert Buxbaum
2017-03-29 09:12:26 UTC
Permalink
Raw Message
Hi,

the following caption produces a hail of 11 error messages (extra and
missing }, missing items), but I can't figure out what is wrong:

% -*- TeX:UK -*-
\NeedsTeXFormat{LaTeX2e}
\documentclass[british,pdftex,twoside]{report}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel,
graphicx
}
%\usepackage{hyperref}

\begin{document}

\begin{figure}
\caption{Dynamic instability of microtubules. Tubules grow by
association of tubulin dimers, which have GTP bound, to the tubule. The
resulting GTP-cap prevents tubule dissociation. Hydrolysis of bound GTP
to GDP changes the conformation of tubulin heterodimers. This has two
consequences:
\begin{itemize}
\item{Strength of protein-protein interactions within a
protofilament is decreased, dissociation becomes easier.}
\item{A curvature is introduced into the protofilament, the
protofilaments can no longer associate into a tubule. The ends of the
tubule becomes frayed, this too increases the rate of dissociation.}
\end{itemize}
Thus, once the GTP-cap has been lost, the tubule will shrink rapidly
until the cap is regained and net growth begins again. \textbf
{Catastrophe factors} and \textbf{microtubule associated proteins}
control the frequency of catastrophic GTP breakdown. }
\label{fig:DynInsta}
\centering
\includegraphics[width=0.75\textwidth]{Graphics/Dynamic-
instability}
\end{figure}

The quick brown fox jumps over the lazy dog in fig. \ref{fig:DynInsta}

\end{document}

The the pdf-output appears as expected. Any hints would be appreciated.

Engelbert
--
DIN EN ISO 9241-13: 9.5.3 Error messages should convey what is wrong,
what corrective actions can be taken, and the cause of the error.
Ulrike Fischer
2017-03-29 09:23:39 UTC
Permalink
Raw Message
Post by Dr Engelbert Buxbaum
Hi,
the following caption produces a hail of 11 error messages (extra and
You have a list inside the caption. This doesn't make much sense. A
caption is a short title, not a long novel.

If you really want it, you could do


\usepackage[singlelinecheck=false]{caption}

and later
\caption[text for toc]{Dynamic ....}

But it would be more sensible to move the explanation outside of the
caption.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
Axel Berger
2017-03-29 13:13:28 UTC
Permalink
Raw Message
Post by Ulrike Fischer
\caption[text for toc]{Dynamic ....}
That nearly always makes sense - longer than one line, source citation
included, lots of other stuff you don't want or need in the toc.
Post by Ulrike Fischer
A caption is a short title, not a long novel.
But that's wrong IMHO. The way scientific journals are read, you glance
at the abstrct and then go to the figures first. Only after that will
you read the conclusion and last and rearely the main text. That means
all the figures have to be intelligible without having read the text
first.

It's different for monographs and children's books, but articles are a
major part of scientific output.
--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --
Ulrike Fischer
2017-03-29 14:23:03 UTC
Permalink
Raw Message
Post by Axel Berger
Post by Ulrike Fischer
A caption is a short title, not a long novel.
But that's wrong IMHO. The way scientific journals are read, you glance
at the abstrct and then go to the figures first. Only after that will
you read the conclusion and last and rearely the main text. That means
all the figures have to be intelligible without having read the text
first.
Sure, but this text doesn't need to be in \caption command. I would
define some description-environment for such explanatory text.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
Axel Berger
2017-03-29 16:07:40 UTC
Permalink
Raw Message
Post by Ulrike Fischer
I would
define some description-environment for such explanatory text.
I don't understand. As long as I stick to a \caption[]{} inside a figure
environment, LaTeX and the appropriate standard packages will take care
of the placement and the layout and it will nearly always come out
perfect. Won't an extra environment not involve extra work plus many
chances to get things wrong?
--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --
Ulrike Fischer
2017-03-29 17:23:44 UTC
Permalink
Raw Message
Post by Axel Berger
I would define some description-environment for such explanatory text.
I don't understand. As long as I stick to a \caption[]{} inside a figure
environment, LaTeX and the appropriate standard packages will take care
of the placement and the layout and it will nearly always come out
perfect. Won't an extra environment not involve extra work plus many
chances to get things wrong?
Well the OP got an error as he didn't use an extra environment. The
standard latex code assumes that the caption contains something that
can be put in a \hbox.

But beside: this caption and legend/description are different
semantic objects. What will you do if a journal asks you to put the
main title of the figure at the top and the description below? Moan
that all your text is a "title"?
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
Athel Cornish-Bowden
2017-03-29 15:02:58 UTC
Permalink
Raw Message
Post by Axel Berger
Post by Ulrike Fischer
\caption[text for toc]{Dynamic ....}
That nearly always makes sense - longer than one line, source citation
included, lots of other stuff you don't want or need in the toc.
Post by Ulrike Fischer
A caption is a short title, not a long novel.
But that's wrong IMHO. The way scientific journals are read, you glance
at the abstrct and then go to the figures first. Only after that will
you read the conclusion and last and rearely the main text. That means
all the figures have to be intelligible without having read the text
first.
I agree, and as one who often writes figure legends much like the one
Engelbert quoted (complete with mention of GTP, though in my case more
often ATP) I find that it is often impractical, and unhelpful to the
reader, to make them very short.
--
athel
Donald Arseneau
2017-03-30 06:34:52 UTC
Permalink
Raw Message
Post by Axel Berger
Post by Ulrike Fischer
\caption[text for toc]{Dynamic ....}
That nearly always makes sense - longer than one line, source citation
included, lots of other stuff you don't want or need in the toc.
Post by Ulrike Fischer
A caption is a short title, not a long novel.
But that's wrong IMHO. The way scientific journals are read, you glance
at the abstrct and then go to the figures first. Only after that will
you read the conclusion and last and rearely the main text. That means
all the figures have to be intelligible without having read the text
first.
It's different for monographs and children's books, but articles are a
major part of scientific output.
The thing to do, since almost no cases actually have a list of figures,
is to habitually type \caption[] instead of \caption. I haven't needed
a list of figures since my PhD (and that used my own TeX stuff, not LaTeX).
--
Donald Arseneau ***@triumf.ca
Dr Engelbert Buxbaum
2017-03-29 17:57:39 UTC
Permalink
Raw Message
Post by Ulrike Fischer
Post by Dr Engelbert Buxbaum
Hi,
the following caption produces a hail of 11 error messages (extra and
You have a list inside the caption. This doesn't make much sense. A
caption is a short title, not a long novel.
If you really want it, you could do
\usepackage[singlelinecheck=false]{caption}
and later
\caption[text for toc]{Dynamic ....}
But it would be more sensible to move the explanation outside of the
caption.
thanks, the caption package works. Personally, when I have a complex
figure that requires explanation, I prefer to have that with the figure.
Probably a question of individual style as much as anything else.

Cheers

Engelbert
--
DIN EN ISO 9241-13: 9.5.3 Error messages should convey what is wrong,
what corrective actions can be taken, and the
cause of the error.
Ulrike Fischer
2017-03-29 18:21:05 UTC
Permalink
Raw Message
Personally, when I have a complex figure that requires
explanation, I prefer to have that with the figure. Probably a
question of individual style as much as anything else.
Sure. But "with the figure" doesn't imply "inside the caption
argument". You are quite free to add whatever text your want inside
the figure environment but outside caption:

\begin{figure}
figure

\caption{a text}

Note: blbl

\end{figure}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
Axel Berger
2017-03-29 18:42:30 UTC
Permalink
Raw Message
Post by Ulrike Fischer
You are quite free to add whatever text
Quite. And you also have to set font, size, style, hangingness, margins
etc. separately and without relying on the caption package to do it all
for you. And what about Koma's captionbeside feature? This becomes all
the more relevant if you make different versions.

Yes, there are exceptions where this won't work. But all journals that I
read would pose no problem to emulate that way.
--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --
Peter Flynn
2017-04-02 16:07:06 UTC
Permalink
Raw Message
Post by Dr Engelbert Buxbaum
the following caption produces a hail of 11 error messages (extra and
[snip example]

This has been a fascinating thread, all the more since one project I am
associated with (CELT) did indeed have a requirement for complex textual
structure inside a title (and a caption is a title for a figure, table,
or other float).

(In that case, the TEI <head> element needed to be able to contain a
couple of lines of verse. Yes, really: it was common in early recited
sagas for the "title" to be chanted (called a "cecinit"), and not
uncommon for it to quote a line or two from another work. Encoding it
was the easy bit; transforming it to LaTeX less so at the time :-)

Ulrike is correct that a caption should be relatively short. Not only
will long text look very silly in the ToC (which is why [short title]
exists) but it's out of place to include lengthy explanations there that
should properly go below the image.

Unfortunately, Axel is also correct. The state of research in the
natural sciences is apparently now so parlous that no-one actually reads
whole papers, but instead relies on abstracting methodologies, ranging
from reading the title and the captions (as he describes) up to reading
summaries generated by abstracting algorithms. Mercifully, in the
humanities, output is less frequent and much, much longer, and you have
to read articles all the way through, probably several times :-)

Adding the explanatory text should not be a problem: LaTeX will format
it as a paragraph or a list or whatever you specify. If you want to make
it look more elegant, it's trivial to do something like

\begin{figure}
\caption[short]{longer}
\label{foo}
\centering
\includegraphics[width=something]{figpic42}
\begin{quotation}\small\noindent
Very long text, including lists
\end{quotation}
\end{figure}

(abusing the quotation environment to get the narrower margins), or to
define an environment to do this for you to automate it. Donald is right
that articles rarely have ToCs.

However, if you are writing for a specific journal, you have to stick to
the way they do things, and if their typography is ugly enough to allow
figure captions a dozen lines long, that's their problem and you have to
conform to it. (I was slightly surprised by Athel's comment that putting
it all in the caption is more practical and more helpful to the reader;
I would have expected exactly the reverse, but then it's not my field.)
Post by Dr Engelbert Buxbaum
Personally, when I have a complex figure that requires explanation, I
prefer to have that with the figure.
I think what Ulrike suggested *did* keep the explanation with the
figure, just *not* in the caption. Axel's point about the formatting
and its acceptability in journals is interesting. LaTeX's default
formats are really only suitable for drafts — starting-points — and they
cannot be regarded as anything like what a journal or a book publisher
expects the final output to look like, which is why so many of the
publishers have their own style packages. It would be a useful
experiment to run Engelbert's example through a dozen or so common
publishers' journal styles and see what works and what doesn't.

I might undertake that for my next Typographers' Inn column in TUGboat.

///Peter

Loading...