Page LayoutTable of Contents

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Table of Contents

Post by coachbennett1981 »

I am having all types of difficulty on something I think should be easy. I have looked online and have not been able to figure this problem out. I am trying to make a table of contents that appears like the picture attached. This is another book the author has done. I want my table of contents to look like this:


Section I Pre Algebra
1 Fractions.......................... Page #
2 Order of Operations..... Page #
3 Negative Numbers

Section 2 Algebra
4 Inequalities


etc

Below is my example code. I think this is an MWE. I have taken out unnecessary code. Any help would be appreciated.

Code: Select all


\documentclass[12pt,openany]{book}
\usepackage{amsmath,amssymb,amsfonts} % Typical maths resource packages
\usepackage{multicol}
 \usepackage{enumitem}
\usepackage[font=small,labelsep=none]{caption}
\usepackage{cancel}
\input{longdiv(2).tex}
\makeindex
\title{Praxis 1: A study Guide  }
\author{Math 1 \\ Math 2 \\
{\small\em \copyright \  Draft date \today }}
 \date{ }
\begin{document}
\maketitle

 \addcontentsline{toc}{chapter}{Contents}
\pagenumbering{roman}
\tableofcontents 

\pagestyle{headings}
\pagenumbering{arabic}

\chapter{Pre-Algebra}
\include{ch2}
\include{ch3}
\include{ch4}


\end{document}



Attachments
Screen shot 2011-03-15 at 8.05.26 AM.png
Screen shot 2011-03-15 at 8.05.26 AM.png (64.27 KiB) Viewed 2322 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Table of Contents

Post by localghost »

coachbennett1981 wrote:[…] I think this is an MWE. […]
No, it's not [1].
coachbennett1981 wrote:[…] I have taken out unnecessary code. […]
But you didn't provide the essentials.

[1] View topic: Avoidable mistakes


Thorsten
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: Table of Contents

Post by coachbennett1981 »

I took all the code that is useless.. Should I have provided the actual chapters?
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

Table of Contents

Post by Montag »

  • Lose the packages that are not necessary to build the most minimal example of what you want to achieve.
  • Lose the commands that are not necessary to build the most minimal example of what you want to achieve.
  • Delete the lines with "\input{ch1}" and so on and replace them with "Text." or so.
Maybe I forgot something, but for starters, that's pretty much it.
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
Post Reply