Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The following syntax is being used in my tex file. It worked good before, however, it generates this error now after reinstalling Miktex 2.9 :

"Latex Error: No counter 'lofdepth' defined"

\documentclass[14pt,listof=totoc,chapterprefix=true,bibliography=totoc]{scrbook} 

\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[final]{pdfpages}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{subfiles}
\usepackage[nobreak,compress,noadjust]{cite}
\usepackage{graphicx}
\renewcommand{\familydefault}{\rmdefault} 
\usepackage{units}
\usepackage[squaren]{siunits}
\usepackage[colorlinks=true,
linkbordercolor={0 0 0},
citebordercolor={0 0 0},
linkcolor=black,
citecolor=black,
urlcolor=black,
pdfstartview={FitH},
plainpages=false,
pagebackref=false]{hyperref}
\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}
\usepackage{varioref}
\usepackage{float}
\usepackage{multicol}
\usepackage{url}
\usepackage{verbatim} %for comment environmet
\usepackage{bm} %bold math
\urlstyle{same}
\graphicspath{{Front_Matter/}{Chapter1+2_literature+intro/}{Chapter3_Mechanical_Setup/}{Chapter3_Mechanical_Setup/EMBA/}{Chapter4_Electrical_Layout/}{Chapter5_Control_Algorithm/}{Experimental_Work/}{Exp/}{Model/}{Back_Matter/}}

\usepackage{multirow} 
\usepackage{blindtext,setspace}
\doublespace
\usepackage[paper=a4paper,layout=a4paper]{geometry}

\linespread{1.6}
\usepackage{array}
\usepackage{scrpage2}
\deftripstyle{new_style}[1pt][1pt]{}{}{\headmark}{}{}{\pagemark}
\pagestyle{new_style}
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername
\ \thechapter.\ #1}{}}

\setkomafont{pagehead}{\small\normalcolor\bfseries}    
\renewcommand{\chapterheadstartvskip}{\vspace *{-\baselineskip }}
\renewcommand{\contentsname}{Table of Contents}
\addtocontents{toc}{\protect{\pdfbookmark[0]{\contentsname}{toc}}}
\renewcommand\bibname{References} 
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{1} 
\setlength{\parindent}{0in}
\usepackage{sectsty}
\allsectionsfont{\normalsize}
\chapterfont{\raggedright}
\usepackage{titlesec}
 \titleformat{\paragraph}[hang]{\normalfont\normalsize\bfseries}{}{}{}
\titlespacing*{\paragraph}{0pt}{0pt}{1em}
\usepackage{tocstyle}
\renewcommand*{\addchaptertocentry}[2]{%
  \addtocentrydefault{chapter}{\chaptername\nobreakspace #1}{#2}%
}
\usetocstyle{KOMAlike}


\includeonly{%
Front_Matter/FM,%
Chapter1+2_literature+intro/Ch1+2,%
%Chapter3_Mechanical_Setup/Ch3,%
%Chapter4_Electrical_Layout/Ch4,%
%Chapter5_Control_Algorithm/Ch5,%
%Exp/ex,%
%Model/mdl,%
%Discussion/dis,%
%Conclusion/Conc,%
Back_Matter/BM%
}


\begin{document}

\include{Front_Matter/FM}

\include{Chapter1+2_literature+intro/Ch1+2}

\include{Exp/ex}

\include{Model/mdl}

\include{Discussion/dis}

\include{Conclusion/Conc}

\include{Back_Matter/BM}


\end{document}

Any help is appreciated

share|improve this question

closed as too localized by Werner, egreg, doncherry, lockstep, cgnieder Jul 15 '12 at 12:29

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

I fixed it by removing the aux files from the root folder and all subdirectories. Any extra info is welcomed.

share|improve this answer

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