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

How to append figures and figure captions at the end?

535 views
Skip to first unread message

sumanc

unread,
Dec 5, 2007, 2:27:20 AM12/5/07
to
Dear all,

I am looking for any method/package to append all figures and figure
captions to be appended to the end of the document separately, as
required by some journals. Every figure should appear in a new page
and all captions should come in separate page at the end of the
document.

Of course I can do it manually, but is is possible to achieve this
without major modification of the document?


Thanks,
Suman Chakrabarty.

Joseph Wright

unread,
Dec 5, 2007, 3:12:07 AM12/5/07
to

endfloat package?

Joseph Wright

sumanc

unread,
Dec 5, 2007, 7:59:37 AM12/5/07
to
Joseph Wright wrote:
>
> endfloat package?
>


Thanks ! It seems to be very useful. But the next problem is that it
is producing some errors.

Compilation errors:
========================================================================
(/usr/share/texmf/tex/latex/amsfonts/umsb.fd) [1]
(Bagchi_nucleation_prl.fff)
[2] [3] [4] [5] [6] AED endfloat: Processing end Figures and Tables
! Undefined control sequence.
\@enddocumenthook ...igures and Tables}\onecolumn

\processdelayedfloats
l.447 \end{document}

?
[7] (./Bagchi_nucleation_prl.lof
! Illegal unit of measure (mu inserted).
<to be read again>
p
=========================================================================

If I keep ignoring the errors, I get a file all intended features, but
in the list of figures (captions), I get strange series 'ptmu'
characters between the caption and the page number as follows:

=========================================================================

corresponds to S ≃ 2.4. ptmu. ptmu ptmu. ptmu ptmu. ptmu ptmu. ptmu 9

=========================================================================

Any suggestions?


Thanks,
Suman Chakrabarty.

Joseph Wright

unread,
Dec 5, 2007, 12:18:41 PM12/5/07
to
Could you post a minimal example, please.

Joseph Wright

sumanc

unread,
Dec 5, 2007, 1:30:22 PM12/5/07
to
Sure! I have narrowed down the problem to a possible conflict with the
'revtex' document class. Here goes one short example:
===========================================================================================
\documentclass{revtex4}
%\documentclass{article}

\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{endfloat}

\begin{document}

Test paragraph 1 goes here.

Test paragraph 2 goes here.

\begin{figure}
\includegraphics[width=0.4\textwidth]{Bagchi_fig4.eps}
\caption{Test caption goes here !}
\end{figure}

Test paragraph 3 goes here.


\end{document}
============================================================================================

Now if I use the 'article' class, I get following output in my 'List
of figures' produced by 'endfloat':

1 Test caption goes
here ! . . . . . . . . . . . . . . . . . . . . . . . 3

This is perfect! But, if I use the 'revtex' class, I get:

1 Test caption goes here ! ptmu. ptmu ptmu. ptmu ptmu. ptmu ptmu. ptmu
ptmu. ptmu ptmu. ptmu 3

The compilation error goes as follows:
=============================================================================================
(/usr/share/texmf/tex/latex/endfloat/endfloat.sty) (./
endfloat_test.aux)
(endfloat_test.fff) AED endfloat: Processing end Figures and Tables


! Undefined control sequence.
\@enddocumenthook ...igures and Tables}\onecolumn

\processdelayedfloats

l.24 \end{document}

?
[1] (./endfloat_test.lof (/usr/share/texmf/tex/latex/amsfonts/umsa.fd)
(/usr/share/texmf/tex/latex/amsfonts/umsb.fd)


! Illegal unit of measure (mu inserted).
<to be read again>
p

l.1 ...gnorespaces Test caption goes here !}}{3}{}

?


! Illegal unit of measure (mu inserted).
<to be read again>
p

l.1 ...gnorespaces Test caption goes here !}}{3}{}

?
) (./endfloat_test.fff <Bagchi_fig4.eps> [2] [3]) (./
endfloat_test.aux) )
Output written on endfloat_test.dvi (3 pages, 1040 bytes).
Transcript written on endfloat_test.log.
============================================================================================

Any idea how to resolve this issue and implement 'endfloat' within
'revtex'? Moreover, how to remove that dotted line and page number in
the 'List of figures' produced at the end? Perhaps I need to study the
package manual better for the second purpose.


Regards,
Suman Chakrabarty.

martin....@gmail.com

unread,
Dec 5, 2007, 1:56:07 PM12/5/07
to

I think endfloat is already implemented in revtex and must be used as
an option to the class.

Joseph Wright

unread,
Dec 5, 2007, 2:05:47 PM12/5/07
to

Indeed, I've just read the same thing. See page 4 of auguide.ps,
from:

http://authors.aps.org/revtex4/#docs

which says:

endfloat The same functionality can be accomplished
using the endfloats class option.

Joseph Wright

sumanc

unread,
Dec 5, 2007, 2:51:23 PM12/5/07
to
Thanks everybody for your quick responses. That class option
'endfloats' in revtex works. But the problem is that it only moves the
floats, i.e. figures and tables to the end. It does not create a list
of figures (figure captions), which I need very much. I need a
separate list of figure captions and separate pages of figures
(preferably without caption) following.

If I add \listoffigures manually just before the \end{document}
statement, I get same series of error messages during compilation:

! Illegal unit of measure (mu inserted).
<to be read again>
p

l.1 ...020$, corresponds to $S \simeq 2.4$.}}{9}{}

?

The output pdf file shows same 'ptmu' character sets instead of dots
as follows:


corresponds to S ≃ 2.4. ptmu. ptmu ptmu. ptmu ptmu. ptmu ptmu. ptmu 9

So my problem is not really solved! :(

Joseph Wright

unread,
Dec 5, 2007, 3:20:40 PM12/5/07
to
On Dec 5, 7:51 pm, sumanc <chakrabarty.su...@gmail.com> wrote:
>
> So my problem is not really solved! :(
>
> Regards,
> Suman Chakrabarty.


The point here is that endfloat, like many packages, relies on certain
parts of the standard classes being available. This is usually fine,
as most other classes are either based on the standard ones, or aim to
provide compatibility (see the koma-script and memoir systems).
However, RevTeX is a class for a specific job, and I guess that the
class authors only included what was wanted by the publishers. So you
are likely to be stuck with what RevTeX provides or explicitly
supports.

Joseph Wright

Dan

unread,
Dec 6, 2007, 1:22:24 PM12/6/07
to
On Dec 5, 2:20 pm, Joseph Wright <joseph.wri...@morningstar2.co.uk>
wrote:

The problem is not so much that endfloat relies on certain
conventions, because revtex supplies endfloat capability.
The problem is that \listoffigures simply doesn't work in revtex,
with or without endfloat.

This bug was reported and analyzed quite some time ago and
I am surprised it hasn't been fixed. I can only suppose the
affected journals don't require lists of figures and therefore
have no incentive to fix it.

The latex kernel supplies a \@dottedtocline wihich uses \leaders
to print a line of dots. Latex hard-codes the dot as a math dot
and the separation between dots as


>
> Joseph Wright

Dan

unread,
Dec 6, 2007, 1:53:38 PM12/6/07
to

Correction: it is a text dot inside a math group

> and the separation between dots as

[Sorry to leave everyone hanging. Apparently I pressed the
control key instead of the shift key and somehow that caused
the post to be sent prematurely. I continue...]

The separation is "\mkern \@dotset mu", which requires \@dotsep
to be a number and the separation is that number of mu (math units).
However, revtex defines \@dotsep to be "4.5pt", an explicit length
(which makes a lot of sense, but conflicts with the latex kernel's
syntax). With that definition, "\mkern \@dotsep mu" produces the
erroneous "\mkern 4.5ptmu" and this causes the improper units
error message (\mkern requires mu as the unit).

Ideally, \@dotsep _should_ be a length. The latex kernel should
used \leaders with the following box
\hbox{\hskip\@dotsep\@thedot\hskip\@dotsep}
allowing classes to configure both the dot and the space. The
default box
\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}
would be equivalent to the settings
\def\@dotsep{2.5pt}
\def\@thedot{.}
Even better would be \leaders\@dotbox and let the entire box be
configurable.

Assuming the latex kernel will not be changed (backward
compatibility and all that), revtex should redefine \@dotsep (in
aps.rtx, rmp.rtx and revtex4.cls) to conform to the latex kernel's
usage in \@dottedtocline, and redefine one of its internal
commands (\numberline@@sections) to conform to that same
usage.


Dan

0 new messages