-
Notifications
You must be signed in to change notification settings - Fork 330
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
LaTeX equation line break operator stopped working for book project #8121
Comments
Can you try updating to the 1.4 prereleases? https://github.com/quarto-dev/quarto-cli/releases |
In case you reproduce using 1.4, please share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? Thanks. You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````qmd
---
title: "Reproducible Quarto Document"
format: html
engine: knitr
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
```
![A placeholder image](https://placehold.co/600x400.png)
The end.
```` |
Yes, the behavior is still present in 1.4, and I'm rendering a HTML document. The book is in a repo, and the example that I used is here. You can see it rendered in this section. I haven't pushed the 1.4 version yet though. If you would like me to do that, let me know. ---
title: "Reproducible Quarto Document"
format: html
engine: knitr
---
$$
B y_t = y_{t-1} \\
B^2 y_t = y_{t-2}
$$ |
By inspecting the source of your own "expected behavior" vs "observed behavior", you had to add |
Yeah, I can use that, but it's kind of a hack. I think the {aligned} purpose is to align multiple equations. It also means that the places I haven't used {aligned} in the book will be affected if I ever edit and re-render them. In other words, I'll have to redo the sections where I haven't used {aligned}. |
It seems you are targeting HTML output right ? The linebreak issue with Mathajx is a known MathJax 3 limitation It was discussed previously in this repo and also on the web I am surprised this was working for you with a previous quarto version unless you where somehow using Mathjax 2. Regarding the use of Probably this will be fixed in HTML with Mathjax v4 In the meantime, you could also switch to KaTeX for math rendering in HTML as I think it supports So considering all this, I am curious how this worked on your side with Mathjax. Do you still have a page in your book rendered with previous Quarto version ? |
Geez. I'm feeling a little gaslit 😅. I can't find me using it like I'm describing anywhere! Every place where I have multiline equation blocks, I'm always aligning them anyways. I know I've wanted to do it without aligning at least twice in the last week or so, and I just ended up splitting them into separate blocks. I guess maybe I'm remembering doing it that way back when I was creating equation image files with quicklatex or something. Evidently it's not that big of a deal (for me at least). Sorry for the fuss 😬. |
No worries ! Thanks for reaching out ! I'll close this if you don't mind - this is really a Mathjax 3 limitation for now and the behavior will depend on its evolution, and then Quarto / Pandoc support. |
Bug description
After updating to Quarto 1.3.340, the latex equation line break operator,
\\
, stopped working in "display math" blocks for my book project. Inside the RStudio visual editor, the line break operator still works as intended, but after rendering the document, the equations are inline instead of multiline.Steps to reproduce
Expected behavior
Actual behavior
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: