1

I am about 3 days deep into this whole minitoc issue. WHY doesn't it work?

I mean, I want a simple mini table of contents at the beginning of each chapter in my report document.

Let me show you some example of code.

\documentclass{report}
\usepackage{graphicx}
\usepackage{ragged2e} 
\usepackage{minitoc} 
\usepackage{sectsty}
\usepackage{tabularx}
\usepackage{caption}
\usepackage[table,dvipsname]{xcolor}% http://ctan.org/pkg/xcolor
\usepackage[flushleft]{threeparttable}

%%%%%%%% FOR TESTING %%%%%%%%%%%%%
\usepackage[english]{babel}
\usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Initializing Minitoc
\dominitoc[n]
\nomtcpagenumbers

\begin{document}




    \chapter{A}
    \label{Chap.A}

        \minitoc % GENERATE THE MINITOC?

        \section{A.1}
        \label{A:sec:1}

        Minitoc, what is wrong with you please tell me!

        \section{A.2}
        \label{A:sec:2}
        \blindtext

    \newpage

    \chapter{B}
    \label{Chap.B}

        \minitoc % ????

        \section{B.1}
        \label{B:sec:1}
        \Blindtext

        \section{B.2}
        \label{B:sec:2}
        \blindtext

\end{document}

When I compile this, I get

enter image description here

Obviously I am doing something wrong. What is it?

3

The package makes a very clear warnings in the log that it can not work without \tableofcontents

Package minitoc Warning: W0010
(minitoc)                No file bb599.toc. 
(minitoc)                MINITOCS NOT PREPARED on input line 17.

and

Package minitoc(hints) Warning: W0068
(minitoc(hints))                You have used \minitoc but not 
(minitoc(hints))                \tableofcontents
(minitoc(hints))                nor \faketableofcontents.

if you add \tableofcontents after \begin{document} you get

enter image description here

There are other warnings, about package ordering that I have not addressed here, for example

Package minitoc(hints) Warning: W0037
(minitoc(hints))                The sectsty package should be 
(minitoc(hints))                loaded BEFORE the minitoc package.
| improve this answer | |
  • Alright. Thank you very much. I didn't notice any warnings during the build. Only that the process exited normally. I have one more question if possible. Is there a way in this specific document example for the "Chapter X" field to appear in the left side of the page and the A (chapter name) to appear ti the right for each chapter ? – Broxigar Apr 24 '19 at 20:46
  • @Broxigar always check the log file. – David Carlisle Apr 24 '19 at 20:47
  • Alright. Good to know. As far as the text manipulation ? Is there a way? – Broxigar Apr 24 '19 at 20:50
  • @Broxigar that;s a different question but sure the chapter heading layout is only a few lines of report class so you could copy and redefine as needed or since you are loading secsty you could specify the heading layout using the commands of that package – David Carlisle Apr 24 '19 at 20:53

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.