2

How do I remove the horizontal lines at the top and bottom of the TOC of the appendix?

\documentclass[a4paper]{article}
\usepackage[toc,page,header]{appendix}
\usepackage{minitoc}

% Make the "Part I" text invisible
\renewcommand \thepart{}
\renewcommand \partname{}


\begin{document}
\doparttoc % Tell to minitoc to generate a toc for the parts
\faketableofcontents % Run a fake tableofcontents command for the partocs

\part{} % Start the document part
%\parttoc % Insert the document TOC

\section{First}
First content.
\section{Second}
Second content.

\newpage
\appendix
\addcontentsline{toc}{section}{Appendix} % Add the appendix text to the document TOC
\part{Appendix} % Start the appendix part
\parttoc % Insert the appendix TOC

\section{Appendix First}
Appendix first content.
\section{Appendix Second}
Appendix second content.

\end{document}

enter image description here

2

You can use the command provided by minitoc package

\noptcrule 

your code will be

\documentclass[a4paper]{article}
\usepackage[toc,page,header]{appendix}
\usepackage[]{minitoc}
\noptcrule %<<<<<<<<<<<<<<<<<<< HERE
% Make the "Part I" text invisible
\renewcommand \thepart{}
\renewcommand \partname{}


\begin{document}
\doparttoc % Tell to minitoc to generate a toc for the parts
\faketableofcontents % Run a fake tableofcontents command for the partocs

\part{} % Start the document part
%\parttoc % Insert the document TOC

\section{First}
First content.
\section{Second}
Second content.

\newpage
\appendix
\addcontentsline{toc}{section}{Appendix} % Add the appendix text to the document TOC
\part{Appendix} % Start the appendix part
\parttoc % Insert the appendix TOC

\section{Appendix First}
Appendix first content.
\section{Appendix Second}
Appendix second content.

\end{document}

Output: enter image description here

1

By doc of minitoc, Sec. 1.5.1, a "simpler" way is to use command \mtcsetrules as follows:

\mtcsetrules{parttoc}{off}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.