Repository navigation
Closed
Description
Bug description
There are still no defined Amsthm cross-reference environments in version 1.4.537 for typst output.
---
title: "Example"
format:
typst:
toc: true
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
:::{#thm-example}
$$[ x^2 + y^2 = z^2 ]$$
:::
@thm-exampleFails with...
(base) ➜ example quarto preview /.../Example.qmd --no-browser --no-watch-inputs
pandoc
to: typst
output-file: Example.typ
standalone: true
shift-heading-level-by: -1
default-image-extension: svg
wrap: none
citeproc: false
toc: true
metadata
title: Example
[typst]: Compiling Example.typ to Example.pdf...error: cannot reference block
┌─ Example.typ:255:0
│
255 │ @thm-example
│ ^^^^^^^^^^^^Which would be easily fixed with:
---
crossref:
custom:
reference-prefix: Theorem
key: thm
---Here is a newly created project.
Your environment
macOS 14.2 (23C64)
Quarto check output
quarto check
Quarto 1.4.537
[✓] 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.537
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2023.03.21
Chromium: 869685
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/.../Library/TinyTeX/bin/universal-darwin
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.9.16 (Conda)
Path: /Users/.../opt/anaconda3/bin/python
Jupyter: 5.7.0
Kernels: scala, ruby, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/.../Library/R/arm64/4.3/library
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.25
[✓] Checking Knitr engine render......OK
Activity
cscheid commentedon Jan 9, 2024
That's unfortunately not a fix: it creates a float (which requires a caption that can be moved, and a number of other things). Theorems are blocks, and their structure is fundamentally different.
You're right that we don't have theorem environments right now for Typst; we'll definitely do them soon, though!
bcdavasconcelos commentedon Jan 9, 2024
I should have written "patched" instead of "fixed", which is what I meant ;)
Thanks for looking into it!
gordonwoodhull commentedon Feb 22, 2024
Fixed on
mainby #8825cscheid commentedon Feb 22, 2024
@gordonwoodhull we should improve this for unnamed theorems, I should have checked earlier, sorry:
[-]Typst + cross-references: no defined amsthm environments in `1.4.537`[/-][+]Typst: improve unnamed theorems[/+]gordonwoodhull commentedon Feb 22, 2024
Yes, it's generating an empty string instead of omitting the parameter to
#theorem()Will fix and write tests for this.
improve unnamed theorems