Sit page numbers next to chapter titles in table of contents for amsart

The page numbers in a table of contents often sit far to the right of the titles. Since we rarely look at a table of contents from top to bottom, and often from left to right, it might be better to have the numbers sit next to the title. What is a simple way to make this happen in the amsart class?

Sit page numbers next to chapter titles in table of contents for amsart

\documentclass{amsart} \usepackage{blindtext} \usepackage{enumitem} \title{} \begin{document} \maketitle \tableofcontents \begin{center} \textsc{Contents} \\[6pt] \begin{minipage}{7cm} \begin{enumerate}[label=\arabic*.] \item My childhood theorems, 1 \item Theorems from my adolescence, 2 \item Undergraduate theorems, 3  \item Graduate theorems and my thesis, 4 \end{enumerate} \end{minipage} \end{center} \section{My childhood theorems} \blindtext[5] \section{Theorems from my adolescence} \blindtext[5] \section{Undergraduate theorems} \blindtext[5] \section{Graduate theorems and my thesis} \blindtext[5] \end{document} 

I tried the following:

\begin{center} \begin{minipage}{8cm} \begingroup \def\hfil{,\relax} \tableofcontents \endgroup \end{minipage} \end{center} 

instead of \tableofcontents. Is this a bad idea?


Not a bad idea at all. Bringhurst says we don't have to add up the page numbers, so why should they be in a column far away from the title?

You can modify the working of \@tocline; for centering the table of contents, assuming it fits in one page, you can use varwidth.


  \ifnum #1>\[email protected] % then omit
    \par \addpenalty\@secpenalty\addvspace{#2}%
    \begingroup \hyphenpenalty\@M
      \@tempdima\csname [email protected]\number#1\endcsname\relax
    \parindent\[email protected] \leftskip#3\relax \advance\leftskip\@tempdima\relax
%    \rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth
    #5\leavevmode\hskip-\@tempdima #6\nobreak\relax
%    \hfil\hbox to\@pnumwidth{\@tocpagenum{#7}}\par
%    \nobreak



\section{My childhood theorems}
\section{Theorems from my adolescence} \blindtext[5]
\section{Undergraduate theorems} \blindtext[5]
\section{Graduate theorems and my thesis} \blindtext[5]

I added a subsection just to show its output.

Sit page numbers next to chapter titles in table of contents for amsart

Category: table of contents Time: 2016-07-29 Views: 0

Related post

  • Align first letters of chapter titles in Table of Contents 2015-06-10

    I am trying to create table of contents for starred version of chapter. My goal is to align all first letters of the titles to the same position. I was able to achieve that separately for single digit numbers and for double digit numbers, but I am no

  • Report document class with upper right page numbers and modifying chapter title format 2013-07-18

    I'm writing a lengthy masters thesis paper and am requiring some annoying editing of my TeX document. I need to have all of my main headers (table of contents, list of figures, list of tables, bibliography, and chapter headers) to be centered and at

  • How to add page numbers and rotated chapter title to the outer margin? 2015-11-27

    I'd like to have page numbers on the outer page border slightly bellow the center, and the current chapter title at the bottom but rotated 90 degrees counter-clockwise (i.e. to the left) such that it also sticks to the page outer border, i.e. +------

  • Include custom index chapter title in table of contents in ConTeXt 2013-09-21

    Problem The following code is used to prevent pagination from being applied to the index: \setuphead[chapter,section][ number=no, page=yes, continue=no, ] \definehead[StyleIndex][chapter] \setuphead[StyleIndex][ page=no, ] The index is typeset as fol

  • Chapter Title and Table of Contents 2014-12-04

    If I use code such as: \chapter{Introduction} \subfile{intro/Introduction} \chapter{Remaining Work} \subfile{remaining/Remaining} The result is: Chapter 1 Introduction Chapter 2 Remaining Work I'd like to remove the "Chapter 1" etc title, prefer

  • Keeping chapter titles in table of contents but deleting the chapters in the document 2015-08-25

    I am writing a book that I will publish in two separate volumes. In volume 1, I want the table of contents to show the full list of chapters for volume 1 and volume 2, however I do not want volume 2 chapters to be included in published version of vol

  • Giant number next to chapter title 2015-05-08

    I want to make chapter titles that look something like this: I'll be using a different font, but the idea is the same. If possible, I'd like it to work like this: Pick the size of the number (one should be able to make it arbitrarily large). The top

  • Remove blank pages after title and Table of contents 2012-08-09

    I'm using the book style, and I've got a title and ToC, they generate a lot of blank spaces after them that is completely unnecessary; how do I stop this behaviour? Here is my example code \documentclass[12pt]{book} \usepackage[width=4.375in, height=

  • Customization of chapter entries in Table of Contents 2013-12-07

    I want to customize chapter entries in Table of Contents. \documentclass[final]{book} \title{Title} \author{Author} \date{} \begin{document} \maketitle \tableofcontents \chapter*{Chapter Title} \addcontentsline{toc}{chapter}{Chapter Title} \end{docum

  • \lstlistoflistings title says "Table of Contents" 2014-08-04

    When I tried \lstlistoflistings to print the list of all my listing, the title says "Table of contents", and then it says chapter. Like if it was part of the TOC. I'm trying to get a list, like the one you get in algorithms or in figure list. I

  • Table of contents for only a section in iWork Pages? 2012-01-24

    I have a master table of contents that works like a charm, and each section is broken out appropriately with page breaks v sections. For each section, I would like to have another table of contents for only that section. Is that possible? I'm in Page

  • Single Spacing Long Chapter Header in Table of Contents, Long Figure Captions in List of Figures 2013-07-04

    I am finishing up my dissertation and have a small issue. The dissertation format asks for single spacing the chapter heading in table of contents if it is too long and can't fit in one line. The same goes for list of figures and captions. I followed

  • Table of Contents for all wiki pages? 2014-09-08

    I know that I'm supposed to search for data in a Wiki but I would like to structure the data in some kind of tree. Is this possible? Right now I just have pages that do not really belong to anything so to get there I need to search and when doing tha

  • Table of Contents for Each Page on SP2010 2015-05-22

    I am currently trying to make a Table of Contents for each site page for my team. I have tried the default SP table of contents web part but it doesn't work and gives me an error such as this: "Cannot save all of the property settings for this Web Pa

  • Is the user experience of a long, multi-page article improved by having a fixed table of contents? 2016-07-18

    Let's say you have a gigantic article (up to 30 pages) with lots of chapters and you want to display on your website and let's say you have created a page just for this particular article. Should you have a fixed Table of Contents on it's side? Does

  • How do I remove numbering from the chapter titles? 2013-04-26

    It seems I have a two day trying to find out the solution of my problem. I have just finished typing my M.Sc thesis using LATEX (MIKTEX 2.9). Unfortunately, all my chapters begin with the chapter number at the top left corner of a page. My supervisor

  • How can I add a page break after a chapter title? 2012-12-12

    I'd like to have a page that is mostly blank, but just shows the chapter number and the title, and maybe a small summary of the chapter, followed by white space... The actual sections will start on the following page. How can I accomplish this? Every

  • How to show a full page width image above chapter title, and different image for each chapter? 2015-04-26

    I'm trying to make the chapter header follow the style: - Chapter tittle is on its own page. - There is an image with full page width above the title, and different image for each chapter. - Optional: the image have caption, and can be link to list o

  • make footnote number appear next to chapter title 2016-07-18

    I would like a footnote number to appear right next to a chapter title (instead of below it) to cite a co-author of this particular chapter. \documentclass{report} \begin{document} \chapter{hello}\footnote{another author} \end{document} This puts the

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 2.225 (s). 13 q(s)