Skip to content

equation environment under $$ #9366

@likanzhan

Description

@likanzhan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingengines-juliaAnything related to Julia enginemathany issue related to math support in specific formatsupstreamBug is in upstream library

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions