titlesec deprecated

Issue #92 closed
Former user created an issue
Titlesec is officially deprecated by koma-script:

Class scrreprt Warning: Usage of package `titlesec' together
(scrreprt) with a KOMA-Script class is not recommended.
(scrreprt) I'd suggest to use the package only
(scrreprt) if you really need it, because it breaks several
(scrreprt) KOMA-Script features, i.e., option `headings' and
(scrreprt) the extended optional argument of the section
(scrreprt) commands .

Should it be considered to switch to something else (rather than titlesec)?

Original issue reported on code.google.com by pierpaolotoniato on 2014-09-11 23:20:06

Official response

Comments (15)

  1. André Miede repo owner
    Many of the changes classicthesis needs cannot be achieved with "plain" KOMA means,
    but I am currently looking into this. However, I do not know about an alternative to
    titlesec (hints are highly appreciated!)
    

    Original issue reported on code.google.com by amiede on 2014-09-21 15:26:28 - Labels added: Type-Enhancement - Labels removed: Type-Defect

  2. Former user Account Deleted
    Hey,
    
    I do not really know what changes you need exaclty, as "many" is not very specific.
    But as far as I understand there is no need for titlesec. I've tried to re-create your
    classicthesis style without using titlesec. You might want to look into the following
    KOMA commands to replace the titlesec commands:
    
    \setkomafont{chapter}{for the chapter font}
    \setchapterpreamble[u]{for the title line underneath each chapter}
    \renewcommand*{\chapterformat}{for the chapter number}
    

    Original issue reported on code.google.com by assarf.misc on 2015-04-13 09:22:07

  3. André Miede repo owner
    To be more specific: classicthesis needs uppercase chapter titles, a custom-sized (gray)
    chapter number in the right margin, lowercase section titles in small caps and so on.
    Furthermore, the ToC has to be adapted as well.
    
    I did some experiments with the standard KOMA commands, but could not replicate all
    the needed features (this is not KOMA's goal, so it's understandable). Maybe a solution
    without KOMA/titlesec completely rewriting the chapter, section etc commands would
    be the way to go.
    

    Original issue reported on code.google.com by amiede on 2015-04-14 10:14:21

  4. André Miede repo owner
    • changed status to open

    Marking this for re-implementation/version 5.0, but probably hard/impossible to resolve.

  5. Jörn Hees

    any updates on this? currently this spams me with the following warnings:

    ./classicthesis.sty: Class scrreprt Warning: Usage of package `titlesec' together(scrreprt)              with a KOMA-Script class is not recommended.
    /usr/local/texlive/2015/texmf-dist/tex/latex/titlesec/titlesec.sty: Package titlesec Warning: Non standard sectioning command detected(titlesec)                Using default spacing and no format.
    /usr/local/texlive/2015/texmf-dist/tex/latex/titlesec/titlesec.sty: Package titlesec Warning: Non standard sectioning command detected(titlesec)                Using default spacing and no format.
    /usr/local/texlive/2015/texmf-dist/tex/latex/titlesec/titlesec.sty: Package titlesec Warning: Non standard sectioning command detected(titlesec)                Using default spacing and no format.
    /usr/local/texlive/2015/texmf-dist/tex/latex/titlesec/titlesec.sty: Package titlesec Warning: Non standard sectioning command detected(titlesec)                Using default spacing and no format.
    /usr/local/texlive/2015/texmf-dist/tex/latex/titlesec/titlesec.sty: Package titlesec Warning: Non standard sectioning command detected(titlesec)                Using default spacing and no format.
    ./classicthesis.sty:378: Package scrreprt Warning: Activating an ugly workaround for a missing(scrreprt)                feature of package `titlesec` on input line 378.
    

    if they are ok, can we somehow deactivate them?

  6. André Miede repo owner

    This is still a hot topic. So far I did not find a way to reproduce the look&feel of classicthesis using the KOMA-interfaces.

    Any hints, comments, or other help regarding a solution is highly appreciated :+1:

  7. Joerg Weber

    I've looked into this issue quite extensively last year when I finished my thesis for which I essentially rebuilt classicthesis from scratch to make some easier customisations. I've tried to avoid titlesec, but I agree with André that it is very, very difficult, if not impossible, to use the exact look and feel of classicthesis v4 without it.

    I think for v5 it may be easier to move away from KOMA (to standard report class) than from titlesec, because most of the formatting in classicthesis is done via titlesec, tocloft and other packages.

    For v4, I suggest to add the silence package to avoid the warnings. The following before documentclass should do the trick

    \RequirePackage{silence}
    \WarningFilter{scrreprt}{Usage of package `titlesec'}
    \WarningFilter{scrreprt}{Activating an ugly workaround}
    \WarningFilter{titlesec}{Non standard sectioning command detected}
    
  8. André Miede repo owner

    Many thanks to Jörg for his silencing solution in order to reduce the confusion of the users!

    As titlesec was recently updated, this is probably still a good direction for future development.

    Jörg, would you mind sharing your rebuilt w/o titlesec privately with me, please? I might learn a lot and might get additional ideas for v5 (to be released shortly after Half-Life 3 ;-).

  9. Joerg Weber

    André, my "rebuilt" still relies on titlesec. I can't remember exactly why I didn't manage without titlesec, but I think it was a combination of the look & feel of classicthesis and TOC adjustments.

    As I said before, I think it's easier to switch to the standard report class than it is to move away from titlesec. titlesec is actively maintained and developed, but it's probably unlikely that it will be reconciled with Koma.

  10. Florian Farke

    @André Miede @Ivo Pletikosić are you willing to accept a pull request to fix this issue? I’ve managed to remove the dependency on titlesec and tocloft and implemented the titles and table of contents using only koma script.

    Perhaps, the changes need some tweaking on your side as I only implemented the features I needed, i.e., I didn’t manage to reproduce the exact same spacing for part/chapter titles (this is only noticeable then comparing the output directly), I didn’t chanced the arsclassica style, and I didn't check whether all options of classicthesis still work as intend or not. That said, it shouldn't be to hard to implement the missing parts using my changes as starting point.

  11. Log in to comment