You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although standard classes use font dependent units (mainly em), it is recommended using absolute ones (pc, pt, etc.) to ensure they entries are aligned correctly.
But that's a bit of an understatement because it really doesn't work at all when font size is changed for some \titlecontents, e.g. when trying to replicate standard \part look.
What's particularly confusing is that, when \contentsmargin isn't used, but the standard \@pnumwidth and \@tocrmarg are used to tune the same things, em-s are just fine, even with titletoc.
From what I understand, this is because titletoc uses those by default, but redefines them to always be in pt-s (by going through tempskipa) during initialization:
It would be nice if font-dependent units still worked for \contentsmargin even when \titlecontents changes font size for a particular kind. It looks like currently \pnumwidth is used a few times, but there may be a font size command between, causing misalignment.
As a workaround, instead of changing font size in the <above-code> part of \titlecontents, duplicating it in <numbered-entry-format>, <numberless-entry-format> and <filler-page-format> (in the optional argument for \contentspage) avoids the problem. Although I didn't check if that maybe has some other unintended effects.
The text was updated successfully, but these errors were encountered:
The documentation for
\contentsmargin
does sayBut that's a bit of an understatement because it really doesn't work at all when font size is changed for some
\titlecontents
, e.g. when trying to replicate standard\part
look.What's particularly confusing is that, when
\contentsmargin
isn't used, but the standard\@pnumwidth
and\@tocrmarg
are used to tune the same things, em-s are just fine, even with titletoc.From what I understand, this is because titletoc uses those by default, but redefines them to always be in pt-s (by going through
tempskipa
) during initialization:titlesec/titletoc.sty
Lines 581 to 584 in e5b48d9
It would be nice if font-dependent units still worked for
\contentsmargin
even when\titlecontents
changes font size for a particular kind. It looks like currently\pnumwidth
is used a few times, but there may be a font size command between, causing misalignment.As a workaround, instead of changing font size in the
<above-code>
part of\titlecontents
, duplicating it in<numbered-entry-format>
,<numberless-entry-format>
and<filler-page-format>
(in the optional argument for\contentspage
) avoids the problem. Although I didn't check if that maybe has some other unintended effects.The text was updated successfully, but these errors were encountered: