当我使用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}