我使用该类memoir
编写了一个包含的长文档parts
。我使用以下代码来设置章节的样式,并且我希望以非常相似的方式设置各部分的样式。
\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth}
\def\myhelvetfont{\def\sfdefault{mdput}}
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{darkBlue}{\color{white}\bfseries\sffamily\thechapter}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[1cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{daleif1}{
\renewcommand\chapnamefont{\normalfont\Large\sffamily\scshape\raggedleft\so}
\renewcommand\chaptitlefont{\normalfont\huge\sffamily\bfseries\color{darkBlue}} %\scshape ?
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft ##1\par}
}
\makeatother
\chapterstyle{daleif1}
我找不到与 等效的部分makechapterstyle
。
答案1
我无法编译您的代码片段(章节编号样式),但序言中的以下几行重现了其余章节的样式。
\renewcommand\partnamefont{\normalfont\Large\sffamily\scshape\raggedleft\so}
\renewcommand\parttitlefont{\normalfont\huge\sffamily\bfseries\color{blue}} %
\renewcommand\partnamenum{}
\renewcommand\printpartname{}
\renewcommand\printpartnum{\parttitlefont\raggedleft\thepart} % added for parts <<<<<
\renewcommand\printparttitle[1]{\chaptitlefont\raggedleft #1}