Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage[utf8]{inputenc}
- begin{document}
- maketitle
- thispagestyle{empty}
- newpage
- section*{Abstract}
- addtocontents{toc}{~hfilltextbf{Side}par}
- addcontentsline{toc}{section}{protectnumberline{}Forord}
- section*{Introduction}
- addcontentsline{toc}{section}{protectnumberline{}Sammendrag}
- newpage
- tableofcontents
- listoffigures
- addcontentsline{toc}{section}{protectnumberline{}Figures}
- listoftables
- addcontentsline{toc}{section}{protectnumberline{}Tables}
- newpage
- pagenumbering{arabic} ´
- %Several sections here
- newpage
- appendix
- section{Appendix A}
- subsection{Appendix name}
- end{document}
- documentclass{article}
- usepackage{xparse}
- newcommand{setsectiontocentry}[1]{defsectiontocentry{#1}}
- letoldsectionsection
- makeatletter
- RenewDocumentCommand{section}{ s o m }{%
- IfBooleanTF{#1}
- {% section*
- oldsection*{#3}%
- IfValueTF{#2}
- {addcontentsline{toc}{section}{protectnumberline{}#2}}% section*[.]{..}
- {@ifundefined{sectiontocentry}
- {addcontentsline{toc}{section}{protectnumberline{} #3}}%
- {addcontentsline{toc}{section}{protectnumberline{} sectiontocentry}}%
- letsectiontocentryrelax
- }
- %{addcontentslineaddcontentsline{toc}{section}{protectnumberline{}%
- %ifcsname sectiontocentryendcsname
- %sectiontocentry
- %else
- %#3%
- %fi
- %}%
- %letsectiontocentryrelax
- %}% section*{..}
- }
- {% section
- IfValueTF{#2}
- {oldsection[#2]{#3}}% section[.]{..}
- {oldsection{#3}}% section{..}
- }%
- }
- makeatother
- begin{document}
- addtocontents{toc}{~hfilltextbf{Side}par}
- section*{Abstract}
- section*{Introduction}
- clearpage
- setsectiontocentry{ToC}
- tableofcontents
- setsectiontocentry{Figures}
- listoffigures
- listoftables
- clearpage
- pagenumbering{arabic}
- section{First section}
- section{Second section}
- section*[THIRD SECTION]{Third section}
- section{Last section}
- clearpage
- appendix
- section{First appendix}
- section{Second appendix}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement