Skip to content

Coloring the margintoc #197

Discussion options

You must be logged in to vote

To answer my own question:

We can change the color in the margintoc by setting the colors right before \chapter and resetting them after it:

\hypersetup{linkcolor=orange}            % Set the color for the section number/name and page number in the margintoc
\addtokomafont{section}{\color{orange}}  % Set the color for the dots in the margin toc in the margintoc
\chapter{Chapter}
\hypersetup{linkcolor=green}             % Reset the linkcolor for the normal text
\addtokomafont{section}{\color{blue}}    % Reset the section color for the normal text

Instead of modifying every chapter-call, we can redefine \chapter.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fmarotta
Comment options

Answer selected by AlexanderZeilmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants