풍경 앞에 공백을 제거하세요.

풍경 앞에 공백을 제거하세요.

그림 을 삽입하고 있습니다 landscape.

\begin{landscape}
\begin{figure}
\centering
\includegraphics[width=\linewidth]{figures/sensor_diffs.jpg}
\caption{Example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=\linewidth]{figures/sensor_diffs2.jpg}
\caption{Another example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs2}
\end{figure}
\end{landscape}

그러나 그림 앞 페이지의 끝에 공백이 많이 생성됩니다. 그림 뒤에 같은 부분에 텍스트가 많이 있는데 제대로 조정되지 않은 것 같습니다.

어떤 아이디어가 있나요?

또한 문서를 통해 여러 위치에서 이 문제가 발생하므로 모든 종류의 글로벌 솔루션이 이상적입니다.

답변1

afterpage현재 페이지를 채운 후 그림이 조판되도록 패키지를 사용할 수 있습니다 .

\documentclass{article}
\usepackage{pdflscape}
\usepackage{graphicx}
\usepackage{afterpage}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\afterpage{%         <--------------like this
  \begin{landscape}
\begin{figure}
\centering
\includegraphics[width=\linewidth]{example-image}
\caption{Example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=\linewidth]{example-image-a}
\caption{Another example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs2}
\end{figure}
\end{landscape}
}
\lipsum
\end{document}

여기에 이미지 설명을 입력하세요

답변2

LaTeX 전문 용어로 "부동 환경"인 rotating패키지와 해당 환경을 로드하는 것이 좋습니다 . sidewaysfigure그에 비해 landscape환경은~ 아니다플로팅 환경이 있기 때문에 페이지 나누기가 \begin{landscape}발생하면 즉시 페이지 나누기가 발생합니다.

또한 (i) 단일 환경에서 각각 자체 \caption및 설명이 포함된 여러 이미지를 가질 수 있으며 (ii) 그래프 너비가 설정되므로 명령은 아무 작업도 수행하지 않습니다(따라서 생략될 수 있음). 에게 .\labelsidewaysfigure\centering\linewidth

\documentclass{article}
\usepackage[demo]{graphicx}   % omit 'demo' option in real document
\usepackage{rotating}   % for 'sidewaysfigure' environment
\usepackage{lipsum}     % for filler text

\begin{document}

\lipsum[1-2]   % filler text

A cross-reference to Figures \ref{fig:sensor_diffs} and \ref{fig:sensor_diffs2}.

\begin{sidewaysfigure}   % this will show up on page 2

\includegraphics[width=\linewidth]{figures/sensor_diffs.jpg}
\caption{Example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs}

\vspace{2cm}  % get some vertical separation

\includegraphics[width=\linewidth]{figures/sensor_diffs2.jpg}
\caption{Another example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs2}

\end{sidewaysfigure}

\lipsum[3-7]   % more filler text, continued on page 1 and then on page 3
\end{document}

관련 정보