TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When looking for some inspiration for how to come up with a template for my thesis, I came across the wonderful classicthesis package. Since I'm working on some very progressive material, however, I was more looking for a modernthesis kind of style and am now composing that for my own taste.

One thing I really like about classicthesis is that the page numbers appear right after section titles in the table of contents. I would also like to have that for my documents, which use KOMA-Script throughout. How can I do that?

share|improve this question
up vote 5 down vote accepted

You could use the tocstyle package which is distributed as part of KOMA-Script.

EDIT: The nopagecolumn style uses \normalfont for the page numbers of all sectioning levels; by disabling this for level 1 (section), page numbers will resemble titles (\sffamily\bfseries).



% Disabling special font commands for sectioning level 1 (section)








enter image description here

share|improve this answer
This works almost perfectly, thanks! The only issue is that the page number style is strangely altered. Observe for example the 1 behind 1 - bla 1. It is now not bold and sans-serif anymore, but just like all others. Any way to work around this? Or is it maybe even better this way? – Ingo Jan 5 '12 at 17:50
@tehingo: Sure -- answer updated. – lockstep Jan 5 '12 at 18:07
Thanks a lot, hope this also inspires other people ;-). – Ingo Jan 5 '12 at 18:10
@tehingo You're welcome! With regard to your "is it maybe even better" question: I prefer the default behaviour (\normalfont for all page numbers), but there's no "right" or "wrong" here. – lockstep Jan 5 '12 at 18:14

For those who want to achieve page numbers right after titles using tocloft because this package is already used in their class, this works:

% now if you want to change color of page and font of page e.g. oldstyle
% in this case it requires the packages MinionPro, xcolor and the color definition ctcolormain

toc layout using tocloft and above code

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.