bugtex4ht - Bugs: bug #464, ! Bad register code (65536)....

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #464: ! Bad register code (65536). because no new line used in long math?

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Sun May 10 08:19:59 2020  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Jun 29 22:22:51 2020, comment #4:

think there is nothing more to do here, closing.

Karl Berry <karl>
Project Administrator
Sun May 10 19:47:57 2020, comment #3:

Hi Nasser,

it seems like issue in the LaTeX regular expression parser. We use it to fix some issues in the code that is passed to MathJax. Your code seems to be too long for that. Couldn't you break your huge equation into smaller pieces?

Best,
Michal

Michal Hoftich <michal_h21>
Project Member
Sun May 10 19:27:42 2020, comment #2:

Quick update. I think we are getting closer.

I found the line which causes it to fail. The \begin{align}...\end{align} has in inside it now 39 equations, each now on one line. This is all in file foo_v2.tex which is in same folder https://www.12000.org/tmp/051020/

When I commented line 39 (last equation) inside the align environment, then it compiles OK.

Uncommenting line 39 the error comes back.

So I thought may be tex4ht needs more resources? So edited

/usr/local/texlive/2020/texmf.cnf and added these

buf_size=90000000
pool_size=9000000
main_memory=8000000

Then run

sudo /usr/local/texlive/2020/bin/x86_64-linux/fmtutil-sys --all

But the problem is still there. So it is not resource problem. The problem is in the

/usr/local/texlive/2020/texmf-dist/tex/latex/base/ts1cmr.fd

And only shows when running tex4ht in mathjax mode.

I see nothing special about last equation in the align environment, so I do not know why removing it removes the error.

Nasser M. Abbasi <nma123>
Sun May 10 19:00:56 2020, comment #1:

FYI.
I found the problem is not related to line length. I put new latex file which does put a new line at end of each equation and the problem is still there.

The new file is called foo_v2.tex in same folder

https://www.12000.org/tmp/051020/

And when I compile the above same way

make4ht -ulm default -a debug foo_v2.tex "htm,mathjax"

it gives same error Bad register code (65536).

So the problem is something else.

Any suggestion what else I can try?

TL 2020 on linux.

Nasser M. Abbasi <nma123>
Sun May 10 08:19:59 2020, original submission:

I have one \begin{align}...\end{align} which contains few equations.

This is auto-generated from Mathematica. Now the only thing, is that there is no new line between the equations. So it looks like this

\begin{align} .....\\ &=.. \\ ... &= ....\\ .. \end{align}

All on one LONG line.

This causes no problem at all to lualatex. It compiles OK and the output is correct.

But when I do

make4ht -ulm default -a debug foo.tex "htm,mathjax"

I get

----------------------
(/usr/local/texlive/2020/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo.aux)
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/ts1cmr.fd)
! Bad register code (65536).
\__regex_query_set:nnn ... \l__regex_curr_pos_int
{#1}\int_incr:N \l__regex_...

l.8 ...4 \left(7+2 \sqrt{14}\right)}}\\ \end{align*}

?
----------------------

Since the file is long, I can not put it here (actually the file is only few lines, but the line is over 110,000 characters long. It looks like

==========================
\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align} .....\\ \end{align}
\end{document}
==================================

So I put foo.tex and also foo.pdf (generated from lualatex) in this folder

https://www.12000.org/tmp/051020/

Also, when I tried to compile it using

>make4ht -ulm default -a debug foo.tex "htm"


i.e. no mathjax, it did not crash, but tex4ht generated hundreds of image .png files.

Question is, why does it crash like this? Is there a limit on how long a line can be in Latex for use with tex4ht/mathjax?

Using TL 2020.

Nasser M. Abbasi <nma123>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Jun 29 22:22:51 2020karlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray