旁注包:图形对齐错误

旁注包:图形对齐错误

平均能量损失

\documentclass[12pt]{scrbook}



\usepackage{blindtext}

\usepackage{sidenotes}
\usepackage{mwe}

\usepackage[showframe]{geometry}
\geometry{paperwidth=170mm, paperheight=240mm, left=42pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt}
%


\begin{document}

%
\begin{marginfigure}%
    \includegraphics[width=\marginparwidth]{example-image-a}%
    \caption{A small rectangle put in the margin.\label{rectangle}}%
\end{marginfigure}%
%
\blindtext
%
\begin{figure*}[htbp]
%\centering
    \includegraphics[height=180pt,width=350pt]{example-image-c}%
    \caption{An even larger rectangle. This is the widest figure option. Both, the text as well as the margin width are used for the diagram.}
    \label{rectangle3}
\end{figure*}
%
\clearpage
%
\begin{marginfigure}%
    \includegraphics[width=\marginparwidth]{example-image-a}%
    \caption{A small rectangle put in the margin.\label{rectangle2}}%
\end{marginfigure}%
%
\blindtext
%
\begin{figure*}[htbp]
%\centering
    \includegraphics[height=180pt,width=350pt]{example-image-c}%
    \caption{An even larger rectangle. This is the widest figure option. Both, the text as well as the margin width are used for the diagram.}
    \label{rectangle31}
\end{figure*}
%
\end{document}

第二页有错误 在此处输入图片描述

答案1

你是受害者end of line space。在%后面加上[htbp]

\begin{figure*}[htbp]%
%\centering
    \includegraphics[height=180pt,width=350pt]{example-image-c}%
    \caption{An even larger rectangle. This is the widest figure option. Both, the text as well as the margin width are used for the diagram.}
    \label{rectangle31}
\end{figure*}%

完整代码:

\documentclass[12pt]{scrbook}

\usepackage{blindtext}

\usepackage{sidenotes}
\usepackage{mwe}

\usepackage[showframe]{geometry}
\geometry{paperwidth=170mm, paperheight=240mm, left=42pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt}
%


\begin{document}

%
\begin{marginfigure}%
    \includegraphics[width=\marginparwidth]{example-image-a}%
    \caption{A small rectangle put in the margin.\label{rectangle}}%
\end{marginfigure}%
%
\blindtext
%
\begin{figure*}[htbp]
%\centering
    \includegraphics[height=180pt,width=350pt]{example-image-c}%
    \caption{An even larger rectangle. This is the widest figure option. Both, the text as well as the margin width are used for the diagram.}
    \label{rectangle3}
\end{figure*}
%
\clearpage
%
\begin{marginfigure}%
    \includegraphics[width=\marginparwidth]{example-image-a}%
    \caption{A small rectangle put in the margin.\label{rectangle2}}%
\end{marginfigure}%
%
\blindtext
%
\begin{figure*}[htbp]%
%\centering
    \includegraphics[height=180pt,width=350pt]{example-image-c}%
    \caption{An even larger rectangle. This is the widest figure option. Both, the text as well as the margin width are used for the diagram.}
    \label{rectangle31}
\end{figure*}%
%
\end{document}

在此处输入图片描述

相关内容