davidcarlisle / dpctex

Assorted TeX packages
93 stars 30 forks source link

tabulary broken after the June 2024 array package update. #50

Closed davidcarlisle closed 2 months ago

davidcarlisle commented 2 months ago

All use of the package, for example

\documentclass{article}

\usepackage{tabulary}

\begin{document}

\begin{tabulary}{1.0\linewidth}{L}
  x
\end{tabulary}
\end{document}

Produce the error message

! Missing \cr inserted.
<inserted text> 
                \cr 
l.9 \end{tabulary}

? 

This should be fixed in the current head of this repository, but opening the issue for the record.

davidcarlisle commented 2 months ago

@jfbu @u-fischer @FrankMittelbach I think this is done and rollback is working I'll push to ctan at lunctime today unless anyone spots anything

jfbu commented 2 months ago

My test document passes but right now on a big document I get

! Missing # inserted in alignment preamble.
<to be read again> 
                   &
l.10648 \end{tabulary}

This is wih

(/Users/zzz/Library/texmf/tex/latex/tabulary/tabulary.sty
Package: tabulary 2024/06/04 v0.11 tabulary package (DPC)

I will need some minutes to try to provide a mwe. The above document may have one or two hack, I have to check and see if I can reproduce with nothing extra.

davidcarlisle commented 2 months ago

@jfbu if it's easier, you don't need to make a minimised example you could send a zip to me by email and I would have a look

jfbu commented 2 months ago

Error definitely involves external context from Sphinx, I am closing in on which of the hacks done on tabulary is now broken.

jfbu commented 2 months ago

This was a very complicated process for me because Sphinx does hack tabulary and some of it I do not have in my head anymore... (some of it is very complicated with \multicolumn and I got lost for half-an hour trying to understand it despite dozens of comment lines) but it turns out that the reason causing that crash is simply that Sphinx does \RequirePackage{colortbl}.

\documentclass{article}

\usepackage{colortbl}
\usepackage{tabulary}

\begin{document}
\begin{tabulary}{\linewidth}{J}
    Language
\end{tabulary}
\end{document}
davidcarlisle commented 2 months ago

@jfbu Thanks, You might hope that packages by the same author might work in combination... I'll see what I can do.... Now I wonder how come the testfile ty001-colortbl here works as that loads both packages.

davidcarlisle commented 2 months ago

@jfbu should work after 1428319 (thanks @u-fischer)

FrankMittelbach commented 2 months ago

while it is not yet on ctan ... you don't need the \cr if you unconditionally do \crcr afterwards

\cs_set:Npn \tbl_crcr:n #1 {
     \int_compare:nNnT \g__tbl_col_int > 0
         {
           \tbl_count_missing_cells:n {#1}
         }
     \crcr
   }

Not that it matters much

davidcarlisle commented 2 months ago

Ah true I may as well change that and then we should push same change to the format @FrankMittelbach

davidcarlisle commented 2 months ago

v0.11 submitted to ctan

jfbu commented 2 months ago

Thanks. My big document where the problem with colortbl surfaced after the first fix now compiles with the version in place at time of writing (2024/06/04 v0.11).

dbitouze commented 2 months ago

The MWE:

\documentclass{article}

\usepackage{tabulary}

\begin{document}

\begin{tabulary}{1.0\linewidth}{L}
  x
\end{tabulary}
\end{document}

still fails to compile with the update: tabulary (34368 -> 71455):

[...]
! Missing \cr inserted.
<inserted text> 
                \cr 
l.9 \end{tabulary}
[...]
 *File List*
 article.cls    2024/02/08 v1.4n Standard LaTeX document class
  size10.clo    2024/02/08 v1.4n Standard LaTeX file (size option)
tabulary.sty    2014/06/11 v0.10 tabulary package (DPC)
   array.sty    2024/05/23 v2.6c Tabular extension package (FMi)
l3backend-pdftex.def    2024-05-08 L3 backend support: PDF output (pdfTeX)
davidcarlisle commented 2 months ago

@dbitouze Check your log, I think you will find you are still using v0.10. v0.11 with the update is on ctan but something went wrong with the integration to texlive

see

https://tug.org/pipermail/tex-live/2024-June/050647.html