我搜索过,但找不到如何使\chapter*
-names 在 chapterstyle 中左对齐的答案southall
。以下 MWE 说明了这个问题。
\documentclass{memoir}
\chapterstyle{southall}
\begin{document}
\chapter{I am totally justified thanks to the ``1"}
\chapter*{I want to start where the ``1" starts above}
\section{I am also justified}
\section*{I am as well}
\end{document}
你有什么建议吗?提前谢谢。
编辑 1:感谢您的解决方案,它在主内容中效果很好(我在回忆录设置中使用它),但对于目录中的“目录”(与章节格式相同)和“致谢”(在前言中)字词仍然存在问题。有没有办法修复它以使其看起来一致?现在看来,前言中的章节表现不佳,而主内容中的章节表现良好。
答案1
修改样式来考虑 -variant *
,这使得条件\ifm@mpn@new@schap
为真。
\documentclass{memoir}
\makeatletter
%% Thomas Dye's southall chapter style (modified)
\makechapterstyle{southall-mod}{%
\chapterstyle{default}
\setlength{\afterchapskip}{5\baselineskip}
\setlength{\beforechapskip}{36pt}% \headindent
\setlength{\midchapskip}{\textwidth}% \rightblock
\addtolength{\midchapskip}{-\beforechapskip}
\renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}}
%%% \renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
\renewcommand*{\chaptitlefont}{\huge\rmfamily\memRTLraggedright}
\renewcommand*{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchapternum}{%
\ifm@mpn@new@schap\else
\begin{minipage}[t][\baselineskip][b]{\beforechapskip}
{\vspace{0pt}\chapnumfont%%%\figureversion{lining}
\thechapter}
\end{minipage}%
\fi}
\renewcommand*{\printchaptertitle}[1]{%
\ifm@mpn@new@schap\else
\hfill
\fi\begin{minipage}[t]{\midchapskip}
{\vspace{0pt}\chaptitlefont ##1\par}\end{minipage}}
\renewcommand*{\afterchaptertitle}{%
\par\vspace{\baselineskip}%
\hrulefill \par\nobreak\noindent \vskip \afterchapskip}}
\makeatother
\chapterstyle{southall-mod}
\begin{document}
\chapter{I am totally justified thanks to the ``1''}
\chapter*{I want to start where the ``1'' starts above}
\section{I am also justified}
\section*{I am as well}
\end{document}
不要用它"
作为结束引号;像我一样输入两个撇号。