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

[CommonHTML] rowlines can be too short #1711

Closed
pkra opened this issue Mar 1, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@pkra
Copy link
Member

commented Mar 1, 2017

In the CommonHTML output, a row line can end up too short when the row above is shorter than the maximal row in the table (or perhaps the next row, I'm not sure what the spec says).

This seems due to rowlines being drawn via border-bottom on the elements from the row above the rowline; that row would need additional empty elements at its end (to match the rowline length) to ensure a correct line.

For example,

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mtable data-mml-elementary="mstack" columnspacing="0" rowlines="none solid none">
    <mtr>
      <mtd />
      <mtd>
        <mn>4</mn>
      </mtd>
      <mtd>
        <mn>2</mn>
      </mtd>
      <mtd>
        <mn>4</mn>
      </mtd>
      <mtd data-mml-elementary-decimalpos="true">
        <mn>.</mn>
      </mtd>
      <mtd>
        <mn>2</mn>
      </mtd>
    </mtr>
    <mtr data-mml-elementary-msrow-op-front="true">
      <mtd>
        <mo>+</mo>
      </mtd>
      <mtd>
        <none />
      </mtd>
      <mtd>
        <mn>3</mn>
      </mtd>
      <mtd>
        <mn>3</mn>
      </mtd>
    </mtr>
    <mtr>
      <mtd />
      <mtd>
        <mn>4</mn>
      </mtd>
      <mtd>
        <mn>5</mn>
      </mtd>
      <mtd>
        <mn>7</mn>
      </mtd>
      <mtd data-mml-elementary-decimalpos="true">
        <mn>.</mn>
      </mtd>
      <mtd>
        <mn>2</mn>
      </mtd>
    </mtr>
  </mtable>
</math>

@pkra pkra added the Accepted label Mar 1, 2017

@pkra pkra added this to the A future release milestone Mar 1, 2017

@pkra

This comment has been minimized.

Copy link
Member Author

commented Mar 1, 2017

For the record, HTML-CSS and SVG work as expected.

@dpvc

This comment has been minimized.

Copy link
Member

commented Mar 2, 2017

OK, thanks for the report. It looks like if you add two empty <mtd></mtd> elements to the end of the line with the 3's, that does resolve the problem, so you might be able to use that for now until it is fixed.

I guess the solution is to pad all lines using blank entries so that they all have the same number of columns.

@pkra

This comment has been minimized.

Copy link
Member Author

commented Mar 2, 2017

Sounds good to me.

@dpvc

This comment has been minimized.

Copy link
Member

commented Jul 7, 2017

The issue1711 branch of my fork of MathJax includes a fix for this.

@dpvc dpvc removed their assignment Jul 7, 2017

dpvc added a commit that referenced this issue Jul 10, 2017

Merge pull request #1790 from dpvc/issue1711
Fix problem with table row and column lines  #1711
@dpvc

This comment has been minimized.

Copy link
Member

commented Jul 10, 2017

==> Merged

@dpvc dpvc added Merged and removed Ready for Review labels Jul 10, 2017

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Jul 15, 2017

@dpvc

This comment has been minimized.

Copy link
Member

commented Jul 15, 2017

==> In testsuite

MathMLToDisplay/Presentation/TablesAndMatrices/issue1711.html

@dpvc dpvc added Test Available and removed Test Needed labels Jul 15, 2017

@dpvc dpvc closed this Jul 15, 2017

@dpvc dpvc added Fixed v2.7 and removed Merged labels Jul 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.