Tocloft - タイトルオプションを使用しながら、タイトルの形式を個別に変更する

Tocloft - タイトルオプションを使用しながら、タイトルの形式を個別に変更する

パッケージでいくつかの新しい listofs を定義しtocloft、提供されたtitlesオプションを使用しましたが、ToC を章の 1 つのように見せたいだけです。カスタム listofs は、番号のないセクション ( \section*) のように見える必要があります。オプションを使用しながら、listofs の特定のタイトルの形式を変更する方法はありますかtitles?

\documentclass[twosite]{scrbook}
\usepackage[titles]{tocloft}
\newlistof[chapter]{som}{exp}{List of Something}
\newcommand{\something}[1]{%
\refstepcounter{som}
   \par\noindent{Som.\hspace{1ex}\thesom:\hspace{1em}#1}
   \addcontentsline{exp}{som}{\textbf{Som.\hspace{1ex}\protect\numberline{\thesom}:} #1}\par
}
\begin{document}
   \something{Something is more than nothing}
   \listofsom
\end{document}

答え1

実際の質問についてはよくわかりませんが、これは\section*カスタム\listofsom コマンドのスタイル見出しを提供します。

\listof...通常、(または)\chapter*と組み合わせて使用​​する場合はコマンドを使用します。パッケージとその を使用すると、の定義内のコマンドを に置き換えるのは簡単です。book.clsscrbook.clsxpatch\xpatchcmd\chapter*\listof...section*

\documentclass[twoside]{scrbook}
\usepackage[titles]{tocloft}
\usepackage{xpatch}
\newlistof[chapter]{som}{exp}{List of Something}

\newcommand{\something}[1]{%
\refstepcounter{som}
   \par\noindent{Som.\hspace{1ex}\thesom:\hspace{1em}#1}
   \addcontentsline{exp}{som}{\textbf{Som.\hspace{1ex}\protect\numberline{\thesom}:} #1}\par
}


\xpatchcmd{\listofsom}{\chapter*}{\section*}{}{}

\begin{document}
   \tableofcontents
   \chapter{First}

   \something{Something is more than nothing}
   \noindent Now the list of somethings 
   \listofsom
\end{document}

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

関連情報