미니 ToC에서 이 제목을 제거하는 방법은 무엇입니까?

미니 ToC에서 이 제목을 제거하는 방법은 무엇입니까?

두 개의 미니 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@specialToC의 특수 항목을 처리하도록 정의합니다 . 이 경우에는 포함된 항목을 무엇이든 작성하면 됩니다.

관련 정보