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

tabularry usage fails since 5.3.0 #12285

Open
franzhaas opened this issue Apr 15, 2024 · 3 comments
Open

tabularry usage fails since 5.3.0 #12285

franzhaas opened this issue Apr 15, 2024 · 3 comments

Comments

@franzhaas
Copy link

Describe the bug

starting with this commit my latex based table generation which uses tabularry under the hood fails with.:


! LaTeX3 Error: Control sequence \c@rownum already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.112 \int_new:N \c@rownum
                          

we are using a self written

How to Reproduce

  • unfortunately i do not have a minimal example at the moment. I can provide a relatively large one if it helps...

Environment Information

22.04.1-Ubuntu LTS

Sphinx extensions

none

Additional context

I have a hard time finding a minimal example... I hope the provided information is enough to find an explanation.

Sorry,
Franz

@picnixz
Copy link
Member

picnixz commented Apr 16, 2024

It appears that the issue is with the fact that our LaTeX files are loaded before you are using tabulary. However the latter appears to forcibly define a new counter that we actually defined ourselves (and probably prior to its loading).

I think the problem can go away if you don't use tabulary, or if you can try patching tabulary itself (see etoolbox). @jfbu any suggestions you have in mind?

@jfbu
Copy link
Contributor

jfbu commented Apr 24, 2024

Hello, are you referring to tabularray or to tabulary? l.112 \int_new:N \c@rownum is LaTeX3 code, which tabulary does not use.

Sphinx LaTeX code does define a rownum counter, as would package xcolor with option table.

Some non-Sphinx code is doing a non cautious \newcounter{rownum} (or equivalent in LaTeX3 lingua).

Hmm I tried to trick tabularray into throwing the same error but its LaTeX3 code is \int_zero_new:N \c@rownum and this code does check for prior existence. Your code is \int_new:N \c@rownum. It may be that an old version oftabularray has the problem. I can't test any other installation of TeXLive than current one or TL2019 and older ones, and tabularray did not exist then.

You could try \makeatletter\let\c@rownum\relax\makeatother before loading your version of tabularrray.

@jfbu
Copy link
Contributor

jfbu commented Apr 24, 2024

P.S. I found the tabularray commit which changed its way of doing things, and thus with tabularray 2022-07-01: Version 2022C you would not have seen this conflict. I can not test but if you add

\makeatletter
\let\c@rownum\relax
\let\therownum\relax
\makeatother

before loading tabularray problems should go away.

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

No branches or pull requests

4 participants