latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.

  • Done
  • quality assurance status badge
Details
4 participants
  • Lars-Dominik Braun
  • Liliana Marie Prikler
  • Pierre Neidhardt
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 19 Oct 2018 15:35
(address . bug-guix@gnu.org)(name . Ricardo Wurmus)(address . rekado@elephly.net)
87woqeoy81.fsf@ambrevar.xyz
I've just committed texlive-latex-koma-script which only works partly,
but I can't figure out the root of the issue.

This linked example works:


The following fails:

Toggle snippet (19 lines)
\documentclass[a4paper]{scrlttr2}
\usepackage[utf8]{inputenc}

\title{A very simple document}
\author{Oliver Klee}
\date{\today\ (a very good day)}

\begin{document}

This is an example of how to create line breaks and paragraphs:

Three Rings for the Elven-kings under the sky,\\
Seven for the Dwarf-lords in their halls of stone,\\
Nine for Mortal Men doomed to die,\\
One for the Dark Lord on his dark throne

\end{document}

with

Toggle snippet (18 lines)
ERROR: Argument of \strip@prefix has an extra }.

--- TeX said ---
<inserted text>
\par
l.12 \begin{document}
--- HELP ---
From the .log file...

I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

I can't install the full Texlive distribution as I don't have enough
space.

Ricardo, if you can, could you try this out and see if it works with the
full Texlive?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlvJ3b4ACgkQm9z0l6S7
zH/Dqgf/Violx9BUMZkjWgdJ/wNkUHS7GTel0fpDb7RU1WX1MC8wFZaU1FNtI7hD
9GhY90RR9zPW02V/jZQPh+RDX0LA96i+fnn0u7Fsvlw98jEezgl5xyzJ1pO1VdQY
S0ftqELVRoCgzoS5MvkjTsozOIoiZieeXaGdfdUxLP3RisBbqcmVmwZeQacPhPWA
0LKN6ud4hPgV74v8PhceDzSNpQqVjJ+aME6Gy1m7/+QTUEChpW22fPBAh2Spach2
kPi2O82tcBBA/G/M0p+9u9Jqj5ZR3QipwaCWdbxgeaNdEpBDVs9TmkmmYKuD3zdI
eMyfP5cUQBV7vPKvEmDsfNLyJRSAGg==
=Kz7A
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 19 Oct 2018 16:07
Re: bug#33094: Acknowledgement (latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.)
(address . 33094@debbugs.gnu.org)
87tvliowrd.fsf@ambrevar.xyz
I've also reported the issue upstream:


--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlvJ5SYACgkQm9z0l6S7
zH/o2ggAr2PQOa6GK0UEjDxVhpBDo4ATvHVpwGQPOZyIZHIIVMz7yhjNnVZvTqLI
06Na/Ez/BJXV+nUhTlioCrKX6PuQvoXL5wbIHpgpTNmgHigB4u3UTKIJmNDsirQr
Bc/NXl0qzL+K7ZqZVeO7DJGEEAqAvfws7GjuIktjHr+4rfF6FtBgSZBI1HfUkVST
gh2AqbswzaPwdaW5SpHa3PycpMrKQT51T28FxTdiz6c8IaqUMKoSmxm43raXKDVm
UrmpKIjBVR9d2FbNV79vEKEz6hMjwdCMyFQI5D6dYDRuZwkUhFw/WBDI2VJBj9yF
ycwNRkWSeKy9fkilZ/drYWTYKqLn5Q==
=Dd3H
-----END PGP SIGNATURE-----

R
R
Ricardo Wurmus wrote on 19 Jan 2022 09:38
latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
(address . 33094@debbugs.gnu.org)
87mtjst8tk.fsf@elephly.net
I can reproduce this with xelatex, lualatex, and pdflatex. This does
not happen with the monolithic texlive package.

Interestingly, the files that are directly involved are all the same.
All the koma-script files are identical to their counterparts in the
monolithic texlive.

The monolithic texlive prints this:

Toggle snippet (9 lines)
(/gnu/store/pllzpxmvcldqq89x6w36w77xnr1p4lav-texlive-texmf-20210325/share/texmf
-dist/tex/latex/l3backend/l3backend-pdftex.def) (./komatest.aux) [1{/gnu/store/
pllzpxmvcldqq89x6w36w77xnr1p4lav-texlive-texmf-20210325/share/texmf-dist/fonts/
map/pdftex/updmap/pdftex.map}] (./komatest.aux) )</gnu/store/pllzpxmvcldqq89x6w
36w77xnr1p4lav-texlive-texmf-20210325/share/texmf-dist/fonts/type1/public/amsfo
nts/cm/cmr12.pfb>
Output written on komatest.pdf (1 page, 15553 bytes).

My guess: the argument is the absolute file name of pdftex.map. It
doesn’t belong to any real package in the tlpdb, and I’m pretty sure we
generate it. However, in this case it must be missing, so that there is
no argument to \strip@prefix.

--
Ricardo
R
R
Ricardo Wurmus wrote on 16 Feb 2022 00:15
(address . 33094@debbugs.gnu.org)
87fsoj67gb.fsf@elephly.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (5 lines)
> My guess: the argument is the absolute file name of pdftex.map. It
> doesn’t belong to any real package in the tlpdb, and I’m pretty sure we
> generate it. However, in this case it must be missing, so that there is
> no argument to \strip@prefix.

This was wrong, but I can’t blame myself: the LaTeX errors are
incredibly useless and misleading.

I added \setcounter{errorcontextlines}{999} to the document to see some
context, but it served little more than to confuse me. (It didn’t print
999 context lines but only 4 lines with elisions.) It did however
indicate that the error might be related to languages.

So I changed the document to this:

Toggle snippet (23 lines)
\documentclass[a4paper]{scrlttr2}
\usepackage[utf8]{inputenc}

% This line is new. Set the language!
\usepackage[british]{babel}
%\setcounter{errorcontextlines}{999}

\title{A very simple document}
\author{Oliver Klee}
\date{\today\ (a very good day)}

\begin{document}

This is an example of how to create line breaks and paragraphs:

Three Rings for the Elven-kings under the sky,\\
Seven for the Dwarf-lords in their halls of stone,\\
Nine for Mortal Men doomed to die,\\
One for the Dark Lord on his dark throne

\end{document}

It worked.

I don’t know why the monolithic TeX Live package doesn’t have this
problem, but at least we’ve got a workaround now: load babel and set a
default language.

I’ll also add that the texlive-latex-koma-script package in Guix is not
up to our standards. It’s not built from source (= not generated from
dtx/ins files) and it doesn’t include all files such as documentation
and source files. We should fix that too.

--
Ricardo
R
R
Ricardo Wurmus wrote on 16 Feb 2022 12:00
(address . 33094@debbugs.gnu.org)
877d9v5b40.fsf@elephly.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (3 lines)
> % This line is new. Set the language!
> \usepackage[british]{babel}

It is in fact sufficient to add only this line

\def\languagename{english}

The only problem is that languagename is undefined.

--
Ricardo
R
R
Ricardo Wurmus wrote on 16 Feb 2022 13:14
(address . 33094@debbugs.gnu.org)
87v8xd3f46.fsf@mdc-berlin.de
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (11 lines)
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> % This line is new. Set the language!
>> \usepackage[british]{babel}
>
> It is in fact sufficient to add only this line
>
> \def\languagename{english}
>
> The only problem is that languagename is undefined.

pdflatex.fmt is a gzipped file. Unzipping it we see differences in the
file from the working monolithic texlive package and the
texlive-latex-base package. The former retains references to babel
files while the one from texlive-latex-base does not.

--
Ricardo
L
L
Lars-Dominik Braun wrote on 26 May 2022 14:05
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 33094@debbugs.gnu.org)
Yo9tCn/SEANkLwFT@noor.fritz.box
Hi Ricardo,

this problem is biting me too now.

Toggle quote (7 lines)
> > % This line is new. Set the language!
> > \usepackage[british]{babel}
>
> It is in fact sufficient to add only this line
>
> \def\languagename{english}
>
This workaround only works fine for scrlttr2, but unfortunately not for
scrbook, scrartcl, … Any idea?

Cheers,
Lars
R
R
Ricardo Wurmus wrote on 31 May 2022 12:32
(name . Lars-Dominik Braun)(address . lars@6xq.net)(address . 33094@debbugs.gnu.org)
874k160z18.fsf@elephly.net
Lars-Dominik Braun <lars@6xq.net> writes:

Toggle quote (14 lines)
> Hi Ricardo,
>
> this problem is biting me too now.
>
>> > % This line is new. Set the language!
>> > \usepackage[british]{babel}
>>
>> It is in fact sufficient to add only this line
>>
>> \def\languagename{english}
>>
> This workaround only works fine for scrlttr2, but unfortunately not for
> scrbook, scrartcl, … Any idea?

The correct solution to this problem would be to add a little build
cycle: build a bootstrap version of pdflatex (and the other formats) so
that we can build babel; then rebuild pdflatex (and all the other
formats, and everything that goes into texlive-latex-base) in an
environment where babel exists.

The resulting pdflatex.fmt would then likely be aware of babel and
behave like the file from the monolithic texlive package.

--
Ricardo
L
L
Lars-Dominik Braun wrote on 5 Jun 2022 12:25
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 33094@debbugs.gnu.org)
YpyEoB2JdHhuRuCu@noor.fritz.box
Hi Ricardo,

Toggle quote (5 lines)
> The correct solution to this problem would be to add a little build
> cycle: build a bootstrap version of pdflatex (and the other formats) so
> that we can build babel; then rebuild pdflatex (and all the other
> formats, and everything that goes into texlive-latex-base) in an
> environment where babel exists.
indeed, adding this package variation to the manifest fixed the issue for me:

---snip---
(define-public texlive-latex-base-fixed
(package
(inherit texlive-latex-base)
(name "texlive-latex-base-fixed")
(propagated-inputs (modify-inputs (package-propagated-inputs texlive-latex-base)
(append texlive-babel)))))
---snap---

Looking at `guix refresh -l texlive-latex-base` a change like that would
be a world rebuild though. I tried adding something similar to
Guix’ tree, but there’s a loop somewhere I can’t figure out
(see attached patch). I’m guessing through texlive-build-system’s
#:texlive-latex-base.

Cheers,
Lars
Toggle diff (35 lines)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 4831cf0933..703846a1ad 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -2943,9 +2943,9 @@ (define-public texlive-latexconfig
formats.")
(license license:lppl)))
-(define-public texlive-latex-base
+(define-public texlive-latex-base-bootstrap
(let ((template (simple-texlive-package
- "texlive-latex-base"
+ "texlive-latex-base-bootstrap"
(list "/doc/latex/base/"
"/source/latex/base/"
;; Almost all files in /tex/latex/base are generated, but
@@ -3174,6 +3174,18 @@ (define-public texlive-latex-base
contain.")
(license license:lppl1.3c+))))
+(define-public texlive-latex-base
+ (let ((base texlive-latex-base-bootstrap))
+ (package
+ (inherit base)
+ (name "texlive-latex-base")
+ (arguments
+ `(#:texlive-latex-base texlive-latex-base-bootstrap
+ ,@(package-arguments base)))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs base)
+ (append texlive-babel))))))
+
(define-public texlive-latex-atveryend
(package
(inherit (simple-texlive-package
L
L
Liliana Marie Prikler wrote on 5 Jun 2022 13:00
(address . 33094@debbugs.gnu.org)
45656b84bad4faa2ea6295b46a476284a30dbca3.camel@gmail.com
Am Sonntag, dem 05.06.2022 um 12:25 +0200 schrieb Lars-Dominik Braun:
Toggle quote (5 lines)
> Looking at `guix refresh -l texlive-latex-base` a change like that
> would be a world rebuild though. I tried adding something similar to
> Guix’ tree, but there’s a loop somewhere I can’t figure out
> (see attached patch). I’m guessing through texlive-build-system’s
> #:texlive-latex-base.
I think grafts would fix your problem, no? That is instead of defining
a "bootstrap" variant, you'd simply add texlive-latex-base/fixed as a
replacement to texlive-latex-base.

Cheers
L
L
Lars-Dominik Braun wrote on 5 Jun 2022 19:48
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
YpzsXxC1aPSOMewE@noor.fritz.box
Hi Liliana,

Toggle quote (3 lines)
> I think grafts would fix your problem, no? That is instead of defining
> a "bootstrap" variant, you'd simply add texlive-latex-base/fixed as a
> replacement to texlive-latex-base.
from my understanding no, because latex-babel indirectly depends on
texlive-latex-base. (Through texlive-build-system, since trivial? is
false and thus gnu-build-system is *not* used.)

Cheers,
Lars
R
R
Ricardo Wurmus wrote on 26 Aug 2023 11:04
latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
(address . 33094-done@debbugs.gnu.org)(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
87ttsm18cq.fsf@elephly.net
This is now fixed:

Toggle snippet (28 lines)
$ guix shell texlive-collection-latexrecommended -- pdflatex latex.tex

pdflatex latex.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/GNU Guix) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./latex.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22> (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/scrlttr2.cls
Document Class: scrlttr2 2022/10/12 v3.38 KOMA-Script document class (letter)
(/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/scrkbase.sty (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/scrbase.sty (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/scrlfile.sty (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/scrlogo.sty))) (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/graphics/keyval.sty))) (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/scrsize12pt.clo) (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/typearea.sty)) (/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/koma-script/DIN.lco)
(/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/base/inputenc.sty)

Class scrlttr2 Warning: \date changes the internal \LaTeX date only.
(scrlttr2) You should note that this changes the default
(scrlttr2) value of variable `date' only as long as nobody
(scrlttr2) uses `\setkomavar` to change the content of
(scrlttr2) variable `date'.
(scrlttr2) Therefore, usage of `\setkomavar' is recommended
(scrlttr2) to change the letter's date on input line 6.

(/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file latex.aux.
[1{/gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}] (./latex.aux) )</gnu/store/k6d1433yxpb1g3whfdh1h5pmf4bnmlzg-profile/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb>
Output written on latex.pdf (1 page, 16397 bytes).
Transcript written on latex.log.

The resulting document looks fine to me.

--
Ricardo
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 33094@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 33094
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch