Menu

#3 scrlayer-notecolumn with lualatex and space in filename

KOMA-Script 3.34
closed
2021-03-25
2021-03-10
Markus Kohm
No

If the LaTeX document's file name contains spaces scrlayer-notecolumn fails with an error. For example:

% This is file `lua test.tex'.
\documentclass{scrbook}
\usepackage{scrlayer-scrpage}
\usepackage{scrlayer-notecolumn}

\begin{document}
Hallo.
\end{document}

fails with error:

(/usr/local/texlive/2020/texmf-dist/tex/latex/koma-script/scrlayer-notecolumn.s
ty[\directlua]:1: ')' expected near 'lua'.
<argument> ...m {\directlua {slncmdfivesum("\jobname .slnc")}
                                                  }\fi 
l.930 }
     %
? 

Related

Wiki (Deutsch): Release 3.33
Wiki (English): Release 3.33

Discussion

  • Markus Kohm

    Markus Kohm - 2021-03-10

    The problem is, that \jobname in this case is "lua test". So the expansion of \jobname already contains " and "\jobname .slnc" expands to ""lua test".slnc", which is indeed wrong.

    But only filenames with spaces have such a quotes. So removing the quotes in the lua code would fix the space case but break the non-space case.

    And \directlua {slncmdfivesum(tex.jobname .. ".slnc")} also fails, if tex.jobname is "lua test", because in this case, indeed a file "lua test".slnc would be opened and that would fail. So it seems we need to remove the outer quote characters if they are there. Any better suggestion?

    BTW: Function slncmdfivesum should be renamed to scrlayer.notecolumn.slncmdfivesum. And, because the argument is always the same, it could be defined without argument.

     

    Last edit: Markus Kohm 2021-03-10
  • Markus Kohm

    Markus Kohm - 2021-03-10
    • labels: scrlayer-notecolumn --> scrlayer-notecolumn, bug
    • assigned_to: Markus Kohm
     
  • Markus Kohm

    Markus Kohm - 2021-03-17
    • Milestone: once upon a time --> KOMA-Script 3.34
     
  • Markus Kohm

    Markus Kohm - 2021-03-25

    fixed → [r3591]

     

    Related

    Commit: [r3591]

  • Markus Kohm

    Markus Kohm - 2021-03-25
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.