我想要一个没有单词“chapter”及其标题编号的章节,但我想要一个使用 的目录条目memoir
。我使用以下
\documentclass{memoir}%
\makechapterstyle{mychapterstyle}{%
\renewcommand{\chapnamefont}{\LARGE\sffamily\bfseries}%
\renewcommand{\chapnumfont}{\LARGE\sffamily\bfseries}%
\renewcommand{\chaptitlefont}{\Huge\sffamily\bfseries}%
\renewcommand{\printchaptertitle}[1] {%
\chaptitlefont\hrule height 0.5pt \vspace{1em}%
{##1}\vspace{1em}\hrule height 0.5pt%
}%
\renewcommand{\printchapternum}{%
\chapnumfont\thechapter%
}%
}
\newcommand{\chapsubhead}[1]{%
\\{\normalsize #1}%
}
\chapterstyle{mychapterstyle}
\setsecheadstyle{\Large\sffamily\bfseries}
\setsubsecheadstyle{\large\sffamily\bfseries}
\setsubsubsecheadstyle{\normalfont\sffamily\bfseries}
\setparaheadstyle{\normalfont\sffamily}
\makeevenhead{headings}{\thepage}{}{\small\slshape\leftmark}
\makeoddhead{headings}{\small\slshape\rightmark}{}{\thepage}
\begin{document}
\tableofcontents*
\chapter[Test]% ToC entry
{ Test \chapsubhead{ }}
\end{document}
这导致了
我只想输入“测试”这个词,不需要行和章节编号
谢谢你!
答案1
这是一个解决方案
\renewcommand{\printchaptername}{}
\renewcommand{\printchapternum}{}
\renewcommand{\printchaptertitle}[1]{\chaptitlefont ##1}%
代码
\documentclass{memoir}%
\makechapterstyle{mychapterstyle}{%
\renewcommand{\chapnamefont}{\LARGE\sffamily\bfseries}%
\renewcommand{\chapnumfont}{\LARGE\sffamily\bfseries}%
\renewcommand{\chaptitlefont}{\Huge\sffamily\bfseries}%
\renewcommand{\printchaptertitle}[1]{\chaptitlefont{##1}}%
\renewcommand{\printchaptername}{}%
\renewcommand{\printchapternum}{}%
}
\newcommand{\chapsubhead}[1]{%
\\{\normalsize #1}%
}
\chapterstyle{mychapterstyle}
\setsecheadstyle{\Large\sffamily\bfseries}
\setsubsecheadstyle{\large\sffamily\bfseries}
\setsubsubsecheadstyle{\normalfont\sffamily\bfseries}
\setparaheadstyle{\normalfont\sffamily}
\makeevenhead{headings}{\thepage}{}{\small\slshape\leftmark}
\makeoddhead{headings}{\small\slshape\rightmark}{}{\thepage}
\begin{document}
\tableofcontents*
\chapter[Test]% ToC entry
{ Test \chapsubhead{ }}
\end{document}