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

[latexrelease] Page head hyphenation with latexrelease #25

Closed
aminophen opened this issue Mar 31, 2018 · 8 comments
Closed

[latexrelease] Page head hyphenation with latexrelease #25

aminophen opened this issue Mar 31, 2018 · 8 comments

Comments

@aminophen
Copy link
Contributor

!! Please fill out all sections after reading CONTRIBUTING guidelines !!

Brief outline of the bug

The code below is based on "tlb-verb-003.lvt". It compiles fine with

  • latest LaTeX2e (both "2017-04-15" and "2018-04-01 pre-release-1")
  • old LaTeX2e (say "2016/03/31 patch level 3"; current Overleaf is using it)

but wrong output comes with e.g. \RequirePackage[2016/03/31]{latexrelease}.

The threshold lies between 2017/03/09 and 2017/03/10, and any date options before 2017/03/10 breaks compatibility.

Minimal example showing the bug

\RequirePackage{latexbug}       % <--should be always the first line (see CONTRIBUTING)!
\RequirePackage[2017/01/01]{latexrelease}
\documentclass{article}

\addtolength\textheight{-30\baselineskip}
\addtolength\headheight{10pt}

\makeatletter
\def\@oddhead{\parbox{\textwidth}{[\thepage]
Supercalifragilisticexpialidocious
Supercalifragilisticexpialidocious
Supercalifragilisticexpialidocious
\the\language\typeout{lan=\the\language}}}
\makeatother
\begin{document}

\makeatletter[\fmtversion+\patch@level]\makeatother
$x$

zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz

zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz

zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz\\zzz
\begin{verbatim}
a
 a
  a
   a
    a
     a
      a
       a
        a
         a
          a
a
 a
  a
   a
    a
     a
      a
       a
        a
         a
          a
\end{verbatim}

\clearpage

\end{document}

Log file (required) and possibly PDF file

iir-verb.log

@davidcarlisle
Copy link
Member

davidcarlisle commented Mar 31, 2018

Ah. If I understand the issue this is something that came up as a "theoretical possibility" in some internal discussions about \IncludeInRelease the other day, but hadn't noticed it appears in practice.

the change is in ltfiles.dtx marked

%<latexrelease>\IncludeInRelease{2017/03/10}%

which means it backdates to that format date but that only matches the format you were using at that date if you regularly build from source (so effectively no one). As a result of discussions on how this is supposed to work, we have just documented internally that all new \includeRelease dates at a new ctan release should be normalised to the nominal date of that release.

In this case, as shown in changes.txt the change to save \language appeared in the 2017-04-15 release
so the \IncludeInRelease date should be that.

I suppose we should find all \IncludeInRelease dates that don't match a public release and adjust.

Note however that by design it does not exactly match the public release in all cases as \IncludeInRelease can not distinguish patch releases so all changes that happen at a patch release are treated as if they happened at the main release.

so someone using a "real" 2016/03/31 release will not have a fix that was added in 2016/03/31 patch level 3, even though a later release using 2016/03/31 compatibility option of latexrelease.sty will have the patches from patch release 1, 2 and 3. that is not the issue here though.

@aminophen
Copy link
Contributor Author

we have just documented internally that all new \includeRelease dates at a new ctan release should be normalised to the nominal date of that release.

So, currently it seems that \IncludeInRelease dates should be one of the following 7:

  • 2017-04-15
  • 2017/01/01
  • 2016/03/31
  • 2016/02/01
  • 2015/10/01
  • 2015/01/01
  • 0000/00/00

I agree

we should find all \IncludeInRelease dates that don't match a public release and adjust.

but that does not resolve this issue

@aminophen
Copy link
Contributor Author

Try to adjust all \IncludeInRelease on #26, but the issue here remains. I don't understand why; some emulation code is still missing?

@davidcarlisle
Copy link
Member

$ grep -io '\IncludeInRelease[{]..........[}]' *dtx | grep -v 0000 |  grep -v 2015/01/01 |  grep -v 2015/10/01 | grep -v 2016/02/01 | grep -v 2016/03/31 | grep -v 2017.01.01 | grep -v 2017.04.15 | grep -v 2018.04.01
latexrelease.dtx:IncludeInRelease{2015/03/01}
latexrelease.dtx:IncludeInRelease{2015/03/01}
latexrelease.dtx:IncludeInRelease{2015/03/01}
ltfiles.dtx:IncludeInRelease{2017/03/10}
ltoutput.dtx:IncludeInRelease{2017/03/10}
ltplain.dtx:IncludeInRelease{2015/01/20}
ltplain.dtx:IncludeInRelease{2015/01/20}

but that does not resolve this issue

so if latexrelease.sty was changed so the two occurrences of 2017/03/10 were changed to
say 2017/04/15 wouldn't that then do the right thing? you would get the old behaviour on your test file
for any date older than the date of the release that had the change?

(I just saw you added a PR I'll look in a bit)

@aminophen
Copy link
Contributor Author

It seems that ltmiscen.dtx is missing from latexrelease.sty!

@davidcarlisle
Copy link
Member

davidcarlisle commented Mar 31, 2018 via email

@FrankMittelbach
Copy link
Member

FrankMittelbach commented Mar 31, 2018 via email

aminophen added a commit to aminophen/latex2e that referenced this issue Mar 31, 2018
davidcarlisle added a commit that referenced this issue Mar 31, 2018
@davidcarlisle
Copy link
Member

@aminophen sorry was adding that by hand, I'll pull the other changes:-)

davidcarlisle added a commit that referenced this issue Mar 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants