-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update physica.typ #23
Conversation
Makes i and j dotless when under a vector arrow.
Thanks! But I prefer creating minimum surprises for the users. I've seen math expressions where the accented i and j still have their dots, so I'd like to allow users to write just that. If a user want to have dotless i and j when an accent is present like , they can do so explicitly, e.g.
or if they want dotless i and j throughout the paper:
|
I understand that! It just seemed obvious to me that accentuated i and j should be dotless, since all of my teachers have been doing that. |
Hi, I find it kind of clumsy, imho.. 😢 Typst currently doesn't support set rules for custom functions, so it seems you will have to specify the Yeah I get that in many contexts accented vectors of i and j are dotless, as I've ran into them myself, but I still don't feel the the weight is heavy enough to tip the balance. Maybe you could define a variables with |
I definitely think that an option to get the behavior of the dotless letters would improbe this package, but I am not sure what the best implementation would be. To circumvent the non-existence of set rules for custom functions, you could create a boolean variable, which the user can switch and then in the package code an if-expression which defines the function either in the old way or in the new way of the original commit. But to be honest I don't really like this solution, as this is really clumsy. I am not sure, if the Edit: I don't think the boolean variable way would work unfortunately. |
After further thinking, I'd probably wait until there is some easier way for setting global package options supported. Right now it feels quite hacky for such a small feature. (FYI: This is what 🔥PgSuper🔥 on Discord said regarding package options:
however , the problem is that it makes package functions contextual, so they all return opaque content removing the context keyword will help with that (they wont return opaque content anymore), but then you will always need to be inside a context to use something from the package, i.e. you'd write #context something-from-package() i.e. your package is defined as
then, in your document
right now these are the two approaches for global options (state and function returning functions), in the future it's possible we will have more ergonomic approaches though |
Thanks! I'll close this for now. |
Makes i and j dotless when under a vector arrow.