
etoc
クラスでパッケージを使用するとmwbk
、\localtableofcontents
動作しますが(エラーは発生します)、\tableofcontents
動作しません:
\documentclass{mwbk}
\usepackage{graphicx,xcolor}
\usepackage{hyperref}
\usepackage{etoc}
%doesn't work%%
%\etocstandardlines% ‘line entries’ as without \usepackage{etoc}
%\etocstandarddisplaystyle % ‘toc display’ as without \usepackage{etoc}
\begin{document}
\tableofcontents
\etocsettocstyle{\section*{In this chapter you will see:}}{} % from now on only local tocs
\chapter{Chapter One}
\localtableofcontents
\section{Section One}
\subsection{Subsection One Point One}
\section{Section Two}
\end{document}
答え1
互換性のためにパッケージを使用しますtocloft
。
\documentclass{mwbk}
\usepackage{graphicx,xcolor}
\usepackage{hyperref}
\usepackage{tocloft}
\usepackage{etoc}
%doesn't work%%
%\etocstandardlines% ‘line entries’ as without \usepackage{etoc}
%\etocstandarddisplaystyle % ‘toc display’ as without \usepackage{etoc}
\begin{document}
\tableofcontents
\etocsettocstyle{\section*{In this chapter you will see:}}{} % from now on only local tocs
\chapter{Chapter One}
\localtableofcontents
\section{Section One}
\subsection{Subsection One Point One}
\section{Section Two}
\end{document}