
두 개의 미니 ToC에서 "무엇이든"을 제거하는 방법은 무엇입니까? (메인 ToC에 남아 있기를 바랍니다.)
\documentclass[notoc]{tufte-book}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\begin{document}
\tableofcontents
\chapter{Introduction}
\startcontents[chapters]
\printcontents[chapters]{}{1}{}
\section{Historical Overview}
\section{The CUDA Model}
\section{A Lattice Boltzmann Solver}
\stopcontents[chapters]% doesn't work
\addtocontents{toc}{Whatever it is\endgraf}
\resumecontents[chapters]% doesn't work
\chapter{Foo Bar}
\startcontents[chapters]
\printcontents[chapters]{}{1}{}
\section{My Overview}
In this chapter we first...
\end{document}
답변1
ToC 내의 "무작위 텍스트"를 일종의 섹션 단위로 연결하는 것이 좋습니다. 당신이 chapter
, , ... 를 가지고 있는 것처럼 section
그것을 부르자 special
:
\documentclass[notoc]{tufte-book}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\makeatletter
\newcommand{\l@special}[2]{#1\endgraf}
\makeatother
\begin{document}
\tableofcontents
\chapter{Introduction}
\startcontents[chapters]
\printcontents[chapters]{}{1}{}
\section{Historical Overview}
\section{The CUDA Model}
\section{A Lattice Boltzmann Solver}
\stopcontents[chapters]
\addcontentsline{toc}{special}{Whatever it is}
\resumecontents[chapters]
\chapter{Foo Bar}
\startcontents[chapters]
\printcontents[chapters]{}{1}{}
\section{My Overview}
In this chapter we first...
\end{document}
\l@special
ToC의 특수 항목을 처리하도록 정의합니다 . 이 경우에는 포함된 항목을 무엇이든 작성하면 됩니다.