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

\hline not working after \cr #3734

Closed
psymonmarkrine opened this issue Oct 6, 2022 · 4 comments · Fixed by #3735 or zadam/trilium#4417
Closed

\hline not working after \cr #3734

psymonmarkrine opened this issue Oct 6, 2022 · 4 comments · Fixed by #3735 or zadam/trilium#4417

Comments

@psymonmarkrine
Copy link

  • \\ is OK
\begin{array}{}
  a & b \\ \hline
  c & d
\end{array}

hline_true

  • \newline makes a parsing error
\begin{array}{}
  a & b \newline \hline
  c & d
\end{array}

hline_false

https://katex.org/#demo

@ronkok
Copy link
Collaborator

ronkok commented Oct 7, 2022

\newline \hline does not work in LaTeX, either.

Since KaTeX emulates LaTeX, this really doesn't qualify as a bug. I'm not sure why \newline works at all. It doesn't work in LaTeX.

@psymonmarkrine
Copy link
Author

I had mistakenly thought that \newline could be substituted for \\ until now.
Thank you for correcting my mistake.

Moreover, may I confirm one more thing?
I checked with Overleaf and indeed \newline does not work in an array environment.
However, \cr \hline work in LaTeX.

overleaf_cr_hline

\cr \hline does not work in KaTeX.

katex_cr_hline

Does this qualify as a bug?

@psymonmarkrine psymonmarkrine changed the title \hline not working after \newline \hline not working after ~~\newline~~ \cr Oct 7, 2022
@psymonmarkrine psymonmarkrine changed the title \hline not working after ~~\newline~~ \cr \hline not working after ~~ \newline ~~ \cr Oct 7, 2022
@psymonmarkrine psymonmarkrine changed the title \hline not working after ~~ \newline ~~ \cr \hline not working after \newline \cr Oct 7, 2022
@ronkok
Copy link
Collaborator

ronkok commented Oct 7, 2022

Yep, that's a bug. I'll look into it. It may be a few days before I get there.

@ronkok ronkok changed the title \hline not working after \newline \cr \hline not working after \cr Oct 7, 2022
edemaine pushed a commit that referenced this issue Oct 22, 2022
Support `\hline` when it occurs after a `\cr` within an environment

Fixes #3734
KaTeX-bot added a commit that referenced this issue Oct 22, 2022
## [0.16.3](v0.16.2...v0.16.3) (2022-10-22)

### Bug Fixes

* \hline after \cr ([#3735](#3735)) ([ebf6bf5](ebf6bf5)), closes [#3734](#3734)
@KaTeX-bot
Copy link
Member

🎉 This issue has been resolved in version 0.16.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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