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

[rawtex] mmaauth.cls #985

Closed
Grief opened this Issue May 3, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@Grief

Grief commented May 3, 2018

Here is the document causing that behaviour:

\documentclass{mmaauth}
\begin{document}

\MOS{MSC 2010:
Primary 35R11;
Secondary 35B40, 44A10, 42B10}

\maketitle

\end{document}

You can find mmauth.cls here: http://arxmliv.kwarc.info/sty/mmaauth.cls

@dginev dginev changed the title from LaTeXML hangs forever (100% cpu usage) to [rawtex] mmaauth.cls May 3, 2018

@dginev

This comment has been minimized.

Collaborator

dginev commented May 3, 2018

Thanks for the report! I've renamed the issue (and reproduced the infinite loop with --includestyles)

I am also impressed you found the sty directory of arxmliv!

As a clarification, I am labeling this issue as an "enhancement" as we are currently not claiming that latexml can natively interpret all class and style packages that native tex can. But that is certainly the goal, and this report is quite helpful, especially given the minimal example!

Will take a more detailed look soon.

@dginev dginev added this to the LaTeXML-0.8.4 milestone May 3, 2018

@dginev

This comment has been minimized.

Collaborator

dginev commented May 3, 2018

A quick remark, given that the loop is in \maketitle - latexml does its own metadata processing, so even if the class file could be natively interpreted, the resulting XML will likely be quite flawed, as compared to adding a native binding.

Certainly important to avoid the infinite loop though, so that needs a patch just for the principle of it.

@Grief

This comment has been minimized.

Grief commented May 3, 2018

Hi Deyan.

I am also impressed you found the sty directory of arxmliv!

Right, just noticed that you are affiliated with this project. However, to my regret, that was not me. Even when I know where it is I cannot build a google search request to find it. That was my team leader who found this archive.

Anyway, thanks for the instant response, hope the test case I've provided is helpful in any way. Cheers!

@dginev

This comment has been minimized.

Collaborator

dginev commented May 3, 2018

Yes, the page you found contains work done just about 10 years ago, and has been largely discontinued since - everything of value was brought over to the main LaTeXML suite, exactly here 👍

That's why I mentioned that I was impressed you found that page. I am still periodically running latexml over the entire arXiv corpus, but any tangible results of that appear here as github issues / pull requests right away.

@brucemiller

This comment has been minimized.

Owner

brucemiller commented May 3, 2018

FWIW, the worst offender seems to be tracefnt; it's hard to tell that it does anything we need. An empty binding gets through to where it complains \@title undefined. (\title normally does; some other package must have redefined it?)

@brucemiller

This comment has been minimized.

Owner

brucemiller commented May 3, 2018

Went ahead and made a stub binding, and also defined the conventional \@title,\@author etc, so that redefined \maketitle have a better chance of surviving.

Thanks for the report!

@brucemiller brucemiller closed this May 3, 2018

@dginev

This comment has been minimized.

Collaborator

dginev commented May 3, 2018

I took a closer look at the raw package interpretation prior to Bruce's upgrades.

The cause of the loop is subtle, as the loop itself is quite intricate and relies on a mixture of expansions and executions.

I could avoid the loop by adding the native definitions for \pickup@font and \define@newfont from latex.ltx, but that didn't make the document work cleanly - HTML was produced with 6 errors.

Given that, to my current understanding, LaTeXML's font machinery is on a rather higher level than latex's font internals, it does make sense to go the bounding route, as Bruce did, and avoid these concerns.

This does pose an open question about interpreting natively .cls files in the future, as I assume font work is common. Also, thanks for localizing the issue to tracefnt.sty, which was quite helpful - indeed all troubles are localized in there.

@dginev dginev modified the milestones: LaTeXML-0.8.4, LaTeXML-0.8.3 May 5, 2018

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