我想将章节标题和其上方的规则向左延伸,因此它是文本块过去的 -0.75。
梅威瑟:
\documentclass[oneside,12pt]{memoir}
\usepackage{graphicx}
\begin{document}
\chapterstyle{madsen}
\frontmatter
\tableofcontents
\mainmatter
\chapter{First chapter}
Text
\chapter{Second chapter}
More text
\end{document}
答案1
在下面的示例中,我定义了mymadsen
具有所需规范的章节样式:
\documentclass{memoir}
\usepackage{graphicx}
\usepackage{lipsum}
\makechapterstyle{mymadsen}{%
\chapterstyle{default}
\renewcommand*{\chapnamefont}{%
\normalfont\large\scshape\raggedleft}
\renewcommand*{\chaptitlefont}{%
\normalfont\Huge\bfseries\sffamily\raggedleft}
\renewcommand*{\chapternamenum}{}
\setlength{\chapindent}{0.75in}
\renewcommand*{\printchapternum}{%
\makebox[0pt][l]{\hspace{0.4em}%
\resizebox{!}{4ex}{%
\chapnamefont\bfseries\sffamily\thechapter}%
}%
}%
\renewcommand*{\printchapternonum}{%
\chapnamefont \phantom{\printchaptername \chapternamenum%
\makebox[0pt][l]{\hspace{0.4em}%
\resizebox{!}{4ex}{%
\chapnamefont\bfseries\sffamily 10}%
}%
}%
}%
\setlength\midchapskip{1ex}
\renewcommand*{\printchaptertitle}[1]{%
\begin{adjustwidth}{-\chapindent}{}
\par\hrulefill\vskip\midchapskip
\raggedleft \chaptitlefont ##1\par\nobreak
\end{adjustwidth}}
}
\chapterstyle{mymadsen}
\begin{document}
\chapter*{Test unnumbered chapter and some textv}
\lipsum[4]
\chapter{Test numbered chapter and some textviiii}
\lipsum[4]
\end{document}
未编号章节的图片:
还有一个用于编号章节: