3

I have a document of class memoir. These are all my settings:

\documentclass[a4paper,oneside, 11pt, openany]{memoir}
\usepackage[english]{babel}
\usepackage[T1]{fontenc} 
\usepackage{txfonts}
\usepackage[utf8]{inputenc}
\usepackage{wallpaper}
\usepackage{palatino}
\setlength{\parindent}{2.5em}
\usepackage[sorting=none]{biblatex}
\addbibresource{biblio.bib}
\usepackage[inner=2.5cm,outer=2.5cm,  tmargin=2.5cm, bmargin=2.5cm]{geometry}

However, my table of contents is not as I would like. I have chapters like this:

\chapter*{Abstract}
\input{chapters/abstract} \cite{dirac}

\chapter*{Dedication}
To...

\chapter*{Declaration}
I declare that..

\chapter*{Acknowledgements}
I want to thank...

\tableofcontents
\input{chapters} 

\chapter*{Introduction}
\input{chapters/intro}

\chapter*{Methods}
\input{chapters/chapter02}

\chapter*{Results}
\input{chapters/chapter03}

When I print table of contents however, I only get:

CONTENTS 

Contents                      5
Bibliography                  61

I would like to have all the different chapters listed, as well as an index of tables and figures used. Any suggestions on how to fix this?

  • 1
    Welcome to TeX.SX! Don't post such fragments only, please! Use \chapter{...} not \chapter*{...} -- You most likely want numbered chapters, not unnumbered ones. For the Declaration other things have to be done, e.g. \frontmatter – user31729 Aug 28 '16 at 10:41
  • 1
    Why are you using chapter*? Starred document dividers does not reach the toc – daleif Aug 28 '16 at 10:42
  • 1
    Welcome, remove all asterisks from the chapters and use \setcounter{secnumdepth}{-1}. – Johannes_B Aug 28 '16 at 10:44
  • 1
    Free ebook for begginers: LaTeX for complete novices – Johannes_B Aug 28 '16 at 10:44
3

If some parts of the \chapter -like entries should be unnumbered but still appear in the ToC, either use \frontmatter and switch later on to \mainmatter where appropiate or say \setcounter{secnumdepth}{-1} as Johannes suggested.

This approach is not restricted to memoir by the way -- any class that supports \frontmatter etc. will behave like this. (The counter method should work always, anyway!)

\documentclass[a4paper,oneside, 11pt, openany]{memoir}
\usepackage[english]{babel}
\usepackage[T1]{fontenc} 
\usepackage{txfonts}
\usepackage[utf8]{inputenc}
\usepackage{wallpaper}
\usepackage{palatino}
\setlength{\parindent}{2.5em}
\usepackage[sorting=none]{biblatex}
\addbibresource{biblio.bib}
\usepackage[inner=2.5cm,outer=2.5cm,  tmargin=2.5cm, bmargin=2.5cm]{geometry}


\begin{document}
\tableofcontents*

\frontmatter

\chapter{Abstract}

\chapter{Dedication}
To...

\chapter{Declaration}
I declare that..

\chapter{Acknowledgements}
I want to thank...

\tableofcontents

\mainmatter

\chapter{Introduction}

\chapter{Methods}

\chapter{Results}

\end{document}

enter image description here

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.