borisveytsman / nomencl

The nomenclature package can be used to generate and format a nomenclature using MakeIndex.
http://ctan.org/pkg/nomencl
8 stars 1 forks source link

Version 5.0 introduces regression with KOMA-Script #1

Closed michael-o closed 5 years ago

michael-o commented 5 years ago

Just pulled 5.0 via tlmgr and our documents broke due to the changes.

I receive now:

$ xelatex index
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./index.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 46 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2018/12/30 v3.26a KOMA-Script document class (article)

(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/typearea.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/nomencl/nomencl.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/ifthen.sty))
Runaway argument?
{
! Paragraph ended before \XKV@s@tk@ys@ was complete.
<to be read again>
                   \par
l.5

? X
No pages of output.
Transcript written on index.log.

Pulled KOMA-Script 3.25 from Tex Live repo, no change. Manually restored nomencl to 4.2 in texmf-dist makes it work again:

$ xelatex index
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./index.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 46 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2018/12/30 v3.26a KOMA-Script document class (article)

(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/typearea.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/nomencl/nomencl.sty) (./index.aux
) (./index.aux) )
No pages of output.
Transcript written on index.log.

Here is the MWE to reproduce this:

$ less index.tex
\documentclass{scrartcl}
\usepackage{nomencl}

\KOMAoption{parskip=half*}

\begin{document}

\end{document}

FWIW, we are running off FreeBSD 11.2-STABLE.

borisveytsman commented 5 years ago

KOMA uses its own option handling which conflicts with xkeyval called by nomencl. Therefore you need to process KOMA options before calling nomencl. This works

\documentclass{scrartcl}

\KOMAoption{parskip=half*}

\usepackage{nomencl}

\begin{document}

\end{document}

I will add to the docs

michael-o commented 5 years ago

Brilliant, I will retry tomorrow and will reach out to the KOMA guys whether this could be made idiot-safe because in our composed document structure it won't be that easy to swap.

borisveytsman commented 5 years ago

By the way, are you using TeX at Siemens? If yes, I wonder why I do not see Siemens here: http://tug.org/instmem.html

michael-o commented 5 years ago

Yes, we are. We are generating technical engineering documents, mostly for clients. I cannot speak for the company, since someone with "power" has to complete the process. But I will raise this in my team, maybe we can get a badge up there.

michael-o commented 5 years ago

I can confirm that the following works:

\documentclass{scrartcl}
\KOMAoption{parskip=half*}

\usepackage{nomencl}

\begin{document}

\end{document}

Strangely, if I remove the empty line between KOMAOption and usepackage, the system gives me:

This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./index.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 46 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2018/12/30 v3.26a KOMA-Script document class (article)

(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/typearea.sty))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.3 \usepackage{n
                 omencl}

This is probably some pure LaTeX or KOMA-Script issue.

michael-o commented 5 years ago

@borisveytsman I have contacted Markus Kohm. The depicted change works only because of a trick. The correct usage is:

\documentclass{scrartcl}
\usepackage{nomencl}
\KOMAoptions{parskip=half*}% beachte das "s" am Ende von \KOMAoptions

\begin{document}

\end{document}

or

\documentclass{scrartcl}
\usepackage{nomencl}
\KOMAoption{parskip}{half*}% beachte die Aufspaltung in zwei Argumente

\begin{document}

\end{document}

The workaround works because \KOMAoption uses \KOMAoptions internally and \par of the following empty line is passed as second argument to \KOMAoption.

Please update the README for the correct syntax.

borisveytsman commented 5 years ago

Thanks! So it was a KOMA problem after all...

michael-o commented 5 years ago

Right, Markus added an error message when \KOMAoption{key=value} is used.

komascript commented 5 years ago

Thanks! So it was a KOMA problem after all...

No, it was not a KOMA-Script problem it was a user mistake.