unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
@ 2018-10-19 13:35 Pierre Neidhardt
       [not found] ` <handler.33094.B.15399561855233.ack@debbugs.gnu.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2018-10-19 13:35 UTC (permalink / raw)
  To: 33094

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

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:

	https://github.com/oliverklee/latex-examples/tree/master/simple-article-koma-script

The following fails:

--8<---------------cut here---------------start------------->8---
\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}
--8<---------------cut here---------------end--------------->8---

with

--8<---------------cut here---------------start------------->8---
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.
--8<---------------cut here---------------end--------------->8---

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
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: Acknowledgement (latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.)
       [not found] ` <handler.33094.B.15399561855233.ack@debbugs.gnu.org>
@ 2018-10-19 14:07   ` Pierre Neidhardt
  0 siblings, 0 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2018-10-19 14:07 UTC (permalink / raw)
  To: 33094

[-- Attachment #1: Type: text/plain, Size: 124 bytes --]

I've also reported the issue upstream:

	https://komascript.de/node/2201

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2018-10-19 13:35 bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra } Pierre Neidhardt
       [not found] ` <handler.33094.B.15399561855233.ack@debbugs.gnu.org>
@ 2022-01-19  8:38 ` Ricardo Wurmus
  2022-02-15 23:15   ` Ricardo Wurmus
  2023-08-26  9:04 ` Ricardo Wurmus
  2 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2022-01-19  8:38 UTC (permalink / raw)
  To: 33094

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:

--8<---------------cut here---------------start------------->8---
(/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).
--8<---------------cut here---------------end--------------->8---

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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-01-19  8:38 ` bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra } Ricardo Wurmus
@ 2022-02-15 23:15   ` Ricardo Wurmus
  2022-02-16 11:00     ` Ricardo Wurmus
  0 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2022-02-15 23:15 UTC (permalink / raw)
  To: 33094


Ricardo Wurmus <rekado@elephly.net> writes:

> 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:

--8<---------------cut here---------------start------------->8---
\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}
--8<---------------cut here---------------end--------------->8---

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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-02-15 23:15   ` Ricardo Wurmus
@ 2022-02-16 11:00     ` Ricardo Wurmus
  2022-02-16 12:14       ` Ricardo Wurmus
  2022-05-26 12:05       ` Lars-Dominik Braun
  0 siblings, 2 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2022-02-16 11:00 UTC (permalink / raw)
  To: 33094


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.

-- 
Ricardo




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-02-16 11:00     ` Ricardo Wurmus
@ 2022-02-16 12:14       ` Ricardo Wurmus
  2022-05-26 12:05       ` Lars-Dominik Braun
  1 sibling, 0 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2022-02-16 12:14 UTC (permalink / raw)
  To: 33094


Ricardo Wurmus <rekado@elephly.net> writes:

> 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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-02-16 11:00     ` Ricardo Wurmus
  2022-02-16 12:14       ` Ricardo Wurmus
@ 2022-05-26 12:05       ` Lars-Dominik Braun
  2022-05-31 10:32         ` Ricardo Wurmus
  1 sibling, 1 reply; 12+ messages in thread
From: Lars-Dominik Braun @ 2022-05-26 12:05 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 33094

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?

Cheers,
Lars





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-05-26 12:05       ` Lars-Dominik Braun
@ 2022-05-31 10:32         ` Ricardo Wurmus
  2022-06-05 10:25           ` Lars-Dominik Braun
  0 siblings, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2022-05-31 10:32 UTC (permalink / raw)
  To: Lars-Dominik Braun; +Cc: 33094


Lars-Dominik Braun <lars@6xq.net> writes:

> 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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-05-31 10:32         ` Ricardo Wurmus
@ 2022-06-05 10:25           ` Lars-Dominik Braun
  2022-06-05 11:00             ` Liliana Marie Prikler
  0 siblings, 1 reply; 12+ messages in thread
From: Lars-Dominik Braun @ 2022-06-05 10:25 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 33094

[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]

Hi Ricardo,

> 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


[-- Attachment #2: texlive-latex-base-bootstrap.diff --]
[-- Type: text/plain, Size: 1232 bytes --]

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-06-05 10:25           ` Lars-Dominik Braun
@ 2022-06-05 11:00             ` Liliana Marie Prikler
  2022-06-05 17:48               ` Lars-Dominik Braun
  0 siblings, 1 reply; 12+ messages in thread
From: Liliana Marie Prikler @ 2022-06-05 11:00 UTC (permalink / raw)
  To: Lars-Dominik Braun, Ricardo Wurmus; +Cc: 33094

Am Sonntag, dem 05.06.2022 um 12:25 +0200 schrieb Lars-Dominik Braun:
> 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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2022-06-05 11:00             ` Liliana Marie Prikler
@ 2022-06-05 17:48               ` Lars-Dominik Braun
  0 siblings, 0 replies; 12+ messages in thread
From: Lars-Dominik Braun @ 2022-06-05 17:48 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: Ricardo Wurmus, 33094

Hi Liliana,

> 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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.
  2018-10-19 13:35 bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra } Pierre Neidhardt
       [not found] ` <handler.33094.B.15399561855233.ack@debbugs.gnu.org>
  2022-01-19  8:38 ` bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra } Ricardo Wurmus
@ 2023-08-26  9:04 ` Ricardo Wurmus
  2 siblings, 0 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2023-08-26  9:04 UTC (permalink / raw)
  To: 33094-done; +Cc: Pierre Neidhardt

This is now fixed:

--8<---------------cut here---------------start------------->8---
$ 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.
--8<---------------cut here---------------end--------------->8---

The resulting document looks fine to me.

-- 
Ricardo




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-08-26  9:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19 13:35 bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra } Pierre Neidhardt
     [not found] ` <handler.33094.B.15399561855233.ack@debbugs.gnu.org>
2018-10-19 14:07   ` bug#33094: Acknowledgement (latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra }.) Pierre Neidhardt
2022-01-19  8:38 ` bug#33094: latex-koma-script: scrlttr2: ERROR: Argument of \strip@prefix has an extra } Ricardo Wurmus
2022-02-15 23:15   ` Ricardo Wurmus
2022-02-16 11:00     ` Ricardo Wurmus
2022-02-16 12:14       ` Ricardo Wurmus
2022-05-26 12:05       ` Lars-Dominik Braun
2022-05-31 10:32         ` Ricardo Wurmus
2022-06-05 10:25           ` Lars-Dominik Braun
2022-06-05 11:00             ` Liliana Marie Prikler
2022-06-05 17:48               ` Lars-Dominik Braun
2023-08-26  9:04 ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).