Split TOC in classicthesis - latex

I'm trying to find a way to split the TOC in classicthesis, so that I don't have the contents of the appendices appearing in the main TOC (just their titles), but rather in a separate TOC before the appendices. This is an MWE:
\documentclass[paper=a4, fontsize=11pt, titlepage, headinclude, footinclude, numbers=noenddot, cleardoublepage=empty]{scrreprt}
\usepackage[eulerchapternumbers, beramono, eulermath, pdfspacing]{classicthesis}
\usepackage{blindtext}
\begin{document}
%TOC (as coded in classicthesis download)
\pagestyle{scrheadings}
%\phantomsection
\pdfbookmark[1]{\contentsname}{tableofcontents}
% Set the numbering level to be shown: part=-1, chapter=0, section=1, subsection=2, subsubsection=3, paragraph=4, subparagraph=5.
\setcounter{tocdepth}{2} % <-- 2 = up to subsections in the ToC
% \setcounter{secnumdepth}{3} % <-- 3 = numbers up to subsubsections in the text
\manualmark
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
\tableofcontents
\automark[section]{chapter}
\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\textsc{\thesection}\enspace\spacedlowsmallcaps{#1}}}
\part{Main Text}
\blinddocument
\part{Appendices}
\appendix
\blinddocument
\end{document}
As you can see, on the TOC page, Appendix A gets a full listing (where I'd prefer \setcounter{tocdepth}{0}), and I can't see any way to repeat another TOC before the appendices (with \setcounter{tocdepth}{2}).
I've done this with other documents by combining tocloft and titletoc, but classicthesis doesn't use the latter (I think).

Turns out the simplest way of stopping the sections etc being listed is to insert \addtocontents{toc}{\protect\setcounter{tocdepth}{0}} after \appendix.
This is a bit of a blunt weapon, though, because it still leaves the issue of doing a separate TOC for the Appendices. I've experimented with etoc, and that goes part of the way.
Long MWE:
\documentclass[paper=a4, fontsize=11pt, titlepage, headinclude, footinclude, numbers=noenddot, cleardoublepage=empty]{scrreprt}
\usepackage[eulerchapternumbers, beramono, eulermath, pdfspacing]{classicthesis}
\usepackage{blindtext}
\usepackage{etoc}
\begin{document}
\setcounter{secnumdepth}{3} % Number up to subsubsection level.
\pagenumbering{roman}
% Short TOC - chapters and sections only.
\setcounter{tocdepth}{1} % Set depth to section in the (short) table of contents.
\etocsettocstyle{\chapter*{Short Contents}}{} % Heading for the short toc.
\localtableofcontents
% Long TOC - down to subsubsection.
\setcounter{tocdepth}{3} % Set depth to subsubsection in the (long) table of contents.
% \addcontentsline{toc}{chapter}{Long Contents}
\etocsettocstyle{\chapter*{Long Contents}}{} % Heading for the long toc.
\localtableofcontents
\pagenumbering{arabic}
\setcounter{tocdepth}{2}
\etocsettocstyle{\section*{Contents of Chapter \thechapter}}{\noindent\rule{\linewidth}{0.5pt}\vskip0.5\baselineskip} % Chapter TOC
\chapter{Chapter One}
\localtableofcontents
\section{One}
\blindtext
\subsection{One-One}
\blindtext
\subsubsection{One-One-One}
\blindtext
\subsubsection{One-One-Two}
\blindtext
\subsection{One-Two}
\blindtext
\subsubsection{One-Two-One}
\blindtext
\subsubsection{One-Two-Two}
\blindtext
\section{Two}
\blindtext
\subsection{Two-One}
\blindtext
\subsubsection{Two-One-One}
\blindtext
\subsubsection{Two-One-Two}
\blindtext
\subsection{Two-Two}
\blindtext
\subsubsection{Two-Two-One}
\blindtext
\subsubsection{Two-Two-Two}
\blindtext
\chapter{Chapter Two}
\localtableofcontents
\section{One}
\blindtext
\subsection{One-One}
\blindtext
\subsubsection{One-One-One}
\blindtext
\subsubsection{One-One-Two}
\blindtext
\subsection{One-Two}
\blindtext
\subsubsection{One-Two-One}
\blindtext
\subsubsection{One-Two-Two}
\blindtext
\section{Two}
\blindtext
\subsection{Two-One}
\blindtext
\subsubsection{Two-One-One}
\blindtext
\subsubsection{Two-One-Two}
\blindtext
\subsection{Two-Two}
\blindtext
\subsubsection{Two-Two-One}
\blindtext
\subsubsection{Two-Two-Two}
\blindtext
\appendix
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}} % Set the display depth for the TOC to chapter only.
% List of appendices.
\etocsettocstyle{\vskip0.3\baselineskip\chapter*{Appendices}}{} % Heading for the list of appendices.
\localtableofcontents
\chapter{Appendix A}
\section{One}
\blindtext
\subsection{One-One}
\blindtext
\subsubsection{One-One-One}
\blindtext
\subsubsection{One-One-Two}
\blindtext
\subsection{One-Two}
\blindtext
\subsubsection{One-Two-One}
\blindtext
\subsubsection{One-Two-Two}
\blindtext
\section{Two}
\blindtext
\subsection{Two-One}
\blindtext
\subsubsection{Two-One-One}
\blindtext
\subsubsection{Two-One-Two}
\blindtext
\subsection{Two-Two}
\blindtext
\subsubsection{Two-Two-One}
\blindtext
\subsubsection{Two-Two-Two}
\blindtext
\end{document}
This allows additional TOCs (I have a short and a long one here), and partial TOCs for each chapter.
However, there are still a few wrinkles.
(1) The page-numbering is incorrect. The first page of the long TOC gets a Roman numeral, meaning that the main text starts on p2 instead of p1.
(2) The TOC for the appendices is empty. This is bizarre, because on my "real" document, it has a line for Appendix A, and the EXACT same commands are used.
(3) The fact that tocdepth is set to 0 before the appendices presumably means that the section etc data is not logged to the TOC file, and this means that etoc cannot therefore access section data for the appendices. At any rate, a partial TOC for each appendix is not possible.
So, a bit farther forward, but still with issues that mean it's not really a robust solution.

Related

Adding list of figure/list of table pushing away the mitoc of one chapter to another in latex

I am using an existing template in Latex and trying to modify it according to my needs. This is how the code looks like and everything works fine, minitoc also works fine.
% Instead of "de" you can also use "en" if the work is written in English
% Either "darkstyle" or "lightstyle"
\documentclass[en, darkstyle]{unirostock}
% For the sources, more information https://de.overleaf.com/learn/latex/Bibliography_management_with_biblatex
\usepackage[backend=biber,style=ieee,maxbibnames=99,backref=true,citestyle=ieee]{biblatex}
\addbibresource{lit.bib}
% creative-commons: Creative Commons license, attribution - redistribution permitted under the same conditions
% private: publication and modification only after consultation with the author
\license{creative-commons}
\author{}
\enrolmentnumber{123456789} % Matrikelnummer
\title{}
\type{}
\course{}
\workperiod{}
\supervisor{}
\primaryreviewer{}
\secondaryreviewer{} % Falls es keinen gibt, einfach weglassen
\faculty{}
\institute{}
\workinggroup{}
\begin{document}
\maketitle
\makelicense
\pagenumbering{Roman}
\setstretch{1.263}
\pagenumbering{gobble}
\include{chapter/abstract}
\pagenumbering{arabic}
\clearpage
\tableofcontents
\clearpage
\include{chapter/introduction.tex}
\include{chapter/background.tex}
\include{chapter/analysis.tex}
\include{chapter/implmentation.tex}
\include{chapter/evaluation.tex}
\include{chapter/conclusion-future-work.tex}
% List of figures
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
% List of tables
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\printbibliography
\clearpage
\include{chapter/declaration}
\end{document}
But if I want to add the list of figures and list of tables before the chapter, like this
\clearpage
\tableofcontents
% List of figures
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
% List of tables
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\clearpage
\include{chapter/introduction.tex}
\include{chapter/background.tex}
\include{chapter/analysis.tex}
\include{chapter/implmentation.tex}
\include{chapter/evaluation.tex}
\include{chapter/conclusion-future-work.tex}
then the minitoc of first chapter is showing nothing.
and it is appearing on third chapter.
That means minitoc of one chapter is appearing after two chapter and it continues.
This is the code of minitoc.
\newcommand{\printmyminitoc}[1]{%
\vspace{-2cm}%
\noindent\hspace{-4.5cm}%
\colorlet{black}{white}%
\begin{tikzpicture}
\node[rounded corners,align=left,fill=uniblau, blur shadow={shadow blur steps=5}, inner sep=5mm]{%
\hspace{3.8cm}
\color{white}%
\begin{minipage}{8.5cm}%minipage trick
\hypersetup{linkcolor=white}
\minitoc
\hypersetup{linkcolor=uniblau}
\end{minipage}};
\end{tikzpicture}
\vspace{1cm}%
}
Could someone help about this issue. I am almost new in Latex.

How it is possible to convert LaTeX document to Word (docx file) with all cross-references and labels for images and equations, tables by Pandoc?

I have a tex-file obtained originally from RStudio with bookdown. The original set of Rmd-files were deleted by accident.
So I need to convert below minimized correct tex-file to Word (docx file extension):
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\#ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
pdftitle={Simple document},
hidelinks,
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\usepackage[margin=1in]{geometry}
\usepackage{longtable,booktabs,array}
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if#noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin#nat#width>\linewidth\linewidth\else\Gin#nat#width\fi}
\def\maxheight{\ifdim\Gin#nat#height>\textheight\textheight\else\Gin#nat#height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps#figure{htbp}
\makeatother
\usepackage[normalem]{ulem}
% Avoid problems with \sout in headers with hyperref
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{5}
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
\usepackage[]{biblatex}
\addbibresource{bibliography.bib}
\title{Simple document}
\author{}
\date{\vspace{-2.5em}}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{conjecture}{Conjecture}[section]
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\theoremstyle{definition}
\newtheorem{example}{Example}[section]
\theoremstyle{definition}
\newtheorem{exercise}{Exercise}[section]
\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\newtheorem*{solution}{Solution}
\begin{document}
\maketitle
{
\setcounter{tocdepth}{2}
\tableofcontents
}
\hypertarget{format}{%
\section{Format}\label{format}}
Read \ref{format} for details.
Or read \protect\hyperlink{format}{format}.
Formatting:
\begin{itemize}
\tightlist
\item
sup-script or power - x\textsuperscript{2} ;
\item
sub-script - y\textsubscript{3} ;
\item
strike through - \sout{strike through} ;
\item
term -- definition ;
\item
long term --- long definition .
\end{itemize}
Here comes \textbf{footnote} \footnote{Footnote text} with its contents.
Image with caption, see \ref{fig:image}.
\begin{figure}
\centering
\includegraphics{image.png}
\caption{\label{fig:image} Image}
\end{figure}
Labeled table is below, see table \ref{tab:table}.
\begin{longtable}[]{#{}ll#{}}
\caption{\label{tab:table}\\
My table}\tabularnewline
\toprule
\textbf{Col 1 header} & \textbf{Col 2 header} \\
\midrule
\endfirsthead
\endhead
r1c1 & r1c2 \\
r2c1 & r2c2 \\
\bottomrule
\end{longtable}
Inline: \(a^2 + b^2 = c^2\).
Block:
\[ E = \frac{mc^2}{\sqrt{1-\frac{v^2}{c^2}}} \]
Labeled, see \eqref{eq:eq}:
\begin{equation}
f\left(k\right) =\binom{n}{k} p^k\left(1-p\right)^{n k}
\label{eq:eq}
\end{equation}
See LaTeX \autocite{latex} site for details.
Code is below, see \ref{exm:code}:
\begin{example}
\protect\hypertarget{exm:code}{}{\label{exm:code} }Hello world
\end{example}
\begin{verbatim}
int main(){
return 0;
}
\end{verbatim}
\hypertarget{references}{%
\section*{References}\label{references}}
\addcontentsline{toc}{section}{References}
\printbibliography
\end{document}
When I try to convert it to docx using pandoc (2.16.1 version) command below:
pandoc simple.tex --to docx+native_numbering --output simple.docx --table-of-contents --toc-depth 5 --number-sections --citeproc --verbose --csl ieee.csl
(In the above command ieee.csl was downloaded from Zotero).
I get
and I see many strange things:
[fig:image] along with Figure with number;
[tab:table] along with Table with number;
[eq:eq] instead of equation number;
[exm:code] instead of example number.
Is it possible to replace (or suppress them for Figure and Table) above strange […] fields by correct numbers and links using Pandoc to get correct docx output?
This is currently not supported by plain pandoc, but you can use filters to get the numbering back. E.g., the resolve-references.lua filter in the OpenJournals "Inara" project does something comparable. You may have to adjust and extend it to fully suit your requirements.

create link on every page of latex file to a specific page

I want to create a link on every page of a latex file, and this link should navigate to a specific page in the documents. Like, create a link for \listoftodos command on every page, so that one can easily navigate to it.
MWE
\documentclass[]{article}
%opening
\title{}
\author{}
\usepackage[draft, colorinlistoftodos]{todonotes}
\begin{document}
\section{one}
\todo[inline]{todo 1}
\newpage
\section{two}
\todo[inline]{todo 2}
\newpage
\listoftodos
\end{document}
One possibility: use the fancyhdr package and add a link to the head or footline:
\documentclass[]{article}
%opening
\title{}
\author{}
\usepackage[draft, colorinlistoftodos]{todonotes}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancypagestyle{plain}[fancy]{}
\renewcommand{\headrulewidth}{0pt}
\cfoot{\protect\hyperlink{todolist}{jump to todo list}}
\usepackage{hyperref}
\begin{document}
\section{one}
\todo[inline]{todo 1}
\newpage
\section{two}
\todo[inline]{todo 2}
\newpage
\phantomsection
\hypertarget{todolist}{}
\listoftodos
\end{document}

Undefined control sequence \chapter

Hello I'm new in Latex.
I was trying to write my thesis, using the MasterDoctoralClass.cls.
This is my main.tex:
\documentclass[
11pt,
english,
singlespacing,
headsepline
]{MastersDoctoralThesis}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} )
\addbibresource{example.bib}
\usepackage[autostyle=true]{csquotes}
%----------------------------------------------------------------------------------------
% MARGIN SETTINGS
%----------------------------------------------------------------------------------------
\geometry{
paper=a4paper,
inner=2.5cm,
outer=3.8cm,
bindingoffset=.5cm,
top=1.5cm,
bottom=1.5cm
}
%----------------------------------------------------------------------------------------
% THESIS INFORMATION
%----------------------------------------------------------------------------------------
\thesistitle{Title Thesis}
\supervisor{Prof. X \textsc{Y} \\ Dr. Z \textsc{W}}
\degree{Master of Science in Electronic Engineering}
\author{Name \textsc{Surname}}
\subject{Electronic Engineering}
\keywords{}
\university{{Università}}
\department{{Department of Information Engineering, Electronics and Telecommunications}}
\group{{Master of Science in Electronic Engineering}}
\faculty{{Faculty of Information Engineering, Informatics and Statistics}}
\AtBeginDocument{
\hypersetup{pdftitle=\ttitle}
\hypersetup{pdfauthor=\authorname}
\hypersetup{pdfkeywords=\keywordnames}
}
\begin{document}
\frontmatter
\pagestyle{plain}
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\begin{titlepage}
\begin{center}
\includegraphics[scale=1]{logo.jpg}
\end{center}
\begin{center}
\vspace*{.01\textheight}
\textsc{\Large Master Thesis}\\[1cm]
\HRule \\[0.4cm]
{\huge \bfseries \ttitle\par}\vspace{0.4cm}
\HRule \\[1.5cm]
\begin{minipage}[t]{0.4\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
\href{}{\authorname}
\end{flushleft}
\end{minipage}
\begin{minipage}[t]{0.4\textwidth}
\begin{flushright} \large
\emph{Supervisor:} \\
{\supname}
\end{flushright}
\end{minipage}\\[2cm]
\begin{center}
\includegraphics[scale=0.4]{logo2.jpg}\hfill\includegraphics[scale=0.5]{logo3.jpg}
\end{center}
\vspace*{1.5cm}
\groupname\\\deptname\\[1.5cm]
\vfill
\rule{3cm}{1pt}\\
{\large \today}\\[4cm]
%\includegraphics{Logo}
\vfill
\end{center}
\end{titlepage}
%----------------------------------------------------------------------------------------
% QUOTATION PAGE
%----------------------------------------------------------------------------------------
\vspace*{0.2\textheight}
\begin{flushright}
\thispagestyle{empty}
\vspace*{5cm}
\itshape\enquote{Something}\\[0.3cm]
\end{flushright}
\hfill Name
%----------------------------------------------------------------------------------------
% ABSTRACT PAGE
%----------------------------------------------------------------------------------------
\begin{abstract}
\addchaptertocentry{\abstractname}
The Thesis Abstract is written here (and usually kept to just this page). The page is kept centered vertically so can expand into the blank space above the title too\ldots
\end{abstract}
%----------------------------------------------------------------------------------------
% ACKNOWLEDGEMENTS
%----------------------------------------------------------------------------------------
\begin{acknowledgements}
\addchaptertocentry{\acknowledgementname}
The acknowledgments and the people to thank go here, don't forget to include your project advisor\ldots
\end{acknowledgements}
%----------------------------------------------------------------------------------------
% LIST OF CONTENTS/FIGURES/TABLES PAGES
%----------------------------------------------------------------------------------------
\tableofcontents
\listoffigures
\listoftables
%----------------------------------------------------------------------------------------
% ABBREVIATIONS
%----------------------------------------------------------------------------------------
\begin{abbreviations}{ll} %
\textbf{LAH} & \textbf{L}ist \textbf{A}bbreviations \textbf{H}ere\\
\textbf{WSF} & \textbf{W}hat (it) \textbf{S}tands \textbf{F}or\\
\end{abbreviations}
%----------------------------------------------------------------------------------------
% PHYSICAL CONSTANTS/OTHER DEFINITIONS
%----------------------------------------------------------------------------------------
\begin{constants}{lr#{${}={}$}l}
Speed of Light & $c_{0}$ & \SI{2.99792458e8}{\meter\per\second} (exact)\\
\end{constants}
%----------------------------------------------------------------------------------------
% SYMBOLS
%----------------------------------------------------------------------------------------
\begin{symbols}{lll}
$a$ & distance & \si{\meter} \\
$P$ & power & \si{\watt} (\si{\joule\per\second}) \\
%Symbol & Name & Unit \\
\addlinespace
$\omega$ & angular frequency & \si{\radian} \\
\end{symbols}
%----------------------------------------------------------------------------------------
% DEDICATION
%----------------------------------------------------------------------------------------
\dedicatory{For my family}
\end{document}
%----------------------------------------------------------------------------------------
% THESIS CONTENT - CHAPTERS
%----------------------------------------------------------------------------------------
\mainmatter
\pagestyle{thesis}
\include{Chapters/Introduction}
%\include{Chapters/Chapter1}
If I compile main.tex (with PDFLatex, I also did it with Latex and PDFTex) it doesn't return me any error, but when I look at the PDF it doesn't print the Introduction.
So I was watching to the Introduction.tex:
% Chapter 1
\chapter{Chapter Title Here} % Main chapter title
\label{Chapter1} % For referencing the chapter elsewhere, use \ref{Chapter1}
%----------------------------------------------------------------------------------------
% Define some commands to keep the formatting separated from the content \newcommand{\keyword}[1]{\textbf{#1}} \newcommand{\tabhead}[1]{\textbf{#1}} \newcommand{\code}[1]{\texttt{#1}} \newcommand{\file}[1]{\texttt{\bfseries#1}} \newcommand{\option}[1]{\texttt{\itshape#1}}
%----------------------------------------------------------------------------------------
\section{Welcome and Thank You} Welcome to this \LaTeX{} Thesis Template, a beautiful and easy to use template for writing a thesis using the \LaTeX{} typesetting system.
If you are writing a thesis (or will be in the future) and its subject is technical or mathematical (though it doesn't have to be), then creating it in \LaTeX{} is highly recommended as a way to make sure you can just get down to the essential writing without having to worry over formatting or wasting time arguing with your word processor.
\LaTeX{} is easily able to professionally typeset documents that run to hundreds or thousands of pages long. With simple mark-up commands, it automatically sets out the table of contents, margins, page headers and footers and keeps the formatting consistent and beautiful. One of its main strengths is the way it can easily typeset mathematics, even \emph{heavy} mathematics. Even if those equations are the most horribly twisted and most difficult mathematical problems that can only be solved on a super-computer, you can at least count on \LaTeX{} to make them look stunning.
And if I complie it I have some errors:
Undefined control sequence \chapter
Missing \begin{document}. \chapter{C
Undefined control sequence \section
I tryed to put the \begin{document} but I still have the same errors on the undefined control sequence and other errors like
The font size command \normalisize si not defined:there is probably something wrong with the class file.
Can someone help me, please? Thanks!
If on line 13 you remove the ) and move the \end{document} statement on line 183 to the end of the main, it will compile properly.

Latex - \addsec and headsepline

When I write \addsec{Acronymes}, LaTeX puts it in the Table of Contents and DOES the headsepline section. When I write \addsec*{Acronymes}, LaTeX doesnt put it in the Table of Contents and doesnt write it in the headsepline section. But I want that it doesnt appears in the Table of Contents and does appear in the headsepline.
So how do it?
Thats what I've done for this:
\documentclass[a4paper, 12pt, german, headsepline, footsepline, listtotoc, bibtotoc] {scrartcl}
\bibliographystyle{annotate}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ansinew]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[printonlyused]{acronym}
%head and footsepline
\usepackage[headsepline,plainheadsepline]{scrpage2}
\clearscrheadfoot
\pagestyle{scrheadings}
\automark[subsection]{section}
\ihead{my title}
\ohead{\headmark}
\ifoot{my name}
\ofoot{\pagemark}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=blue,
filecolor=blue,
linkcolor=blue,
urlcolor=blue
}
\begin{document}
\input{include/Abstract}
\newpage
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables
\newpage
\addsec*{Acronymes}
%\addsec{Acronymes}
\begin{acronym}
\acro{HTTP}{Hypertext Transfer Protocol}
\end{acronym}
\end{document}
You can momentarily remove the functionality of \addcontentsline - the macro in charge of adding elements to the ToC - using
{% \begingroup
\renewcommand{\addcontentsline}[3]{}% Remove functionality of \addcontentsline
\addsec{Acronymes}%
}% \endgroup
Grouping via { and } ensure that the command redefinitions are restored after the group ends.

Resources