TeX - LaTeX Asked on April 8, 2021
I want to indent some sections in the TOC but leave the fact that they’re unnumbered and not indented in the body unchanged. Example follows.
In the example below I would want “Test” in the TOC to be aligned with “1.1 Section Foo” so that the “T” is right under the “S”, while leaving the formatting of the body unchanged and still no numbering of “Test” in the TOC.
documentclass{book}
usepackage{bookman}
usepackage{tocstyle}
usetocstyle{standard}
renewcommand{numberline}[1]{#1~}
setcounter{tocdepth}{1}
newenvironment{test}[1]{%
subsection*{#1}}
begin{document}
tableofcontents
chapter{Chapter Foo}
section{Section Foo}
subsection{Subsection Foo}
begin{test}{Test}
addcontentsline{toc}{section}{Test}
subsubsection*{Subsection Foo Star}
end{test}
end{document}
I figured it out. Here are the changes to make to my original example:
Answered by E2R0NS on April 8, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP