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

array options, \vlines and \hlines and some bugs #244

Open
iagobaapellaniz opened this issue Nov 13, 2024 · 2 comments
Open

array options, \vlines and \hlines and some bugs #244

iagobaapellaniz opened this issue Nov 13, 2024 · 2 comments

Comments

@iagobaapellaniz
Copy link

iagobaapellaniz commented Nov 13, 2024

While

\begin{array}{lcr}
1 & 2 & 3 \\
4 & 5 & 6 \\
\end{array}

is parsed correctly,

\begin{array}{l cr}
1 & 2 & 3 \\\hline
   & 5 & 6 \\
\end{array}

is not. I tried all of them separately.

Note three types of issues

  • Array options should at least be normalized removing spaces. It crashes if it finds some space between lcr letters.
  • \hline is not ignored when the first item in the next row is empty and crashes as well.
  • \hlines seems to be ignored by default

Besides that, I want to do a simple Ruffini table for my students. I think these features could be added. I mean vlines, hlines, etc.

UPDATE: Could vertical and horizontal lines be added with rowlines and columnlines attributes?

<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow>
    <mtable rowlines="none solid" columnlines="solid none">
      <mtr>
        <mtd columnalign="center" style="text-align: center" />
        <mtd columnalign="center" style="text-align: center">
          <mn>1</mn>
        </mtd>
        <mtd columnalign="center" style="text-align: center">
          <mn>2</mn>
        </mtd>
      </mtr>
      <mtr>
        <mtd columnalign="center" style="text-align: center">
          <mn>1</mn>
        </mtd>
        <mtd columnalign="center" style="text-align: center" />
        <mtd columnalign="center" style="text-align: center">
          <mn>1</mn>
        </mtd>
      </mtr>
      <mtr >
        <mtd columnalign="center" style="text-align: center" />
        <mtd columnalign="center" style="text-align: center">
          <mn>1</mn>
        </mtd>
        <mtd columnalign="center" style="text-align: center">
          <menclose notation="box">
            <mn>3</mn>
          </menclose>
        </mtd>
      </mtr>
    </mtable>
  </mrow>
</math>

this would render well in Firefox

@iagobaapellaniz iagobaapellaniz changed the title array options, \vlines and \hlines array options, \vlines and \hlines and some bugs Nov 13, 2024
@jgm
Copy link
Owner

jgm commented Nov 13, 2024

See #127 for a PR that was never finished that would support columnlines.

jgm added a commit that referenced this issue Nov 13, 2024
- Don't crash on array with `\hline` before blank cell.
- Skip whitespace in array column specifier.

See #244.
@jgm
Copy link
Owner

jgm commented Nov 13, 2024

I fixed the two bugs, thanks. The other issue is more complicated and would require changes in the basic types (so that lines in arrays can be represented) and changes to writers and readers for all formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants