Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with KOMA-Script classes #22

Closed
chsk-uk opened this issue Oct 8, 2019 · 2 comments
Closed

Incompatibility with KOMA-Script classes #22

chsk-uk opened this issue Oct 8, 2019 · 2 comments

Comments

@chsk-uk
Copy link

chsk-uk commented Oct 8, 2019

The latest release (2.12, CTAN: 2019-09-10), possibly the previous release (2.10, CTAN: 2019-07-17), cannot be loaded at all when using KOMA-Script's ,,scrartcl`` class (and, presumably, other KOMA-Script classs). Here is an MWE:

\documentclass{scrartcl}
\usepackage{titlesec}
\begin{document}
\section{Title}
\end{document}

Compiling this with XeLaTeX (see below for details) yields:

This is XeTeX, Version 3.14159265-2.6-0.999991 (MiKTeX 2.9.7200 64-bit) (preloaded format=xelatex 2019.2.26)  8 OCT 2019 13:04
entering extended mode
**./texstudio_TzzZrd.tex
(texstudio_TzzZrd.tex
LaTeX2e <2018-12-01>
("C:\Program Files\MiKTeX 2.9\tex/latex/koma-script\scrartcl.cls"
Document Class: scrartcl 2019/02/01 v3.26b KOMA-Script document class (article)

[...]

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

[...]

Class scrartcl Info: Deactivating the `titlesec' workaround,
(scrartcl)           because package is newer than expected on input line 3.

[...]

! Missing number, treated as zero.
<to be read again> 
                   }
l.4 ^^I\section{Title}
                      
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Illegal unit of measure (pt inserted).
<to be read again> 
                   }
l.4 ^^I\section{Title}
                  
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)

[...]

I understand that mixing KOMA-Script and titlesec is generally advised against. Nevertheless this used to work.

If I understand the messages correctly, the problem may in fact lie with KOMA-Script; according to komascript.de (in German) the problem is known to the KOMA-Script author, but will not be fixed on KOMA-Script's side. So it would be nice if titlesec could be changed to better accomodate KOMA-Script.

Thanks!

@jbezos
Copy link
Owner

jbezos commented Oct 8, 2019

I'm sorry to say that I don't have time to make titlesec to work with the KOMA classes. And even if I modify titlesec, there is no guarantee that it will work with future versions of KOMA, which are not under my control. See also:

https://tex.stackexchange.com/questions/500970/titlesec-s-update-2-10-2-%e2%86%92-2-11-caused-subparagraphs-not-working-in-scrbookclas?noredirect=1#comment1265340_500970

@jbezos jbezos closed this as completed Oct 8, 2019
@chsk-uk
Copy link
Author

chsk-uk commented Oct 8, 2019

Understandable. Thank you anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants