I am wondering how I could change the numbering of some of my sections (not all!) in toc. More precisely, I would like to add a \bullet or something like that to the superscript of their numbers (eg I.10$^\bullet$ <title> instead of I.10 <title>) to let the students know that these sections are not so important, they do not have to read them.
Asked
Active
Viewed 66 times
4
-
1Welcome. You don't need to sign your post. Your name appears automatically. – Sigur Oct 22 '14 at 22:24
-
You do specify which section is important? It's not to be done automatically, I suppose? – Oct 22 '14 at 22:36
-
Is this a duplicate of How to put a star (or other symbol) in sections that are “special” (difficult, optional, etc)?? – Peter Grill Oct 23 '14 at 07:15
1 Answers
2
A quick trial solution, by definition of a \notthatimportantsection command which will add a \unimportantindicator to the toc, currently defined as \bullet
\documentclass{article}
\usepackage{etoolbox}%
\let\LaTeXStandardSection\section
\newcommand{\unimportantindicator}{\ensuremath{^{\bullet}}}
\makeatletter
\newcommand{\notthatimportantsection@@noopt}[1]{%
\notthatimportantsection@@opt[#1]{#1}%
}%
\newcommand{\notthatimportantsection@@opt}[2][]{%
\let\oldthesection\thesection%
\begingroup%
\renewcommand{\addcontentsline}[3]{}%
\LaTeXStandardSection[]{#2}%
\endgroup%
\begingroup%
\renewcommand{\thesection}{\oldthesection\unimportantindicator}%
\addcontentsline{toc}{section}{\numberline{\thesection~#1}}%
\endgroup%
}%
\newcommand{\notthatimportantsection}{%
\@ifnextchar[{\notthatimportantsection@@opt}{\notthatimportantsection@@noopt}
}%
\makeatother
\usepackage{blindtext}
\begin{document}
\tableofcontents
\section{Important}
\blindtext
\notthatimportantsection[Unimportant]{This is not really important}
\notthatimportantsection{Also not important}
\section{Important again}
\end{document}

-
May be
\rlap{$^{\bullet}$}and then using the default spacing rather than\thesection~#1(that~is not perfect there). – Manuel Oct 22 '14 at 22:57 -
You should take a look at the
titlesec/titletocdocumentation, § 4.3 and 6.7. An environment and a marker foradvanced sectionsis defined, and how to enter them in the table of contents with their marker. – Bernard Oct 22 '14 at 23:10 -
@Bernard: I will look later on... and think about a better solution, as I am not satisfied with this completely. – Oct 23 '14 at 00:04