0

I have been using tocstyle up until now like this:

% table of content styling
\usepackage[tocindentauto]{tocstyle}
\usetocstyle{KOMAlike}
\settocstylefeature{pagenumberbox}{\hbox}

I understand that the recent version of KOMA-script remove the tocstyle package. But can't find what I should use as a replacement... Any help would be highly appreciated!

Thank you very much in advance!

edit: As per question of the bot: currently I get the error: ! LaTeX Error: File 'tocstyle.sty' not found. But I can't find anything showing me how to replace the tocsytle package to get the same layout that I currently have.

This is what it currently looks like: table of contents

2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Jan 18, 2022 at 10:56
  • Can you please add a minimal working example producing the output in the picture?
    – esdd
    Jan 18, 2022 at 12:44

1 Answer 1

1

Unfortunaly there is no MWE in the question, so I do not know which class is used etc. Additionally, I do not know how the desired result looks like. So the following example is only a guess:

\documentclass{book}

\usepackage{tocbasic}
\DeclareTOCStyleEntry[%
  entryformat=\bfseries\textsf,
  pagenumberformat=\bfseries\textsf,
]{tocline}{chapter}
\DeclareTOCStyleEntries[
  pagenumberbox=\hbox,
  dynnumwidth
]{tocline}{%
  chapter,section,subsection,subsubsection,paragraph,subparagraph,%
  figure,table
}
\DeclareTOCStyleEntries[
  dynindent
]{tocline}{subsection,subsubsection,subparagraph}

\begin{document}
\frontmatter
\tableofcontents
\chapter{Abstract}
\mainmatter
\chapter{Interesting chapter}
\section{A section}
\subsection{A subsection}

\cleardoublepage\setcounter{page}{1001}% only for large page number in the example

\chapter{Boring chapter}
\section{Boring section}
\end{document}

enter image description here

1
  • For me simply removing the calls I mention in the question was ok for now, the ToC looks close enough for me. Unfortunatelly I don't have much time for investigation now... Thank you very much for your answer though!
    – Foaly
    Feb 5, 2022 at 17:48

You must log in to answer this question.

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