章のスタイルと見出しの両方をカスタマイズする

章のスタイルと見出しの両方をカスタマイズする

私はmemoirを使用しています。基本設定は次のとおりです。

\makechapterstyle{chappell2}{%
\setlength{\beforechapskip}{-15pt}
\renewcommand*{\chapnamefont}{\large}

\renewcommand*{\printchapternum}{\chapnumfont \Large \thechapter }
\renewcommand*{\chaptitlefont}{\Large\bfseries}
\renewcommand*{\printchaptertitle}[1]{%
%\vskip\onelineskip 
\chaptitlefont ##1}}

\makechapterstyle{mystyle}{%
    \chapterstyle{default}
    \renewcommand{\printchaptername}{}
    \renewcommand{\chapternamenum}{}
    \renewcommand{\chapnumfont}{\normalfont\bfseries}
    \renewcommand{\printchapternum}{}%\chapnumfont \thechapter\space}
    \renewcommand{\afterchapternum}{}
    \renewcommand*{\printchapternum}{%
    \@hangfrom{\chapnumfont \thechapter\quad}}%
}
%\nouppercaseheads

\chapterstyle{chappell2}
\renewcommand\thechapter{Capitolo \arabic{chapter}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection\arabic{subsubsection}}

私はこれを理解します:

ここに画像の説明を入力してください

ここに画像の説明を入力してください

見出しに「Capitolo 2」のみを印刷したいのですが、どうすればよいですか? 申し訳ありませんが、私はラテックスの専門家ではありません...

答え1

\documentclass...から まで始まるコンパイル可能な例が提供されていません\end{document}。必要なコードを追加したときに提供されたものでは、グラフィックで示したものが生成されませんでした。

私は最善を尽くしました、そしてこれがあなたに合うかもしれないと思います。

\documentclass{memoir}
\usepackage{lipsum}

\renewcommand{\chaptername}{Capitolo}  % change chapter name
\renewcommand{\chapterrefname}{Capitolo} % change chapter reference name  
\makechapterstyle{chappell2}{%
\setlength{\beforechapskip}{-15pt}
%\renewcommand*{\chapnamefont}{\large}
\renewcommand*{\chapnamefont}{\Large\bfseries} % to match the chapter number

\renewcommand*{\printchapternum}{\chapnumfont \Large \thechapter }
\renewcommand*{\chaptitlefont}{\Large\bfseries}
\renewcommand*{\printchaptertitle}[1]{%
%\vskip\onelineskip 
\chaptitlefont ##1}}

%\nouppercaseheads

\chapterstyle{chappell2}
%\renewcommand\thechapter{Capitolo \arabic{chapter}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection\arabic{subsubsection}}

\begin{document}

\frontmatter
\tableofcontents
\mainmatter
\chapter{INFORMAZIONI}
\lipsum[1]
\section{First section}
\lipsum
\chapter{ANOTHER}
\lipsum[2]
\end{document}

章スタイルを定義しましたmystyleが、使用しませんでした。なぜですか?

関連情報