quarto-dev / quarto-dev/quarto-cli

`equation` environment under `$$`

Open
#9,366 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug engines-julia math upstream
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

My qmd file contains a julia code cell, and the output of the cell is a equation environment.
When I rendered it into a html file, it works correctly.
But when I rendered it into a latex file, it creates a latex file with the following environment

$$
\begin{equation}
ZZZ
\end{equation}
$$

When I render a latex file containing such blocks, it gives an error.

Steps to reproduce

```{julia}
using Symbolics
Symbolics.variables(:x, 1:3)
```

Expected behavior

\begin{equation}
\left[
\begin{array}{c}
x_1 \\
x_2 \\
x_3 \\
\end{array}
\right]
\end{equation}


Actual behavior


$$ \begin{equation}
\left[
\begin{array}{c}
x_1 \\
x_2 \\
x_3 \\
\end{array}
\right]
\end{equation}
 $$



Your environment

No response

Quarto check output

Quarto 1.4.553
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.553
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/likanzhan/Library/TinyTeX/bin/universal-darwin
Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.10.13 (Conda)
Path: /Users/likanzhan/.julia/conda/3/aarch64/bin/python
Jupyter: 5.7.1
Kernels: julia-1.10, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
Version: 4.3.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.25

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Julia-cell reproduction in the issue and compare the generated HTML and LaTeX output. Trace the Quarto rendering path that wraps the equation environment, then verify that the LaTeX output contains the equation environment without an enclosing $$ block and renders successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, markdown
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.