Graphics, Figures & TablesTable of Contents Headings

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
toastermm
Posts: 8
Joined: Wed Feb 02, 2011 5:37 pm

Table of Contents Headings

Post by toastermm »

I'm glad I joined this forum this summer. I'm working on writing my dissertation and am always learning more and more about latex.

The first issue is that my advisor does not like the standard latex ToC output. As of now, I have two main chapters of work that have multiple subsections. Here is a summarized version of my 'master' document:

Code: Select all


\documentclass[12pt]{report}

\usepackage{//LOTS OF MATH PACKAGES HERE//}

%define margins according to standards below
\oddsidemargin=.6in \textwidth=5.8 in \topmargin=-0.25in
\textheight=8.83 in \footskip=40pt \headheight=12pt \headsep=10pt

%Now define many math commands below
\new command{\blah}{\mathrm{blah}}
%...etc

\begin{document}

\setcounter{secnumdepth{-1}

\chapter*{Title Page}
%Title page words here

\chapter*{Acknowledgements}
%Acknowledgements here

%ToC below
\tableofcontents

\chapter{Introduction}

%Begin Ch. 1 below
\chapter{Title of Ch.1(section 1) Here}
\input{LatexFile of Ch.1(section 1) Here}

\chapter{Title of Ch.1(section 2) Here}
\input{LatexFile of Ch.1(section 2) Here}

\chapter{Title of Ch.1(section 2) Here}
\input{LatexFile of Ch.1(section 2) Here}

%Begin Ch. 2 below
\chapter{Title of Ch.2(section 1) Here}
\input{LatexFile of Ch.2(section 1) Here}

\chapter{Title of Ch.2(section 2) Here}
\input{LatexFile of Ch.2(section 2) Here}

\chapter{References}
\bibliography{thesis}
\bibliographystyle{plain}

\end{document}

The output of the ToC is as follows:
Table of Contents

1 Introduction

2 Title of Ch.1(section 1) Here ................... pg#
2.1 (subsection in ch1 section 1) ................ pg#
2.2 (subsection in ch1 section 1) ................ pg#
2.3 (subsection in ch1 section 1) ................ pg#

3 Title of Ch.1(section 2) Here ................... pg#
3.1 (subsection in ch1 section 2) ................ pg#
3.2 (subsection in ch1 section 2) ................ pg#
3.3 (subsection in ch1 section 2) ................ pg#

4 Title of Ch.1(section 3) Here ................... pg#
4.1 (subsection in ch1 section 3) ................ pg#
4.2 (subsection in ch1 section 3) ................ pg#
4.3 (subsection in ch1 section 3) ................ pg#

5 Title of Ch.2(section 1) Here ................... pg#
5.1 (subsection in ch2 section 1) ................ pg#
5.2 (subsection in ch2 section 1) ................ pg#
5.3 (subsection in ch2 section 1) ................ pg#

6 Title of Ch.2(section 2) Here ................... pg#
6.1 (subsection in ch2 section 2) ................ pg#
6.2 (subsection in ch2 section 2) ................ pg#
6.3 (subsection in ch2 section 2) ................ pg#

7 References ........................................ pg#


--------- end of ToC ----

What I would really like to do is to change the numbering to be more like the following:

Table of Contents

Introduction

Chapter 1

1.1 Title of Ch.1(section 1) Here ................... pg#
1.1.1 (subsection in ch1 section 1) ................ pg#
1.2.2 (subsection in ch1 section 1) ................ pg#
1.3.3 (subsection in ch1 section 1) ................ pg#

1.2 Title of Ch.1(section 2) Here ................... pg#
1.2.1 (subsection in ch1 section 2) ................ pg#
1.2.2 (subsection in ch1 section 2) ................ pg#
1.2.3 (subsection in ch1 section 2) ................ pg#

1.3 Title of Ch.1(section 3) Here ................... pg#
1.3.1 (subsection in ch1 section 3) ................ pg#
1.3.2 (subsection in ch1 section 3) ................ pg#
1.3.3 (subsection in ch1 section 3) ................ pg#

Chapter 2

2.1 Title of Ch.2(section 1) Here ................... pg#
2.1.1 (subsection in ch2 section 1) ................ pg#
2.1.2 (subsection in ch2 section 1) ................ pg#
2.1.3 (subsection in ch2 section 1) ................ pg#

2.2 Title of Ch.2(section 2) Here ................... pg#
2.2.1 (subsection in ch2 section 2) ................ pg#
2.2.2 (subsection in ch2 section 2) ................ pg#
2.2.3 (subsection in ch2 section 2) ................ pg#

3 References ........................................ pg#


--------- end of ToC ----

I am at a loss where to start. Any suggestions? If someone wants my full on master document, just say the word and I'll post it. I figured a summary version would be more helpful.

I guess I'm also asking if there is a way to customize the number before each chapter/section?

Also as you can see above I would like the ToC to have a title above certain parts (chapter 1 and chapter 2 titles above the sections...)
Last edited by toastermm on Mon Jul 25, 2011 1:27 am, edited 1 time in total.

Recommended reading 2024:

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

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

toastermm
Posts: 8
Joined: Wed Feb 02, 2011 5:37 pm

Table of Contents Headings

Post by toastermm »

If it helps, here is the master document word for word.

Code: Select all


\documentclass[12pt]{report}

\usepackage{amsmath,amsthm,amssymb,latexsym,amscd,bm}
\usepackage{setspace,thesis}
\usepackage[table]{xcolor}
\usepackage{graphicx, amsfonts, amsmath}
\usepackage{color}
\usepackage{float}
\usepackage{epsf,epsfig,psfrag}
\usepackage[sort&compress]{natbib}
\bibpunct{[}{]}{,}{n}{}{;}


\oddsidemargin=.6in \textwidth=5.8 in \topmargin=-0.25in
\textheight=8.83 in \footskip=40pt \headheight=12pt \headsep=10pt

\newcommand{\Tr}{\mathrm{Tr}}
\newcommand{\Stab}{\mathrm{Stab}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\Br}{\mathrm{Br}}
\newcommand{\rank}{\mathrm{rank}}
\newcommand{\Ad}{\mathrm{Ad}}
\newcommand{\Cor}{\mathrm{Cor}}
\newcommand{\ad}{\mathrm{ad}}
\newcommand{\aut}{\mathrm{Aut}}
\newcommand{\br}{\mathrm{Br}}
\renewcommand{\b}[1]{\overline{#1}}
\newcommand{\wt}[1]{\widetilde{#1}}
\newcommand{\coker}{\mathrm{ Coker}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\eps}{\varepsilon}
\newcommand{\ext}{\mathrm{ Ext}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\gal}{\mathrm{ Gal}}
\newcommand{\g}[1]{{\mathfrak{#1}}}
\newcommand{\im}{\mathrm{ Im}}
\newcommand{\inj}{\hookrightarrow}
\newcommand{\mmod}{\ \text{mod}^*\ }
\newcommand{\n}{\text{\bf N}}
\newcommand{\ord}{\mathrm{ ord}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\sur}{\twoheadrightarrow}
\newcommand{\tr}{\mathbf{tr}}
\newcommand{\wh}[1]{\hat{#1}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Endo}{\mathrm{ End}}
\newcommand{\Hom}{\mathrm{ Hom}}
\renewcommand{\O}{\mathbf{O}}

\newcommand{\SO}{\mathrm{SO}}
\newcommand{\GL}{\mathrm{GL}}
\newcommand{\PGL}{\mathbf{PGL}}
\newcommand{\SL}{\mathbf{SL}}
\newcommand{\cl}{\mathbf{C}}
\newcommand{\SP}{\mathbf{Spin}}
\newcommand{\PI}{\mathbf{Pin}}
\newcommand{\Aut}{\mathbf{Aut}}
\newcommand{\disc}{\mathrm{disc}}
\newcommand{\mL}{\mathcal{L}}
\newtheorem{thm}{Theorem}[chapter]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{coro}[thm]{Corollary}
\newtheorem{propo}[thm]{Proposition}
\newtheorem{defi}[thm]{Definition}
\newtheorem{ex}[thm]{Example}
\newtheorem{rem}[thm]{Remark}


\begin{document}

\pagenumbering{roman} \thispagestyle{empty} \vspace*{1.5cm}
\centerline{Dissertation Title} \vspace{4.5cm}
\centerline{A Dissertation} \vspace{.3cm} \centerline{Submitted to
the Graduate Faculty of the} \centerline{University of Blank}
\centerline{in partial fulfillment of the}
\centerline{requirements for the degree of} \centerline{Doctor of
Philosophy} \vspace{.3cm} \centerline{in} \vspace{.3cm}
\centerline{The Department of blank} \vspace{5cm}
\centerline{by} \centerline{Name} \centerline{B.S. in
Math.,Blank University, 20XX} \centerline{M.S., University of Blank, 20XX}
\centerline{GraduationMonth 20XX}




\chapter*{Acknowledgements}

\doublesize

This dissertation would not be possible without several contributions.

\normalsize
\tableofcontents

\pagenumbering{arabic}

\chapter{Abstract}
\input{Abstract}

\normalsize

\chapter{Introduction}
\input{Introduction}

\chapter{Modeling Mutation Rate}
\input{MutatorWriteup}
\chapter{Estimating Mutation Rate}
\input{MutatorRatio}
\chapter{Experimental Procedures}
\input{ExperimentalWriteup}
\chapter{Microarray Comparison and Classification}
\input{MicroarrayWriteUp}
\chapter{The Effect of Killer Virus on Competition in S. cerevisiae}
\input{BacteriaYeastWriteUp}
\chapter{References}

\bibliography{thesis}

\bibliographystyle{plain}

\end{document}

User avatar
toastermm
Posts: 8
Joined: Wed Feb 02, 2011 5:37 pm

Table of Contents Headings

Post by toastermm »

After about a week of fighting the formatting, I came surprisingly close to what I wanted. I used the following to exclude the page numbering and heading numbering on sections like the abstract:

Code: Select all

\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\input{Abstract}
and to make the other old chapters part of a previous one:

Code: Select all

\chapter{Chapter 1 Heading}
\section*{Un-numbered Subsection of chapter 1}
\addcontentsline{toc}{section}{Un-numbered Subsection of chapter 1}
\input{Subsection of chapter 1 .tex file here}
Right now, I can't afford time to fiddle more with latex. The above will work for now. (I'll mark this thread as 'pseudo-solved').

Also as a side question to anyone else reading this: Why are some functions available in some formats and not in others? for example, why isn't the '\tableofcontents' command available in the document class article? Is there a way to change that?

Until my next frustration...
Post Reply