etoc と mwbk の非互換性

etoc と mwbk の非互換性

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}

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

関連情報