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

Section embedded within other section in sample2e.tex #984

Closed
bfirsh opened this Issue May 2, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@bfirsh
Contributor

bfirsh commented May 2, 2018

Looks like #959 is now fixed, but I'm seeing another regression when trying to bump LaTeXML. I think it's in d18cdad..fd566f1 somewhere.

It's a problem with sample2e.tex, a test document that is bundled with LaTeX. It's quite hard to explain, but quite obvious if you just render it and view the DOM. Basically, Section 2 is embedded inside the last paragraph of section 1. Some of the stuff in that last paragraph is also messed up (like the footnote, which should be in its own paragraph), which I think it is causing it to mess up everything following that.

Here is a screenshot of the DOM which shows the problem more clearly:

screenshot 2018-05-02 19 01 35

Ref arxiv-vanity/engrafo#292 (As an aside: our tests have HTML snapshotting. I have committed the broken output so you can see the diff of the HTML if you expand the large diff in the github UI.)

@dginev dginev added the bug label May 2, 2018

@dginev dginev added this to the LaTeXML-0.8.3 milestone May 2, 2018

@dginev

This comment has been minimized.

Collaborator

dginev commented May 2, 2018

Thanks for the report! We'll take a look. And it would also be great for us to ensure conformance with your test harness before we release 0.8.3, which should be coming up soon.

@dginev

This comment has been minimized.

Collaborator

dginev commented May 2, 2018

First issue I can spot here is a couple of nested ltx:text elements (debugging on the XML, rather than the HTML), for the latex:

\mbox{\emph{itemnum}}

creating:

<text><text class="ltx_emph" font="italic">itemnum</text>
that...

note that the outer text was not closed, and the reason seems clear from the binding:

DefConstructor('\mbox {}',
  "<ltx:text _noautoclose='1'>#1</ltx:text>", mode => 'text', bounded => 1,
  sizer => '#1',
  beforeDigest => sub { reenterTextMode(); });

I wonder if this is a bug with the implementation of _noautoclose ?

@dginev

This comment has been minimized.

Collaborator

dginev commented May 2, 2018

It is indeed a bug because that outer <text> has no closing tag at all.

@dginev

This comment has been minimized.

Collaborator

dginev commented May 2, 2018

I can now also confirm removing the \mbox returns the document to correct markup (including the HTML), so that should be the main and only issue.

@brucemiller

This comment has been minimized.

Owner

brucemiller commented May 3, 2018

ok, I think I've got it fixed this time (Really!) Thanks again!

@brucemiller brucemiller closed this May 3, 2018

@bfirsh

This comment has been minimized.

Contributor

bfirsh commented May 4, 2018

Nice! Thanks!

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