![tex4ebook TOC にサブセクションを含めるにはどうすればいいですか?](https://rvso.com/image/472704/tex4ebook%20TOC%20%E3%81%AB%E3%82%B5%E3%83%96%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E5%90%AB%E3%82%81%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%81%84%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F.png)
この MWE は TOC のサブセクションを適切に表示しますが、tex4ebook -l main.tex
TOC を含む epub を作成すると、セクションと同じ深さしか表示されません。サブセクションを含めるにはどうすればよいですか?
\documentclass{memoir}
\begin{document}
\tableofcontents
\chapter{Chapter 1}
\section{Section 1.1}
\subsection{Subsection 1.1.1}
\subsection{Subsection 1.1.2}
\section{Section 1.2}
\subsection{Subsection 1.2.1}
\chapter{Chapter 2}
\section{Section 2.1}
\subsection{Subsection 2.1.1}
\subsection{Subsection 2.1.2}
\section{Section 2.2}
\subsection{Subsection 2.2.1}
\subsection{Subsection 2.2.2}
\end{document}
答え1
これは、TOC にも含まれない Memoir の動作と一致しています\subsections
。次の設定ファイルで要求できます。
\Preamble{xhtml}
\Configure{tableofcontents*}{chapter,section,subsection}
\begin{document}
\EndPreamble
この設定は、 にリストされるセクション コマンドの種類をリストします\tableofcontents
。セクションのスター付きバージョンを含める場合は、like
などのプレフィックスを使用しますlikesection
。
結果の TOC は次のようになります。
サブセクション番号は Memoir によって TOC メタデータに保存されないため、含まれていないことに注意してください。