typst / typst

A new markup-based typesetting system that is powerful and easy to learn.
https://typst.app
Apache License 2.0
32.65k stars 875 forks source link

Subscript and backticks for raw code in math lead to bug #4607

Closed jaanli closed 1 month ago

jaanli commented 1 month ago

Description

WE are loving @typst at @onefact, and even taught a course using it! We made a template here:

https://github.com/onefact/datathinking.org-report-template/

However:

image

Typst code to reproduce:

In the above example, there would be two types of type embeddings, one for diagnosis codes— $E_`diag`$ and one for procedure codes.

Reproduction URL

https://github.com/typst/typst/issues/new?assignees=&labels=bug&projects=&template=bug.yml&title=Write+a+short+and+descriptive+title%21

Operating system

Web app, Windows, Linux, macOS

Typst version

Enivex commented 1 month ago

This isn't a bug, the backtick syntax for raw simply isn't active in math mode. You don't need subscripts to exhibit this behavior. You want #`diag`