-
Notifications
You must be signed in to change notification settings - Fork 394
Open
Labels
bugSomething isn't workingSomething isn't workingmathany issue related to math support in specific formatsany issue related to math support in specific formatspandoctypstupstreamBug is in upstream libraryBug is in upstream library
Description
Bug description
- Using the formats
typstanddocxcause\Vertto be rendered with too much space. This does not happen with the formatshtmlorpdfwhich produce the correct output. This issue does not happen with other delimiters likefloorandceil. - For some reason,
\vertis rendered correctly withdocx(and the other formats), but not withtypst. \vertand\Vertare not expanded to their full size when using\leftand\rightintypst, but is correct withhtml,pdf, anddocx.typstalso seams to automatically enlarge other delimiters likeflooreven when\leftand\rightis not given. This may be the intended behavior for typst and I don't think anyone would complain about this, but I am pointing out that it is at least inconsistent with the other 3 formats.
Steps to reproduce
---
format: typst
---
`format: typst`
This is the absolute value of a number using `\lvert` and `\rvert`: $\lvert x \rvert$.
You could just use `\vert`: $\vert x\vert$.
This is the norm of a vector using the pair `\lVert` and `\rVert`: $\lVert v \rVert$.
You could just use `\Vert` and get this result: $\Vert v \Vert$.
Here is a big equation without `\left` and `\right`,
$$
\lVert \sum_{i=1}^n a_i \rVert,
$$
and now with `\left` and `\right`,
$$
\left\lVert \sum_{i=1}^n a_i \right\rVert.
$$
This is the floor and ceiling of a number $\lfloor x \rfloor \leq x \leq \lceil x \rceil$.
Here is the floor of a big equation without `\left` and `\right`,
$$
\lfloor \sum_{i=1}^n a_i \rfloor,
$$
and now with `\left` and `\right`,
$$
\left\lfloor \sum_{i=1}^n a_i \right\rfloor.
$$
Expected behavior
I expect all four formats to produce the same visual output.
With the format typst, correct spacing and height can be achieved with the raw code within Quarto:
```{=typst}
$norm(v)$
``` but of course this only works with the format typst and must be retyped when switching to other formats.
Actual behavior
Here are the outputs for the 4 formats.
typst

docx

html

pdf

Your environment
- VSCode 1.91.1
- Windows 11
Quarto check output
Quarto 1.5.55
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.5.55
Path: C:\Program Files\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[>] Checking LaTeX....................OK
Tex: (not detected)
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.11.9
Path: C:/Users/Nicholas/AppData/Local/Programs/Python/Python311/python.exe
Jupyter: 5.7.2
Kernels: julia-1.10, python3
[>] Checking Jupyter engine render....OK
[>] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmathany issue related to math support in specific formatsany issue related to math support in specific formatspandoctypstupstreamBug is in upstream libraryBug is in upstream library