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

Single characters in math mode text operator #3732

Closed
1 task done
maximilianfellhuber opened this issue Mar 20, 2024 · 3 comments
Closed
1 task done

Single characters in math mode text operator #3732

maximilianfellhuber opened this issue Mar 20, 2024 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@maximilianfellhuber
Copy link

Description

The text operator in math mode only works for strings with a minimum length of two:

$ op("m")^3 $

does not work, but

$ op("cm")^3 $

does. If this is intended, it should be documented I think.

Reproduction URL

No response

Operating system

Web app

Typst version

  • I am using the latest version of Typst
@maximilianfellhuber maximilianfellhuber added the bug Something isn't working label Mar 20, 2024
@T0mstone
Copy link
Contributor

T0mstone commented Mar 20, 2024

op(upright("m")) should work. This is due to math not actually distinguishing between m and "m", see also #1125 and #274

@jbirnick
Copy link
Contributor

jbirnick commented Mar 21, 2024

I just had the same issue and we had a discussion on the Discord. I agree this behavior should be changed. (Also see the Discord post in #support for suggestions.)

@Enivex
Copy link
Collaborator

Enivex commented Mar 21, 2024

Duplicate of #274

That being said, the post is misleading. math.op is doing what it's supposed to do. What you're presumably looking for is upright.

@Enivex Enivex closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
@Enivex Enivex added duplicate This issue or pull request already exists and removed bug Something isn't working labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants