LaTeX에게 모든 그림을 pdf 파일 끝에 배치하도록 지시하는 방법은 무엇입니까?

LaTeX에게 모든 그림을 pdf 파일 끝에 배치하도록 지시하는 방법은 무엇입니까?

글쎄, 나는 SE 사이트를 검색했지만 다른 사람들은 숫자 추가를 피하는 방법을 묻는 것 같았고 그들의 사고는 내 문제에 대한 우아한 해결책이 아닙니다. --- 나는 방법을 찾고 있습니다 (가능한 경우 한 줄 명령). 텍스트 내에 나타나는 그림을 유지하거나 상대 순서를 유지하면서 파일 맨 끝(참고문헌을 포함한 모든 텍스트 뒤)까지 그림을 모두 쓸어버릴 수 있습니다. 어떤 아이디어가 있나요?

답변1

첫 번째(위험한(아래 링크 참조)) 가능성(모든 수치가 코드에서 선언된 위치에 정확히 나타나도록 강제하고 부동을 억제함)의 경우 다음을 사용할 수 있습니다.float\floatplacement지정자 와 함께 패키지 및 해당 명령 H:

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

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

물론 여기에는 몇 가지 단점이 있습니다.`H` 지정자의 단점.

두 번째 항목(모든 그림을 문서 끝으로 이동)의 경우endfloat패키지를 사용할 수 있습니다. 예를 들어 다음과 같습니다.

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

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

figure환경( table또는 기타 사용자 정의 부동 소수점)이 문서 끝에 배치되고 그림이 원래 있었던 위치에 마커가 생성되지 않습니다 .

제공되는 다른 모든 옵션을 보려면 패키지 설명서를 참조하세요.

답변2

또한무화과이 패키지에는 모든 부동 소수점을 끝까지 전달하는 두 개의 간단한 스위치 \figcapson(기본적으로 활성화됨) 및 \figcapsoff.

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

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

figcaps옵션에는 옵션이 훨씬 적으며 endfloat원하지 않는 경우 그림 자체 외에 그림 캡션을 인쇄하는 것을 방지할 수 있는 (쉬운) 방법이 없는 것 같습니다.

답변3

내 사진 중 일부가 가로 모드이고 본문과 부록의 인물을 분리하고 싶기 때문에 의도한 대로 작동 figcaps하지도 않습니다 .endFloat

약간 장황하긴 하지만 이 해결 방법은 매우 훌륭하게 작동하지만 이 작업을 수행하는 더 편리한 방법이 있는지 듣고 싶습니다.

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}

관련 정보