¿Cómo decirle a LaTeX que coloque todas las figuras al final del archivo pdf?

¿Cómo decirle a LaTeX que coloque todas las figuras al final del archivo pdf?

Bueno, busqué en el sitio SE, pero parece que todos los demás preguntaban cómo evitar agregar una figura y sus accidentes no son una solución muy elegante para mi problema. Estoy buscando una manera (comando de una línea si es posible) para que que puedo mantener las figuras donde aparecen dentro del texto o barrer todo hasta el final del archivo (después de todo el texto, incluida la bibliografía) manteniendo su orden relativo. ¿Algunas ideas?

Respuesta1

Para la primera posibilidad (arriesgada (ver enlace a continuación)) (forzar que todas las cifras aparezcan exactamente donde están declaradas en el código, suprimiendo la flotación), puede usar elfloatpaquete y su \floatplacementcomando junto con el Hespecificador:

\documentclass{article}
\usepackage{float}
\floatplacement{figure}{H}

\begin{document}
<contents>
\end{document}

Por supuesto, esto tiene algunos inconvenientes:Inconvenientes del especificador "H".

Para el segundo (moviendo todas las figuras al final del documento), elendfloatSe puede utilizar el paquete. Por ejemplo, lo siguiente:

\documentclass{article}
\usepackage[nomarkers,figuresonly]{endfloat}

\begin{document}
<contents>
\end{document}

hará que solo figurelos entornos (ni tableotros elementos flotantes definidos por el usuario) se coloquen al final del documento y no producirá ningún marcador en el lugar donde estaban originalmente las figuras.

Consulte la documentación del paquete para ver todas las demás opciones que ofrece.

Respuesta2

También está eltapas de higopaquete, que tiene dos interruptores simples para reenviar todos los flotantes hasta el final \figcapson(habilitado de forma predeterminada) y \figcapsoff.

\documentclass{article}
\usepackage[printfigures]{figcaps} % printfigures to display figure floats
%\figcapsoff % enable to keep floats in their positions 

\begin{document}
<contents>
\end{document}

Tenga en cuenta que figcapsviene con muchas menos opciones endfloaty parece que no hay una manera (fácil) de evitar que imprima los títulos de las figuras además de las figuras mismas si no las desea.

Respuesta3

Ninguno figcapsde los dos endFloatme funciona como estaba previsto, porque algunas de mis fotografías están en modo horizontal y me gustaría separarlas entre figuras del cuerpo y del apéndice.

Aunque es un poco detallada, esta solución funciona bastante bien, pero me alegra saber si existe una forma más práctica de hacerlo.

MWE:

\documentclass[a4paper,12pt]{scrartcl}


\usepackage{blindtext} % lorem ipsum
\usepackage{chngcntr} % for renumbering appendix 
\usepackage{comment}  % for choosing placement of figure in text (W for the "work-in-progress" and S for "submit" version)

\usepackage{pdflscape}      %adds PDF support to the landscape environment of package lscape
\usepackage{graphicx}

\usepackage{flafter} % no figures before section headings

% creating a conditional
\newif\ifS

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set this to false if you want the figures in the text
% and to true if you want them at the end (S stands for "submit")

\Strue % \Sfalse or \Strue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%this tells the comment-package which parts to include and exclude
\ifS
    \includecomment{S}
    \excludecomment{W}
\else
    \excludecomment{S}
    \includecomment{W}
\fi

%---------------------------------------
\begin{document}

\section{Intro}

% define figure1
\newcommand{\figureA}{
\begin{figure}
\includegraphics[width=\textwidth]{example-image-a} 
\caption{figureA}
\label{fig:figureA}
\end{figure}
}

%place figure1 if this is the the work-in-progress (W) version
\begin{W}
\figureA
\end{W}

%define figure2
\newcommand{\figureB}{
\begin{landscape}\begin{figure}[!htb]
\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{example-image-B}
\caption{figureB} 
\label{fig:figureB}
\end{figure}
\end{landscape}
}

%place figure 2 if the work-in-progress (W) version
\begin{W}
\figureB
\end{W}

\Blindtext % lorem ipsum

%-----------------------------------------------
% When it is time to submit and you want your figures at the end, you can place your figures & tables at the end, but before appendix.
% Remember that this controlled by \Strue & \Sfalse in the preabmle

\cleardoublepage

\begin{S}
\listoffigures
\figureA
\figureB
\end{S}

%------------------------------------------
\cleardoublepage
\appendix
\counterwithin{figure}{section} 
\counterwithin{table}{section}
\section{Appendix}\label{appendix}



\begin{figure}[!htb]
\includegraphics[width=8cm]{example-image-golden}
\caption{Golden}
\label{fig:Golden}
\end{figure}



\begin{figure}[!htb]
\includegraphics[width=8cm]{example-grid-100x100pt}
\caption{Grid}
\label{fig:Grid}
\end{figure}


\end{document}

información relacionada