2

I need to write a document which will contain a preliminary table of contents for a report that I need to write couple of months later.

For that, I need to provide the preliminary outline, the question is, how to create a ToC with arbitrary entries in it (not related to the document which is being written now)?

5
  • You can use \addcontentsline. For example, \addcontentsline{toc}{chapter}{Appendix}
    – user11232
    Feb 1, 2015 at 13:40
  • can you show me a more extended example of how it works? excuse my n00bness Feb 1, 2015 at 14:07
  • You have to elaborate more on your use case. Where do you want the toc? Along with current document's toc or is it inside the body of the current document?
    – user11232
    Feb 1, 2015 at 14:43
  • inside the body of the current document, completely unrelated from the current toc Feb 1, 2015 at 15:17
  • 2
    Then you can simply use a list. i will post an example code shortly.
    – user11232
    Feb 1, 2015 at 15:19

1 Answer 1

4

You can use enumerate and to style it, use enumitem package.

\documentclass{article}
\usepackage{enumitem}
\usepackage{kantlipsum}
\begin{document}
  \kant[1-2]
  \begin{enumerate}[label=\arabic*,leftmargin=*,labelsep=2ex,ref=\arabic*]
    \item First chapter \dotfill 2
      \begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
        \item First section \dotfill 3
        \begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
        \item First sub section \dotfill 4
      \end{enumerate}
      \end{enumerate}
    \item Second chapter \dotfill 10
      \begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
        \item First section \dotfill 12
        \begin{enumerate}[label*=.\arabic*,leftmargin=*,labelsep=2ex]
        \item First sub section \dotfill 13
      \end{enumerate}
      \end{enumerate}
  \end{enumerate}
\end{document}

enter image description here

More styling like adjusting the vertical separation etc can be done and left as an exercise. For details, refer enumitem manual.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .