书籍类的标题分隔符有两页选项

书籍类的标题分隔符有两页选项

我必须将书籍类别的单面选项改为双面选项才能正确装订。不幸的是,如果章节标题位于偶数页,这会破坏章节标题(如果位于不等页,标题看起来不错)。 在此处输入图片描述

您知道如何调整标题以适应双页选项的动态特性吗?

% using fncychap style Bjarne...

% Adding a tiny robot
\let\oldDOCH\DOCH

\makeatletter
\renewcommand\DOCH{%
    \mghrulefill{\RW}\par\nobreak
    \begin{tikzpicture}[remember picture, overlay]
        \node [xshift=1.05in, yshift=-1.43in] (robot) at (current page.north west)
          {\includegraphics[width=89px,height=130px]{tiny_robot.png}};
        \node[left] at ($(robot) + (5.71in,0.04in)$) {
          \CNV\FmN{\@chapapp}\space \CNoV\thechapter\par\nobreak};
        \draw[very thick] ($(robot) + (-0.10in,-0.20in)$) -- +(5.75in,0in);
    \end{tikzpicture}
    \par\nobreak
    \vskip 30\p@
}
\makeatother

答案1

经过一些实验,我意识到“绝对”定位导致了这个问题。现在我使用“相对”定位,它工作正常。

\makeatletter
\renewcommand\DOCH{%
    \mghrulefill{\RW}\par\nobreak
    \begin{tikzpicture}[remember picture, overlay]
        \node [xshift=0.10in, yshift=0.03in] (robot)
          {\includegraphics[width=89px,height=130px]{tiny_robot.png}};
        \node[left] at ($(robot) + (5.70in,0.04in)$) {
          \CNV\FmN{\@chapapp}\space \CNoV\thechapter\par\nobreak};
        \draw[very thick] ($(robot) + (-0.10in,-0.20in)$) -- +(5.75in,0in);
    \end{tikzpicture}
    \par\nobreak
    \vskip 30\p@
}
\makeatother

相关内容