奇数页中的标题位置错误,图中有旁注*

奇数页中的标题位置错误,图中有旁注*

我正在准备类似的布局如何制作双面、单面边距的书籍?

奇数页的标题位置有误。偶数页的标题位置正确。

\documentclass{scrbook}

\usepackage{sidenotes}
\usepackage[demo]{graphicx}

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

\usepackage{blindtext}

\makeatletter
\renewcommand{\@sidenotes@adjust}{%
\checkoddpage%
\ifoddpage%
\hspace{-\@sidenotes@extrawidth}% 
\else%
\hspace{-\@sidenotes@extrawidth}%    
\fi}
\makeatother

\begin{document}

\blindtext

\begin{marginfigure}
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{marginfigure}

%\blindtext
\begin{figure}[htb!]
\centering
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{figure}


\begin{figure*}
%\centering
\includegraphics[width=400pt]{rectangle}
\caption{I am a figure}
\end{figure*}

\clearpage

\begin{margintable}%
    \small
    \begin{tabular}{lll}
     Hg&Sn&Pb \\
    0.50&0.47&0.48\\
  \end{tabular}
    \caption{I am a table.}%
\end{margintable}%

\blindtext


\begin{marginfigure}
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{marginfigure}

%\blindtext
\begin{figure}[htb!]
\centering
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{figure}


\begin{figure*}
%\centering
\includegraphics[width=400pt]{rectangle}
\caption{I am a figure}
\end{figure*}

\end{document}

在此处输入图片描述

答案1

您必须更改标题样式widefigure以使奇数页和偶数页的边距相同:

\DeclareCaptionStyle{widefigure}{margin=-\@sidenotes@extrawidth,font=footnotesize}

请注意,的重新定义\@sidenotes@adjust可以变得更简单:

\renewcommand{\@sidenotes@adjust}{\hspace{-\@sidenotes@extrawidth}}

梅威瑟:

\documentclass[twoside=semi]{scrbook}

\usepackage{sidenotes}
\usepackage[demo]{graphicx}

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

\usepackage{blindtext}

\makeatletter
\renewcommand{\@sidenotes@adjust}{\hspace{-\@sidenotes@extrawidth}}
\DeclareCaptionStyle{widefigure}{margin=-\@sidenotes@extrawidth,font=footnotesize}
\makeatother

\begin{document}

\blindtext

\begin{marginfigure}
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{marginfigure}

%\blindtext
\begin{figure}[htb!]
\centering
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{figure}


\begin{figure*}
%\centering
\includegraphics[width=400pt]{rectangle}
\caption{I am a figure}
\end{figure*}

\clearpage

\begin{margintable}%
    \small
    \begin{tabular}{lll}
     Hg&Sn&Pb \\
    0.50&0.47&0.48\\
  \end{tabular}
    \caption{I am a table.}%
\end{margintable}%

\blindtext


\begin{marginfigure}
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{marginfigure}

%\blindtext
\begin{figure}[htb!]
\centering
\includegraphics[width=100pt]{rectangle}
\caption{I am a figure}
\end{figure}


\begin{figure*}
%\centering
\includegraphics[width=400pt]{rectangle}
\caption{I am a figure}
\end{figure*}

\end{document} 

输出:

在此处输入图片描述

相关内容