Add \chapter* to toc
This commit is contained in:
1 parent
ebbd7133d4
commit
df83e76a9c
5 files changed
+20
-4
No files matched your search
@@ -6,6 +6,19 @@
|
||||
\cleardoublepage% Start on a right page
|
||||
\includefrom{#1}{#2}% Include with relative paths \input in the chapter
|
||||
}
|
||||
|
||||
\NewCommandCopy{\oldchapter}{\chapter}
|
||||
\RenewDocumentCommand{\chapter}{s o m}{% #1 = star (no number), #2 = short title, #3 = title
|
||||
\IfBooleanTF{#1}{%
|
||||
\oldchapter*{#3}% Starred chapter
|
||||
\addcontentsline{toc}{chapter}{#3}% Add to the table of contents
|
||||
}{%
|
||||
\IfValueTF{#2}{%
|
||||
\oldchapter[#2]{#3}% Chapter with short title
|
||||
}{%
|
||||
\oldchapter{#3}% Regular chapter
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
||||
\newcommand{\noindentskip}{\bigskip\noindent} % Skip a line and remove the indent
|
||||
|
||||
Reference in new issue
Block a user