2

I'm preparing an article for submission in a journal and it requires that all figures must be coded at the end of the TeX file and not inline. I've tried to use :

\usepackage[markers,figuresonly,nolists]{endfloat}

but it put all figures and tables at the end of the pdf file. I want to put only figures at the end like this : example So how to do so?

The MWE (generated by Lyx) is like this :

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}
\usepackage[markers,figuresonly,nolists]{endfloat}
\usepackage{babel}


\begin{document}
Some text here.
\begin{figure}


 \begin{centering}
\includegraphics[scale=0.33]{dwt2}
\par\end{centering}
\caption{1-level DWT of the image of Peppers }
\end{figure}


\begin{table}[th]
\begin{centering}
\begin{tabular}{|c|c|c|c|c|}
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
\end{tabular}
\par\end{centering}

\caption{Comparison.}
\end{table}

\end{document}
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – cfr Nov 6 '14 at 23:02
  • When you say 'coded at the end of the TeX file' do you just mean they need to appear at the end of the PDF? Because I would understand that instruction as asking me to put the code for the figures at the end of the .tex file. – cfr Nov 6 '14 at 23:03
  • @cfr And coding the figures and the end of a file, with putting them in different places of text, would be really interesting. Of course possible in two runs. :-) – Przemysław Scherwentke Nov 6 '14 at 23:10
  • @PrzemysławScherwentke Indeed. I thought it more likely that they wanted the code at the end and so the figures at the end of the pdf. It isn't uncommon to want a placeholder text inline just to indicate where the figures belong and the images/code for the figures separately (in a separate file or at the end or whatever). I assume this makes copy editing easier. – cfr Nov 6 '14 at 23:15
  • @cfr Hence I am impatiently waiting for clarifying, in hope that OP has really it in mind. – Przemysław Scherwentke Nov 6 '14 at 23:24
1

The table is at the end just because you have no text after it. If text is added (here I used lipsum for it), the table will be where placed.

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[demo]{graphicx}
\usepackage[markers,figuresonly,nolists]{endfloat}
\usepackage{babel}

\usepackage{lipsum}


\begin{document}
Some text here.

\begin{figure}
\centering
\includegraphics[scale=0.33]{dwt2}
\caption{1-level DWT of the image of Peppers }
\end{figure}

\lipsum[2]

\begin{table}[th]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
100 & 100 & 100 & 100 & 100\tabularnewline
\hline 
\end{tabular}

\caption{Comparison.}
\end{table}

\lipsum

\end{document}

Don't use \begin{centering}, just \centering (of course, remove \par\end{centering}).

enter image description here

  • Thank you very much egreg. I compiled your code using Kile under ubuntu and surprisingly the output is not the same as yours; the table still goes at the end. Any ideas? – alibs Nov 8 '14 at 21:27
  • @alibs I suspect an old TeX distribution: endfloat has been revamped in 2011 and only then it gained the figuresonly option. Non up-to-date Ubuntu systems have TeX Live 2009. Can you confirm? – egreg Nov 8 '14 at 21:32
  • Indeed egreg, I'm using ubuntu 12.04 with TeX Live 2009. Do you think I have to update to a newer version. Another question please : how to put images at the end without margin like this file : asp.eurasipjournals.com/content/pdf/1687-6180-2014-157.pdf – alibs Nov 8 '14 at 21:49
  • Yes, you have to upgrade your Ubuntu or install a “vanilla” TeX Live: see tex.stackexchange.com/questions/1092/… For the final problem, a new question is in order. – egreg Nov 8 '14 at 22:02
  • I've updated TeX Live to 2012 version and the problem of tables has gone and without inserting text after the table. So the problem is all about an old tex live version. Thank you egreg. – alibs Nov 9 '14 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.