I am having difficulty combining all the attributes for this kind of Table of Contents in my amsart
document. I hope if someone can show me the complete template, it will be useful for many people. Every time I search and find one of the attributes, it does not work with the rest of the attributes. Hope someone can help.
The whole row for sections should be bold, including the section number and section page number.
Specifications:
-
No line of dots before section page numbers.
-
Line of dots before subsections and subsubsection numbers.
-
Indented subsections aligned with section name, as below.
-
Adjustable
\vspace
between a subsection and the major section that follows. If it is a subsubsection followed by the major section, there should be adjustable\vspace
for that. -
No
\vspace
between subsections in a given section. No\vspace
between subsubsections -
Adjustable
\hspace
between section number and title of section. -
Adjustable
\hspace
between subsection number and title of subsection, etc. -
Adjustable font size and font for "Contents".
-
Bold section names and pages, regular text for subsections.
-
(Optional) Choose where the ToC page breaks when continuing to next page.
-
(Optional) Move the ToC up from its default lower position.
Contents (Larger adjustable size and font)
1 No dot after section number, bold name, then white space, bold page number
1.1 Subsection not bold . . . . . . . . . . . . . . . . . . . . 1
1.2 Subsection . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Subsubsection . . . . . . . . . . . . . . . . . . . 7
1.2.2 Subsubsection . . . . . . . . . . . . . . . . . . . 9
2 No dot after number, bold name, then white space, bold page number
2.1 Subsection not bold . . . . . . . . . . . . . . . . . . . . 11
2.2 Subsection . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.1 Subsubsection . . . . . . . . . . . . . . . . . . 17
2.2.2 Subsubsection . . . . . . . . . . . . . . . . . . 19
Appendix A --also bold with bold page number to the right -->
A.1 First Section of Appendix A . . . . . . . . . . . . . . . . 21
A.2 Second Section of Appendix A . . . . . . . . . . . . . . . 23
A.2.1 Subsection of second section of Appendix A . . . . . 27
A.2.2 another Subsection . . . . . . . . . . . . . . . . 29
Appendix B --also bold with bold page number to the right -->
B.1 First Section of Appendix B . . . . . . . . . . . . . . . . 31
B.2 Second Section of Appendix B . . . . . . . . . . . . . . . 33
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The following is a minimal tex shell, added at the request of the commenter
\documentclass[onecolumn,10.5pt,reqno,a4paper]{amsart}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage[margin=1.55in]{geometry}
\usepackage{geometry}
\usepackage{graphicx}
\title{Title with adjustable size, font}
\author{Name with adjustable size, font}
\begin{document}
\pagenumbering{roman}
\maketitle
\tableofcontents
\clearpage
\pagenumbering{arabic}
\setcounter{page}{1}
\pagestyle{myheadings}
\section{section 1, No point after section #, followed by name, whitespace, bold page} Text
\subsection{subsection 1.1 (not subsection 1.1.), followed by dots, regular page #} Text
\subsection{subsection 1.2 (not subsection 1.2.), followed by dots, regular page #} Text
\subsubsection{subsubsection} Text
\section{section 2, No point after section #, followed by name, whitespace, bold page} Text
\subsection{subsection 2.1 (not subsection 1.1.), followed by dots, regular page #} Text
\subsubsection{subsubsection} Text
\subsection{subsection 2.2 (not subsection 1.2.), followed by dots, regular page #} Text
\section{section 3} Text
\appendix
\section{first section of appendix} Text
\subsection{subsection} Text
\subsubsection{subsubsection} Text
\subsection{subsection} Text
\section{second section of appendix} Text
\thebibliography{99}
\end{document}
Best Answer
The
amsart
document class has a very strict way in which it sets things up, specifically because it is meant for publication submissions. As such, there's not much in terms of user-interface variation available. This is a good thing. However, it requires a complete revamp of the ToC-generation and interaction in order for it to be flexible.Here is something that seems to satisfy all your requirements without using any additional packages (except
etoolbox
):Specific to the requirements:
This is the default setting under
amsart
, so there's nothing to be done in this regard.Only the
\subsection
and\subsubsection
ToC entries have been adjusted to include a dotted line. This was taken fromlatex.ltx
's\@dottedtocline
that uses leaders.Adjustments to the spacing between the dots can be achieved using (for example)
The default values for both are
4.5
.The indentation can be set for each of the section levels
\section
,\subsection
and\subsubsection
, in addition to the width of the numbers in the ToC. The following self-explanatory macros set the defaults:The subsection and subsubsection indents are set relative to the sections and subsections, making them line up within the ToC as required.
The default
\@tocline
macro ofamsart
provides a vertical skip before every sectional unit. This has been customized and can be set with a number of user-interface macros. The defaults are:This leaves a gap of at least 10pt above a
\section
heading, but no gap (0pt) above a subsection or subsubsection.See (4) above.
This can be adjusted using the number widths as refined in (3) above.
See (6).
\contentsnamefont
holds the formatting of the ToC heading. A simple\renewcommand
suffices to changes this. For example,Each sectional heading in the ToC can be formatted at the "number+title" and "page number" level via the following self-explanatory macros:
(Optional) Insert
\tocpagebreak
within your document at the appropriate place between sectional units where you want the equivalent location to be broken in the ToC.(Optional)
\tableofcontents
can be adjusted to insert a negative\vspace
where appropriate.This adaptation is not compatible with
hyperref
, unfortunately. If that is required, one may be better off by recreating the ToC and sectional unit layout using packages that support this in a more consistent/uniform way, and using a different class likearticle
.