0

In the ToC of a long document, I exclude chapter numbers in the text and ToC with a modification to the bringhust style as well as:

\setsecnumdepth{section}

and

\renewcommand{\chapternumberline}[1]{}% no number for chapters in toc

In the latter part of the document, however, I'd like section numbers to appear in the text and the ToC... but WITHOUT the chapter numbers prefixed in either text or ToC. Can this be done? How?

In a feeble attempt to achieve that, I thought of this: reset the section counter with each feast date, then use the first optional argument of the \section for the date listed with the saint’s name and the the saint's name for the rest.

E.g.:

\chapter{January}
\setcounter{section}{16}
\section[— St. Antony the Great][]{St. Antony the Great}

This way, I can use the code from memman.pdf 9.2 ToC methods, to set the section numbers flushright.

But those pesky chapter numbers are prefixed!!

Here's my MWE.

\documentclass[11pt]{memoir}
\settypeblocksize{9in}{6in}{*} 
\setlrmargins{*}{*}{1}
\setulmargins{.75in}{*}{1}
\checkandfixthelayout

%\tolerance=600
\hfuzz=1.2pt

\usepackage{lipsum}

\chapterstyle{bringhurst}
\renewcommand*{\afterchaptertitle}{%
  \vskip\onelineskip}
  \renewcommand*{\clearforchapter}{\cleartorecto}

\renewcommand*{\printchaptertitle}[1]{%
    \centering\Large\scshape{#1}}

\setsecnumdepth{section}
\renewcommand{\chapternumberline}[1]{}% no number for chapters in toc

\setsecheadstyle{\centering\Large}

%%  from memman.pdf 9.2 ToC methods
% To set the section numbers flushright:
       \newlength\mylen
       \setlength{\mylen}{0.5em}% extra space at end of number
       \renewcommand{\cftsectionpresnum}{\hfill} % note the double ‘l’
       \renewcommand{\cftsectionaftersnum}{\hspace*{\mylen}}
       \addtolength{\cftsectionnumwidth}{\mylen}
       \renewcommand{\cftchapterpresnum}{\hfill} % note the double ‘l’
       \renewcommand{\cftchapteraftersnum}{\hspace*{\mylen}}
       \addtolength{\cftchapternumwidth}{\mylen}

\pagestyle{plain}

\raggedbottom
\frenchspacing


\begin{document}
\frontmatter
\tableofcontents*
\mainmatter
\chapter{January}
\setcounter{section}{4}
\section[— St. Paul the First Hermit, C][]{St. Paul the First Hermit, C}
\lipsum[10]
\setcounter{section}{14}
\section[— Our Lady of the Seeds][]{Our Lady of the Seeds}
\lipsum[14]
\setcounter{section}{15}
\section[— Memorial of the Chains of St. Peter the Apostle][]{Memorial of the Chains of St. Peter the Apostle}
\lipsum[15]
\setcounter{section}{16}
\section[— St. Antony the Great, C][]{St. Antony the Great, C}
\lipsum[16]
\setcounter{section}{22}
\section[— Pope St.Sergius I, C][]{Pope St.Sergius I, C}
\lipsum[17]
\setcounter{section}{23}
\section[— St. Francis de Sales, C][]{St. Francis de Sales, C}
\lipsum[18]

\end{document}
1
  • Not sure if I understand correctly. Something like \renewcommand{\thesection}{\arabic{section}} does what you want? Oct 11, 2023 at 0:00

1 Answer 1

2

You can adjust the representation of the section counter for the latter part of your document in the following way:

\renewcommand{\thesection}{\arabic{section}}

The default is to prefix it with \thechapter. Additionally, automate the process of adding the emdash to your ToC, since duplicating titles just for the sake of adding an emdash will lead to mistakes.

enter image description here

\documentclass[11pt]{memoir}
\settypeblocksize{9in}{6in}{*} 
\setlrmargins{*}{*}{1}
\setulmargins{.75in}{*}{1}
\checkandfixthelayout

\usepackage{lipsum}

\chapterstyle{bringhurst}
\renewcommand*{\afterchaptertitle}{%
  \vskip\onelineskip}
  \renewcommand*{\clearforchapter}{\cleartorecto}

\renewcommand*{\printchaptertitle}[1]{%
    \centering\Large\scshape{#1}}

\setsecnumdepth{section}
\renewcommand{\chapternumberline}[1]{}% no number for chapters in toc

\setsecheadstyle{\centering\Large}

%%  from memman.pdf 9.2 ToC methods
% To set the section numbers flushright:
\renewcommand{\cftsectionpresnum}{\hfill} % note the double ‘l’
\renewcommand{\cftsectionaftersnum}{~---~}
\addtolength{\cftsectionnumwidth}{1.5em}

\pagestyle{plain}

\begin{document}

\frontmatter

\tableofcontents*

\mainmatter

\chapter{January}

\setcounter{section}{4}
\section{St.~Paul the First Hermit, C}
\lipsum[10]
\setcounter{section}{14}
\section{Our Lady of the Seeds}
\lipsum[14]
\setcounter{section}{15}
\section{Memorial of the Chains of St. Peter the Apostle}
\lipsum[15]
\setcounter{section}{16}
\section{St. Antony the Great, C}
\lipsum[16]
\setcounter{section}{22}
\section{Pope St.~Sergius I, C}
\lipsum[17]
\setcounter{section}{23}
\section{St. Francis de Sales, C}
\lipsum[18]

\chapter{February}

\renewcommand{\thesection}{\arabic{section}}%
\setcounter{section}{4}
\section{St.~Paul the First Hermit, C}
\lipsum[10]
\setcounter{section}{14}
\section{Our Lady of the Seeds}
\lipsum[14]
\setcounter{section}{15}
\section{Memorial of the Chains of St. Peter the Apostle}
\lipsum[15]
\setcounter{section}{16}
\section{St. Antony the Great, C}
\lipsum[16]
\setcounter{section}{22}
\section{Pope St.~Sergius I, C}
\lipsum[17]
\setcounter{section}{23}
\section{St. Francis de Sales, C}
\lipsum[18]

\end{document}

You must log in to answer this question.

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