I use mwrep class in my document and try to customize section titles with titlesec. It works OK for sections and subsections but it has no effect for chapters.

Here I read that "The mwrep class uses a non-standard manner to format their sectioning commands".

Would be still possible to use titlesec to style the chapter? Or should I forget about it and find another solution?








  • Welcome to TeX.SX! Just don't use the mwrep class, if it doesn't suit you. – egreg Jul 4 '15 at 18:09
  • @egreg It is a report class adjusted according to Polish typographic standards so it does suit me a lot! I just have this one problem. – petru Jul 4 '15 at 18:19
  • Sorry, but titlesec is not compatible with the class. There is some documentation of the class in the file mwcls.dtx that you should have in your system, but it is written in Polish. You perhaps can understand it and guess what to modify. – egreg Jul 4 '15 at 19:22

for the chapter use


For section and subsection there are also macros so that you do not need the titlesec package

  • Thanks, I've found that bypass as well. But it seems to have some limitation, e.g. I cannot use \MakeUppercase with that macro. Perhaps it has other limitation compared to titlesec. – petru Jul 4 '15 at 19:54

So, I finally read the documentation for mwrep (mwcls, actually) and found out that SetSectionFormatting is more flexible than I thought.

By having access to \HeadingNumber and \HeadingText you can write for example


to get framed chapter number hanging on the margin enter image description here



to get the chapter title capitalized with increased letterspacing (textls from microtype package) and horizontal rule below.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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