# Section embedded within other section in sample2e.tex #984

Closed
opened this Issue May 2, 2018 · 6 comments

Projects
None yet
3 participants
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: 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.)

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.
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: itemnum that... note that the outer text was not closed, and the reason seems clear from the binding: DefConstructor('\mbox {}', "#1", mode => 'text', bounded => 1, sizer => '#1', beforeDigest => sub { reenterTextMode(); }); I wonder if this is a bug with the implementation of _noautoclose ?
Collaborator

### dginev commented May 2, 2018

 It is indeed a bug because that outer  has no closing tag at all.
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.
Owner

### brucemiller commented May 3, 2018

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

Contributor

### bfirsh commented May 4, 2018

 Nice! Thanks!