Skip to content

Script function is ignored in text mode #4303

@ludwig-austermann

Description

@ludwig-austermann

Description

Hello,
today I encountered an issue with one of my packages. Essentially, the error occurred because of typst v0.11 and v0.10 behave differently. The following code

#set text(font: "Cascadia Code")

Hello #math.script("World") $script("World")$ #math.script($"World"$)

#math.frac("hello", "world") $"hello"/"world"$

yields:

v0.11.1 v0.10.0
ouset test ouset test(1)

Notice, how math.script does not imply math mode, whereas math.frac does.

Either way, some behaviour would be wrong. In my opinion, the situation before v0.11 is correct, as it allows easier access to math mode — also inside code environments.

Reproduction URL

No response

Operating system

Web app

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmathRelated to math category, with its syntax, layout, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions