One way to do this is to create an environment that changes the format of the section number. Then a bit of tocloft
magic will make the TOC entries look nice.
\documentclass{book}
\usepackage{tocloft}
\usepackage{lipsum} % for dummy text
\newenvironment{hard}
{\renewcommand{\thesection}{*\thechapter.\arabic{section}}}
{}
% set section numbers in TOC flush right (from the tocloft documentation)
\newlength{\extralen}
\setlength{\extralen}{0.5em} % need some extra space at end of number
\renewcommand{\cftsecpresnum}{\hfill} % note the double ālā
\renewcommand{\cftsecaftersnum}{\hspace*{\extralen}}
\addtolength{\cftsecnumwidth}{\extralen}
\begin{document}
\tableofcontents
\chapter{A chapter}
\section{A regular section}\label{easylabel}
In Section~\ref{easylabel} we see\ldots
\lipsum
\begin{hard}
\section{A hard section}\label{hardlabel}
\lipsum
\end{hard}
In Section~\ref{hardlabel} we see\ldots
\end{document}
Note that this solution will also make the section number in references have an *, and subsections within a hard section will also bear an *. (For subsections you'll also need to add the appropriate tocloft
code to make their numbers flush right as well.) If you don't want that, then things get a bit more compicated.
You can use the addtotoc
option for the \includepdf
command; this option has the syntax
addtotoc={<page number>,<section>,<level>,<heading>,<label>}
where <page number>
is the page number of the inserted document that will be linked to from the ToC, <section>
is the LaTeX sectioning name (e.g., section, subsection,...), <level>
denotes depth of section (e.g., 1 for section level, 2 for
subsection level,...), <heading>
is the title inserted in the table of contents, and <label>
is the name of the label which can be referred to with \ref
and
\pageref
.
With your current approach you can use \numberline
to add the number of the corresponding sectional unit to the ToC; for example, you can say something like:
\phantomsection\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}SI-System}
Here's an example or the use of addtotoc option (kindly provided by Marco Daniel):
\RequirePackage{filecontents}
\begin{filecontents}{\jobname-a5.tex}
\documentclass[english,paper=a5]{scrartcl}
\usepackage{geometry}
\usepackage{babel,blindtext}
\begin{document}
\Blinddocument
\end{document}
\end{filecontents}
\documentclass{scrartcl}
\immediate\write18{pdflatex \jobname-a5.tex}
\usepackage{pdfpages,lipsum}
\includepdfset{frame,noautoscale}
\setlength{\fboxrule}{5pt}
\begin{document}
\tableofcontents
\section{foo}
\lipsum[1]
\includepdf[pages=-,addtotoc={1,section,1,Eintrag im Inhaltsverzeichnis,mylabel}]{\jobname-a5}
\end{document}
save the file as, for example, test.tex
and run it using
pdflatex --shell-escape test
Best Answer
If the "subtitle" attributes are to be the same from those of the title, and you want the information to appear right after the title, you can use the optional argument of the sectional units:
As tohecz mentions in a comment this will also add this subtitle to the header marks.
Another sometimes used format is to write this "subtitle" right below the title for the sectional unit. The following code shows one way to achieve this; the idea is to define a new command
\sectionsubtitle
which writes the information to the ToC, immitating the way section entries are typeset, but suppressing the sectional and page numbering, and the leading dots; additionally, with this approach the subtitles won't be added to the head marks: