使用“回忆录”环境,我希望我的章节使用与“结论和展望”相同的标题样式。对于我的章节,我使用代码
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1pt \hfill \kern \z@}
\def\@makechapterhead#1{%
\vspace*{60\p@}%
{\parindent \z@ \centering \reset@font
{
\scshape \large \@chapapp{} \thechapter
}
\par\bigskip\nobreak
\interlinepenalty\@M
\makebox[\linewidth]{%
\makebox[\dimexpr\linewidth+4em]{\Huge \itshape \thickhrulefill~\raisebox{-.5ex}{#1}~\thickhrulefill}}\par\nobreak
\par\nobreak
\vskip 40\p@ }}
创建以下样式
但是,当我想为像这样生成的其他部分生成相同的样式时
\newenvironment{ConclOutl}%
{\cleardoublepage\thispagestyle{empty}\null\vfill\begin{center}%
\bfseries Conclusions and Outlook\end{center}}%
{\vfill\null}
我怎样才能统一风格?(我想这很简单,只需更改上面的代码,但我真的不知道如何做,而且尝试也没有定论......)
答案1
您可以为未编号的章节定义章节标题,非常相似,但需要省略章节编号行。我添加了
\documentclass{memoir}
\usepackage{blindtext}
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1pt \hfill \kern \z@}
\def\@makeschapterhead#1{%
\vspace*{60\p@}%
{\parindent \z@ \centering \reset@font
\par\bigskip\nobreak
\interlinepenalty\@M
\makebox[\linewidth]{%
\makebox[\dimexpr\linewidth+4em]{\Huge
\itshape
\thickhrulefill~\raisebox{-.5ex}{#1}~\thickhrulefill}
}\par\nobreak
\par\nobreak
\vskip
40\p@
}
\addcontentsline{toc}{chapter}{#1}
\markboth{\MakeUppercase{#1}}{}
}
\def\@makechapterhead#1{%
\vspace*{60\p@}%
{\parindent \z@ \centering \reset@font
{
\scshape \large \@chapapp{}
\thechapter
}
\par\bigskip\nobreak
\interlinepenalty\@M
\makebox[\linewidth]{%
\makebox[\dimexpr\linewidth+4em]{\Huge
\itshape
\thickhrulefill~\raisebox{-.5ex}{#1}~\thickhrulefill}
}\par\nobreak
\par\nobreak
\vskip
40\p@
}
}
\makeatother
\begin{document}
\tableofcontents
\chapter{Lazy Lizard}
\blindtext[20]
\chapter*{Sassy salamander}
\blindtext[20]
\end{document}