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

Space before date optional argument to \ProvidesPackage causes error #33

Closed
josephwright opened this issue Apr 8, 2018 · 8 comments
Closed

Comments

@josephwright
Copy link
Member

@josephwright josephwright commented Apr 8, 2018

Brief outline of the bug

As reported on the TeX Live list, with the 2018-04-01 release of the kernel there is a low-level error when a .sty file (or similar) has a space between the [ and date in the optional argument to \ProvidesPackage.

Minimal example showing the bug

\RequirePackage{latexbug}
\begin{filecontents}{test.sty}
\ProvidesPackage{test}%
  [ 2018/04/08 v0.0 Test Package. ]
\end{filecontents}
\documentclass{article}
\usepackage{test}
\begin{document}
Hello, World!
\end{document}
\begin{document}

Log file (required) and possibly PDF file

ex2.log

@josephwright
Copy link
Member Author

@josephwright josephwright commented Apr 8, 2018

Suggested code change:

\makeatletter
\def\@ifl@t@r#1#2{%
  \ifnum\expandafter\@parse@version\expandafter#1//00\@nil<%
        \expandafter\@parse@version\expandafter#2//00\@nil
    \expandafter\@secondoftwo
  \else
    \expandafter\@firstoftwo
  \fi}
\def\@parse@version#1{\@parse@version@0#1}
\def\@parse@version@#1/#2/#3#4#5\@nil{%
\@parse@version@dash#1-#2-#3#4\@nil
}
\makeatother

@eg9
Copy link
Contributor

@eg9 eg9 commented Apr 8, 2018

@josephwright
Copy link
Member Author

@josephwright josephwright commented Apr 8, 2018

I'd change this but latexrelease makes life tricky: one for @davidcarlisle I think ;)

@josephwright
Copy link
Member Author

@josephwright josephwright commented Apr 8, 2018

(Note I've edited my suggested code: I had a stray \@nil)

@davidcarlisle
Copy link
Member

@davidcarlisle davidcarlisle commented Apr 8, 2018

@josephwright
Copy link
Member Author

@josephwright josephwright commented Apr 8, 2018

@davidcarlisle I meant that one had to move where the 0 business is added, and that is a change from previous versions so presumably does need the PL stuff.

@davidcarlisle
Copy link
Member

@davidcarlisle davidcarlisle commented Apr 8, 2018

@josephwright a simper change with less impact of latexrelease.sty would be

\def\@ifl@t@r#1#2{%
  \ifnum\expandafter\@parse@version@#1//00\@nil<%
        \expandafter\@parse@version@#2//00\@nil
    \expandafter\@secondoftwo
  \else
    \expandafter\@firstoftwo
  \fi}
\def\@parse@version@#1{\@parse@version0#1}

@josephwright
Copy link
Member Author

@josephwright josephwright commented Apr 8, 2018

@davidcarlisle Sure: I was just looking for a 'quick fix'.

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

Successfully merging a pull request may close this issue.

None yet
3 participants