가로, 후 페이지 및 분할을 사용하는 이상한 문제
Aug 18 2020
나는 \ afterpage가 어떻게 든 분할 방정식에 문제가있는 것처럼 보이는 Latex에 문제가있어서 코드가 컴파일되지 않습니다. 다른 방법으로 생성되는 공백을 피하기 위해 큰 가로 그림이 표시되기 전에 페이지를 채우기 위해 \ afterpage를 사용합니다. 이것은 MWE입니다 (\ afterpage 명령을 주석 처리하면 컴파일됩니다).
\documentclass[a4paper]{scrbook}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2][1-20]
\afterpage{
\begin{landscape}
\begin{figure}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Caption}
\end{figure}
\end{landscape}}
\lipsum[1-5]
\begin{equation}
\begin{split}
x&=\frac{\pi}{2}\\
&=\frac{3}{2}
\end{split}
\end{equation}
\lipsum[1-2]
\end{document}
답변
1 JohnKormylo Aug 18 2020 at 21:45
쉬운 해결책은 이전 단락에서 방정식을 분리하는 것입니다. 이 솔루션은 분할 가능한 단락 안에 방정식을 넣지 만 첫 줄과 마지막 줄의 간격이 약간 떨어져 있습니다.
\documentclass[a4paper]{scrbook}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{lipsum}
\newsavebox{\tempbox}
\begin{document}
\lipsum[1-2]
\afterpage{%
\begin{landscape}
\begin{figure}
\centering
\includegraphics[width=\textheight]{example-image-a}
\caption{Caption}
\end{figure}
\end{landscape}}
\lipsum[1-3]
\setbox\tempbox=\vbox{\strut
Text in pragraph before equation.
Text in pragraph before equation.
Text in pragraph before equation.
Text in pragraph before equation.
Text in pragraph before equation.
Text in pragraph before equation.
Text in pragraph before equation.
\begin{equation}
\begin{split}
x&=\frac{\pi}{2}\\
&=\frac{3}{2}
\end{split}
\end{equation}
Text in same paragraph after equation.
}\unvbox\tempbox
\lipsum[1-2]
\end{document}