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.
endfloat package?
Joseph Wright
\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.
I think endfloat is already implemented in revtex and must be used as
an option to the class.
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
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! :(
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
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
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