첫 페이지에 이미지가 있는 새 장을 시작할 때 빈 페이지 문제

첫 페이지에 이미지가 있는 새 장을 시작할 때 빈 페이지 문제

이것은 힘든 일입니다. 새 장을 시작하는 경우가 많으며 새 장의 첫 번째 페이지는 pdf 페이지로 로드됩니다. \includegraphics (저는 문서가 많아서 스캔한 다음 이렇게 Latex로 로드합니다.)

pdf/이미지 페이지의 너비를 올바르게 조정하지 않으면 장 시작 부분에 빈 페이지가 표시됩니다. 그래서 장 앞의 빈 페이지를 없앨 수 있을 만큼 작게 만들기 위해 이미지 너비를 수동으로 조정하는 데 많은 시간을 소비합니다.

뿐만 아니라 Letter 크기에서 Legal 크기로 변경하면 이러한 모든 변경이 필요하지 않습니다.

빈 페이지가 생성되지 않도록 PDF 페이지나 로드할 이미지에 사용할 너비를 찾는 자동화된 방법이 있는지 묻고 싶습니다.

사건은 항상 새 장의 첫 페이지에 있습니다. 여기에 내가 의미하는 MWE가 있습니다.

\documentclass[11pt]{report}%   
\usepackage[demo]{graphicx}
\usepackage[letterpaper]{geometry}
%\usepackage[legalpaper]{geometry}
\begin{document}
Some text here
Some text here

Some text here
Some text here

\chapter{one}
\includegraphics[width=0.9\textwidth,height=.9\textwidth]{whatever}

\includegraphics[width=0.9\textwidth,height=.9\textwidth]{whatever}
\end{document}

결과는 다음과 같습니다. 두 번째 페이지는 비어 있습니다.

Mathematica 그래픽

변경 height=.9하면 height=.85해결됨

....
\chapter{one}
\includegraphics[width=0.9\textwidth,height=.85\textwidth]{whatever}

\includegraphics[width=0.9\textwidth,height=.9\textwidth]{whatever}
 ....

결과는 다음과 같습니다.

Mathematica 그래픽

문제를 이해합니다. 그리고 라텍스가 왜 이런 짓을 했는지. 이미지가 좀 커서 새 페이지에 해보려다가 포기하고 빈 페이지만 나오네요.

참고: 위의 MWE에서는 height=문제를 보여주기 위해 추가했습니다. 실제 코드에서는 only가 width=사용됩니다. 하지만 height=.

그래서 내 질문은: 빈 페이지가 생성되지 않도록 자동으로 로드되는 이미지의 너비를 올바른 너비로 조정하도록 Latex에게 지시하는 방법이 있습니까? 또는 이 모든 수동 조정 없이 이를 수행하는 더 현명한 방법입니다.

지금 내가 하는 일은 Latex를 실행하는 것인데, 이미지의 너비 값을 조정하여 이미지 앞에 있는 빈 페이지를 제거하는 데 많은 시간을 소비합니다. 때로는 나도 변해서 geometry이 모든 것을 다시 해야 할 때도 있습니다. 이것을 자동화하는 것이 좋을 것입니다.

TL 2015를 사용합니다.

답변1

매크로는 \getremaining페이지에 남겨진 세로 공간을 계산하여 길이에 답을 넣습니다 \vremaining.

두 번 실행하는 것을 잊지 마십시오.

\documentclass[11pt]{report}%   
\usepackage[demo]{graphicx}
\usepackage[letterpaper]{geometry}
%\usepackage[legalpaper]{geometry}
\usepackage{tikzpagenodes}

\newlength{\vremaining}

\newcommand{\getremaining}%
{\begin{tikzpicture}[remember picture,overlay]
  \pgfextracty{\vremaining}{\pgfpointanchor{current page text area}{south}}%
  \global\vremaining=-\vremaining
\end{tikzpicture}%
\advance\vremaining by 0.6\baselineskip
\vspace*{-\baselineskip}\newline}% place above image

\begin{document}
Some text here
Some text here

Some text here
Some text here

\chapter{one}
\getremaining
\includegraphics[width=0.9\textwidth,height=\vremaining]{whatever}

\includegraphics[width=0.9\textwidth,height=.9\textwidth]{whatever}
\end{document}

관련 정보