Skip to main content
added 152 characters in body
Source Link
cabohah
  • 24.3k
  • 3
  • 13
  • 32
\documentclass[fontsize=9pt,toc=flat,toc=chapterentrywithdots,numbers=noenddot,DIV=10]{scrbook} \usepackage[svgnames]{xcolor} \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus}% Just a guess, because the font looks similar to the one of the screenshot. \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change fonts of ToC entries \DeclareTOCStyleEntry[entryformat=\textbf]{default}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf]{default}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{default}{part} % Remove page number from ToC entry \DeclareTOCStyleEntry[pagenumberbox=\csname @gobble\endcsname]{default}{part} \addtokomafont{chapter}{\color{DarkCyan}} % \addtokomafont{sectioning}{\boldmath}% optional % Change the formatting of the chapter hadings \RedeclareSectionCommand[beforeskip=0pt]{chapter} \makeatletter \renewcommand*{\chapterlinesformat}[3]{% \@hangfrom{#2}{#3}\par\nobreak \rule{\linewidth}{1pt}% } \makeatother \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 
\documentclass[9pt,a4paper]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus}% Just a guess, because the font looks similar to the one of the screenshot. \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries (and add dots to the chapter entries) \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf,linefill=\TOCLineLeaderFill]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 
\documentclass[fontsize=9pt,toc=flat,toc=chapterentrywithdots,numbers=noenddot,DIV=10]{scrbook} \usepackage[svgnames]{xcolor} \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus} \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change fonts of ToC entries \DeclareTOCStyleEntry[entryformat=\textbf]{default}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf]{default}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{default}{part} % Remove page number from ToC entry \DeclareTOCStyleEntry[pagenumberbox=\csname @gobble\endcsname]{default}{part} \addtokomafont{chapter}{\color{DarkCyan}} % \addtokomafont{sectioning}{\boldmath}% optional % Change the formatting of the chapter hadings \RedeclareSectionCommand[beforeskip=0pt]{chapter} \makeatletter \renewcommand*{\chapterlinesformat}[3]{% \@hangfrom{#2}{#3}\par\nobreak \rule{\linewidth}{1pt}% } \makeatother \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 
\documentclass[9pt,a4paper]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus} \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries (and add dots to the chapter entries) \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf,linefill=\TOCLineLeaderFill]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 
\documentclass[fontsize=9pt,toc=flat,toc=chapterentrywithdots,numbers=noenddot,DIV=10]{scrbook} \usepackage[svgnames]{xcolor} \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus}% Just a guess, because the font looks similar to the one of the screenshot. \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change fonts of ToC entries \DeclareTOCStyleEntry[entryformat=\textbf]{default}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf]{default}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{default}{part} % Remove page number from ToC entry \DeclareTOCStyleEntry[pagenumberbox=\csname @gobble\endcsname]{default}{part} \addtokomafont{chapter}{\color{DarkCyan}} % \addtokomafont{sectioning}{\boldmath}% optional % Change the formatting of the chapter hadings \RedeclareSectionCommand[beforeskip=0pt]{chapter} \makeatletter \renewcommand*{\chapterlinesformat}[3]{% \@hangfrom{#2}{#3}\par\nobreak \rule{\linewidth}{1pt}% } \makeatother \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 
\documentclass[9pt,a4paper]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus}% Just a guess, because the font looks similar to the one of the screenshot. \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries (and add dots to the chapter entries) \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf,linefill=\TOCLineLeaderFill]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 
added 51 characters in body
Source Link
cabohah
  • 24.3k
  • 3
  • 13
  • 32
\documentclass[9pt]\documentclass[9pt,a4paper]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus} \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries (and add dots to the chapter entries) \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf]\DeclareTOCStyleEntry[entryformat=\large\textbf,linefill=\TOCLineLeaderFill]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 

flat TOC entries using extbookflat TOC entries using extbook

\documentclass[9pt]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus} \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 

flat TOC entries using extbook

\documentclass[9pt,a4paper]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus} \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries (and add dots to the chapter entries) \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf,linefill=\TOCLineLeaderFill]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 

flat TOC entries using extbook

extbook example added
Source Link
cabohah
  • 24.3k
  • 3
  • 13
  • 32

Note: If you insist in staying with class extbook instead of switching to scrbook you still can use \DeclareTOCEntryStyle if you add package scrextend. But in this case, you would need to use \DeclareTOCEntryStyle also to change the indent and numwidth to configure the flat style manually. However in this case you'd still have an issue with part entries, because these are not using \numberline. See my answer to Issue with aligning part numbers and titles in ToC using tocloft for more information about the needed configuration with book or extbook and how to patch \@part to solve the \numberline problem. So with extbook you would need something like:

\documentclass[9pt]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus} \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 

to change the ToC entries.

flat TOC entries using extbook

An additional package like titlesec would be needed to change the chapter headings (but this would IMHO be another question). So it is usually much easier to use a configurable class like scrbook.

Note: I've not changed the page header, because this would be a completely different question. If you need such changes too, please have a look into the scrlayer-scrpage chapters in the KOMA-Script documentation and the Wiki or ask a new question.

Note: extbook is derived from a very old version of standard class book. No one of the changes in book from the last 25 years have been inherited to extbook.

Note: If you insist in staying with class extbook instead of switching to scrbook you still can use \DeclareTOCEntryStyle if you add package scrextend. But in this case, you would need to use \DeclareTOCEntryStyle also to change the indent and numwidth to configure the flat style manually. However in this case you'd still have an issue with part entries, because these are not using \numberline. See my answer to Issue with aligning part numbers and titles in ToC using tocloft for more information about the needed configuration with book or extbook and how to patch \@part to solve the \numberline problem.

Note: I've not changed the page header, because this would be a completely different question. If you need such changes too, please have a look into the scrlayer-scrpage chapters in the KOMA-Script documentation and the Wiki or ask a new question.

Note: If you insist in staying with class extbook instead of switching to scrbook you still can use \DeclareTOCEntryStyle if you add package scrextend. But in this case, you would need to use \DeclareTOCEntryStyle also to change the indent and numwidth to configure the flat style manually. However in this case you'd still have an issue with part entries, because these are not using \numberline. See my answer to Issue with aligning part numbers and titles in ToC using tocloft for more information about the needed configuration with book or extbook and how to patch \@part to solve the \numberline problem. So with extbook you would need something like:

\documentclass[9pt]{extbook} \usepackage[svgnames]{xcolor} \usepackage[ngerman]{babel} \usepackage{mwe} \usepackage{iftex} \usepackage{libertinus} \usepackage{amsfonts} \usepackage{unicode-math}% I recommend LuaLaTeX! \usepackage{tocbasic} \renewcommand\familydefault{\sfdefault}% Use sf as default (just a guess because all entries in the screenshot seems to be sf) % Change indent of entries \DeclareTOCStyleEntries[indent=0pt,numwidth=25pt]{tocline}{part,chapter,section,subsection} % Change fonts of ToC entries \DeclareTOCStyleEntry[entryformat=\textbf]{tocline}{section} \DeclareTOCStyleEntry[entryformat=\large\textbf]{tocline}{chapter} \DeclareTOCStyleEntry[entryformat=\Large\textbf]{tocline}{part} % Make it work also for part entries \usepackage{xpatch} \makeatletter \xpatchcmd{\@part}{% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% }{% \addcontentsline{toc}{part}{\numberline{\thepart}#1}% }{\typeout{\string\@part\space patch successfull}}{\PaTchFailue} \DeclareTOCStyleEntry[pagenumberbox=\@gobble]{tocline}{part} \makeatother \usepackage[colorlinks, linkcolor=DarkBlue]{hyperref}% Load it as late a possible! \begin{document} \frontmatter \tableofcontents \mainmatter \part{Grundlagen: Matrizen und lineare Gleichungssysteme} \chapter{Matrizen} \section{Matrizen (Grundlagen)} \subsection{Reelle Matrizen} \subsection{Matrizen auf beliebigen Körpern} \subsection{Die Menge $\mathbb{K}^{m × n}$} \section{Operationen auf Matrizen} \subsection{Addition und Substraktion von Matrizen} \chapter{Lineare Gleichungssysteme} \end{document} 

to change the ToC entries.

flat TOC entries using extbook

An additional package like titlesec would be needed to change the chapter headings (but this would IMHO be another question). So it is usually much easier to use a configurable class like scrbook.

Note: I've not changed the page header, because this would be a completely different question. If you need such changes too, please have a look into the scrlayer-scrpage chapters in the KOMA-Script documentation and the Wiki or ask a new question.

Note: extbook is derived from a very old version of standard class book. No one of the changes in book from the last 25 years have been inherited to extbook.

added 206 characters in body
Source Link
cabohah
  • 24.3k
  • 3
  • 13
  • 32
Loading
added 516 characters in body
Source Link
cabohah
  • 24.3k
  • 3
  • 13
  • 32
Loading
Source Link
cabohah
  • 24.3k
  • 3
  • 13
  • 32
Loading