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

Comma missing in aligned cases block when using Typst #11857

Open
markjholmes opened this issue Jan 14, 2025 · 1 comment
Open

Comma missing in aligned cases block when using Typst #11857

markjholmes opened this issue Jan 14, 2025 · 1 comment
Labels
bug Something isn't working math any issue related to math support in specific formats pandoc upstream Bug is in upstream library

Comments

@markjholmes
Copy link

Bug description

Comma doesn't render when the following criteria are all met:

  1. Making a pdf via Typst (format: typst)
  2. In a math block ($$ ... $$)
  3. In a "cases" block (\begin{cases} ... \end{cases})
  4. Making the lines aligned (including a & character)

Using format: pdf (i.e. via LaTeX) works fine.

Steps to reproduce

---
format: typst
---

Comma appears ok in single line

$$
a = b + c,
$$

Comma appears ok in aligned block

$$
\begin{aligned}
a = b + c,
\end{aligned}
$$

Comma appears ok in aligned block with `&`

$$
\begin{aligned}
a &= b + c,
\end{aligned}
$$

Comma appears ok in cases block
$$
\begin{cases}
a = b + c,
\end{cases}
$$

Comma **missing** in cases block with `&`
$$
\begin{cases}
a &= b + c,
\end{cases}
$$

Comma **missing** in cases block with `&` but full stop ok

$$
\begin{cases}
a &= b + c, \\
a &= b + c.
\end{cases}
$$

Image

Expected behavior

A comma should be there

Actual behavior

The comma is not there

Your environment

VSCode info:

Version: 1.97.0-insider (user setup)
Commit: 69d97b0773575a75736850370918e1171cfde5c6
Date: 2025-01-13T09:58:56.423Z
Electron: 32.2.7
ElectronBuildId: 10660205
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

WSL info (Quarto installed on WSL):

WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22631.4602

Quarto check output

Quarto 1.6.37
[✓] Checking environment information...
      Quarto cache location: /home/user_name/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.37
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.11
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/user_name/.TinyTeX/bin/x86_64-linux
      Version: 2024

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /usr/bin/python3
      Jupyter: 5.7.2
      Kernels: python3, julia-1.10

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

[✓] Checking R installation...........OK
      Version: 4.4.0
      Path: /usr/lib/R
      LibPaths:
        - /home/user_name/R/x86_64-pc-linux-gnu-library/4.4
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.49
      rmarkdown: 2.29

[✓] Checking Knitr engine render......OK
@markjholmes markjholmes added the bug Something isn't working label Jan 14, 2025
@mcanouil
Copy link
Collaborator

Quarto does not do anything on Math, this is Pandoc.

See answers from another threads:

This is not Quarto's doing, but rather Pandoc. Please create a pure-pandoc (.md file, run with pandoc) reproduction and file at https://github.com/jgm/pandoc. Thank you!

I wouldn't expect this to work in Pandoc either. LaTeX works in HTML due to MathJax; LaTeX is not ever translated by Pandoc inside of Markdown.

As a workaround I would suggest mitex via the quarto extension

https://github.com/quarto-ext/mitex

(I haven't tried this myself.)

@mcanouil mcanouil added upstream Bug is in upstream library pandoc math any issue related to math support in specific formats labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working math any issue related to math support in specific formats pandoc upstream Bug is in upstream library
Projects
None yet
Development

No branches or pull requests

2 participants