tocbibind 패키지가 컨텐츠에 TOC를 추가하지 못함, minitoc과 충돌 가능성 있음

tocbibind 패키지가 컨텐츠에 TOC를 추가하지 못함, minitoc과 충돌 가능성 있음

내 논문에는 다음과 같은 LaTeX 코드가 있습니다.

\documentclass[12pt,a4paper,oneside]{book}

\usepackage{verbatim}
\usepackage[pdftex]{graphicx}
\usepackage{fancyhdr,multirow}
\usepackage{setspace}
\usepackage{tocbibind}
\usepackage{etoc}
\usepackage{ifthen}

\newlength\tocrulewidth
\setlength{\tocrulewidth}{1.5pt}

\begin{document}
    \frontmatter
        \input{TitlePage.tex}
        \input{Declaration.tex}
        \input{Certificate.tex}
        \input{Dedication.tex}
        \input{Abstract.tex}
        \input{Acknowledgements.tex}        
        \tableofcontents        
        \listoftables
        \listoffigures
        \input{Publications.tex}

    \mainmatter
        \input{Chapter1/Chapter1.tex}
\end{document}

나는 모든 장의 시작 부분에 간단한 설명을 포함합니다. 아마도 그렇기 때문에 목차에 "목차" 항목이 표시되지 않는 것 같습니다. 대신 다음을 얻습니다.

여기에 이미지 설명을 입력하세요

minitoc의 경우 각 장마다 다음 코드가 있습니다.

\chapter{Introduction}
    \begingroup
        \parindent=0em
        \etocsettocstyle{\rule{\linewidth}{\tocrulewidth}\vskip0.5\baselineskip}{\rule{\linewidth}{\tocrulewidth}}
        \localtableofcontents 
    \endgroup

    % Text of the chapter goes here...

하지만 "승인"과 "테이블 목록" 사이에 번호가 없는 "콘텐츠" 항목을 원합니다. 어떻게 해야 합니까? 어떤 도움이라도 주시면 감사하겠습니다.

답변1

첫 번째 방법:수동으로 추가해 볼 수 있습니다.

\documentclass[12pt,a4paper,oneside]{book}

\usepackage{verbatim}
\usepackage[pdftex]{graphicx}
\usepackage{fancyhdr,multirow}
\usepackage{setspace}
%\usepackage{tocbibind} Not needed now
\usepackage{etoc}
\usepackage{ifthen}
\newlength\tocrulewidth
\setlength{\tocrulewidth}{1.5pt}





\begin{document}

    \frontmatter
    \chapter{Declaration}
    \chapter{Certificate}
        \tableofcontents\addcontentsline{toc}{chapter}{Contents}
        \listoftables
        \listoffigures


    \mainmatter
        \chapter{test}
\end{document}

결과:

여기에 이미지 설명을 입력하세요

두 번째 방법:또한 etoc을 사용하여 추가할 수도 있습니다.

\documentclass[12pt,a4paper,oneside]{book}

\usepackage{verbatim}
\usepackage[pdftex]{graphicx}
\usepackage{fancyhdr,multirow}
\usepackage{setspace}
%\usepackage{tocbibind} Not need it!
\usepackage{etoc}
\usepackage{ifthen}
\newlength\tocrulewidth
\setlength{\tocrulewidth}{1.5pt}





\begin{document}

    \frontmatter
    \chapter{Declaration}
    \chapter{Certificate}
        \tableofcontents\etoctoccontentsline{chapter}{Contents}
        \listoftables
        \listoffigures


    \mainmatter
        \chapter{test}
        \begingroup
        \parindent=0em
        \etocsettocstyle{\rule{\linewidth}{\tocrulewidth}\vskip0.5\baselineskip}{\rule{\linewidth}{\tocrulewidth}}
        \localtableofcontents 
        \endgroup
        \section{test section}
\end{document}

결과는 동일합니다.

tocbibind가 etoc에서는 작동하지 않는 것 같습니다.

관련 정보