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

math.class is not taken into account within a context expression #3727

Open
1 task done
loutr opened this issue Mar 19, 2024 · 1 comment
Open
1 task done

math.class is not taken into account within a context expression #3727

loutr opened this issue Mar 19, 2024 · 1 comment
Labels
bug Something isn't working math Related to math syntax, layout, etc.

Comments

@loutr
Copy link

loutr commented Mar 19, 2024

Description

I maintain the tiny xarrow package and the latest version 0.11 of the compiler seems to have brought a regression, which impacts the package. A minimal example is the following:

#let test = math.class("relation", "--")
$ a test b $

displays correctly, with an appropriate spacing around --, but

#let test = style(_ => math.class("relation", "--"))
// or the new #let test = context math.class("relation", "--")
$ a test b $

doesn't (it has an extra space between -- and b).

This is easily fixable in the case of xarrow for instance, where it boils down to swapping operations as in:

// where expr depends on context of course
#let test = math.class("relation", context expr)

but I figured it would be best to signal it anyway. Sorry if this is a duplicate or my mistake or anything. Thanks for your amazing work as always!

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst
@loutr loutr added the bug Something isn't working label Mar 19, 2024
@Enivex Enivex added the math Related to math syntax, layout, etc. label Mar 22, 2024
@wrzian
Copy link
Contributor

wrzian commented Apr 28, 2024

This seems like it might be related to the issue with the math-call-pass-to-box test I added? See here: #3786 (comment) If so, it would be fixed by whatever happens with #1125 and #1779 .

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 Related to math syntax, layout, etc.
Projects
None yet
Development

No branches or pull requests

3 participants