0

I have no idea why, but if I use \secttoc it works only for the section if I change the section to "part", compile it, and change it back to "section"

\documentclass[12pt,a4paper,titlepage]{article}
\usepackage{pdflscape}
\usepackage[ngerman]{babel}
\usepackage[ansinew]{inputenc}
\usepackage[usenames]{color}
\usepackage{hyperref}
\usepackage{minitoc}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{mathptmx}
\usepackage{fancyhdr}
\usepackage{a4}
\usepackage{epic}
\usepackage{eepic}  
\usepackage{parskip}
\usepackage{eurosym}    
\usepackage{amssymb}
\usepackage{wrapfig,lipsum,booktabs}
\usepackage{url}
\usepackage{appendix}

\usepackage{enumerate}
\usepackage[authoryear,round]{natbib}
\usepackage{etoolbox}
\makeatletter
\usepackage[nohyperlinks,printonlyused,withpage]{acronym}
\usepackage[flushmargin, hang]{footmisc}


\begin{document}
\dosecttoc
\begin{titlepage}
\end{titlepage}
\setcounter{tocdepth}{3}
\tableofcontents

\begin{appendices}
\adjuststc
section{Anhang}
\mtcsetrules{secttoc}{off}
\renewcommand{\stctitle}{Anhangsverzeichnis}
\secttoc
\subsection{Exampletext}
\end{appendices}

\end{document}
2
  • \section{Anhang} is better than section{Anhang}, I suppose ;-) But your question is quite unclear to me
    – user31729
    Apr 13, 2015 at 20:07
  • 1
    Tables of Contents usually require two latex runs for the change to propagate to the output: the first writes it to an auxiliary file; the second reads the auxiliary file and produces the updated information. Are you sure you aren't keeping one step out of sync with the requirements?
    – jon
    Apr 13, 2015 at 20:22

1 Answer 1

0

The fix is to delete the \adjuststc command. You also need to fix the typo \section{Anhang} not section{Anhang} as @Christian Hupfer said.

In your MWE there is nothing that needs to be adjusted, so I guess \adjuststc is causing a problem, not fixing a problem that doesn't exist.

You need to run LaTeX more than once to get the right output. If your LaTeX editor doesn't do that automatically, an easy way is use a program like latexmk or texify (depending on what TeX distribution you are using).

Note, Minitoc can be a bit fragile if you make a "low level" mistake like this. If you still get a crash, delete all the temporary files like *.maf, *.mtc*, *,stc* and try again.

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.