我正在使用这个章节风格
\documentclass[a4paper,11pt,oneside,showtrims,openright,titlepage]{memoir}
\makechapterstyle{VZ23}{%
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\chapnumfont{\Huge\bfseries\centering}
\renewcommand\chaptitlefont{\Huge\scshape\centering}
\renewcommand\afterchapternum{%
\par\nobreak\vskip\midchapskip\hrule\vskip\midchapskip}
\renewcommand\printchapternonum{%
\vspace*{-8.0\onelineskip}
\vphantom{\chapnumfont \thechapter}
\par\nobreak\vskip\midchapskip\hrule\vskip\midchapskip}}
\trimFrame
\settrims{3cm}{5.2cm}
\settrimmedsize{210mm}{140mm}{1}%
\settypeblocksize{170mm}{95mm}{.75}
\chapterstyle{VZ23}
\begin{document}
\chapter[NOTIZIA]{NOTIZIA}
\end{document}
但我无法得到章节标题上方的那行。有人知道该怎么做吗?
答案1
我不确定在章节未编号的情况下您希望发生什么,因此我在此处省略了该格式。我也不清楚您是想移动该行还是删除它,因此我展示了这两种情况的示例。
我还评论了有关页面尺寸设置的代码,因为您的设置是不可能的(即,memoir
如果您要求它检查,您会发现无法在 MWE 中实现您所请求的数字)。
您可以完全删除该行:
\documentclass[a4paper,11pt,oneside,showtrims,openright,titlepage]{memoir}
\makechapterstyle{VZ23}{%
\renewcommand\chapternamenum{}%
\renewcommand\printchaptername{}%
\renewcommand\chapnumfont{\Huge\bfseries\centering}%
\renewcommand\chaptitlefont{\Huge\scshape\centering}%
}
\trimFrame
\settrims{3cm}{5.2cm}
\settrimmedsize{210mm}{140mm}{*}% the third argument is the ratio of the first to the second
\settypeblocksize{170mm}{95mm}{*}% ditto
\setlrmargins{*}{*}{1}% without this, things don't fit on the page!
\setulmargins{*}{*}{1}% ditto
\checkandfixthelayout% you need this after changing the page layout above!
\chapterstyle{VZ23}
\begin{document}
\chapter[NOTIZIA]{NOTIZIA}
\end{document}
或者您可以将该行放在章节号之前,如问题中的图片所示:
\documentclass[a4paper,11pt,oneside,showtrims,openright,titlepage]{memoir}
\makechapterstyle{VZ23}{%
\renewcommand\chapternamenum{}%
\renewcommand\printchaptername{\par\nobreak\vskip\midchapskip\hrule\vskip\midchapskip}%
\renewcommand\chapnumfont{\Huge\bfseries\centering}%
\renewcommand\chaptitlefont{\Huge\scshape\centering}%
}
\trimFrame
\settrims{3cm}{5.2cm}
\settrimmedsize{210mm}{140mm}{*}% the third argument is the ratio of the first to the second
\settypeblocksize{170mm}{95mm}{*}% ditto
\setlrmargins{*}{*}{1}% without this, things don't fit on the page!
\setulmargins{*}{*}{1}% ditto
\checkandfixthelayout% you need this after changing the page layout above!
\chapterstyle{VZ23}
\begin{document}
\chapter[NOTIZIA]{NOTIZIA}
\end{document}