[Tex/LaTex] How to align chapter, section, subsection with parindent
horizontal alignmentsectioning
Is there a way to solve that?
Thanks a lot!
Best Answer
Yes, it's possible; the section number is typeset by the macro \@seccntformat and it's just a matter of giving it a suitable redefinition: typeset the number in a fixed width box.
When minitoc is loaded (which I don't recommend, I find it distracting and not really useful), a bizarre thing happens: the package unfortunately redefines a key macro without using \@seccntformat, which is utterly wrong. You can patch it, though, restoring the correct behavior.
Now the headings are right aligned. I defined a macro \justifyheading. If you later wish to left-justify or to center, simply define \justifyheading to be \raggedleft respctively \centering.
You need to use a \labelafter, not before, the sectioning, caption or other command you want to reference. You need to use \label and \ref, or similar commands, to access sections by label (name).
The hyperref package can create bookmark entries for the PDF without \label's which also allow you to jump to chapters, sections, etc. but it will not allow you to reference this sections from other places in the text.
Best Answer
Yes, it's possible; the section number is typeset by the macro
\@seccntformat
and it's just a matter of giving it a suitable redefinition: typeset the number in a fixed width box.When
minitoc
is loaded (which I don't recommend, I find it distracting and not really useful), a bizarre thing happens: the package unfortunately redefines a key macro without using\@seccntformat
, which is utterly wrong. You can patch it, though, restoring the correct behavior.