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

Always evaluate \raiseto and \tothe input #682

Open
josephwright opened this issue Aug 16, 2023 · 1 comment
Open

Always evaluate \raiseto and \tothe input #682

josephwright opened this issue Aug 16, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@josephwright
Copy link
Owner

Comes up from https://tex.stackexchange.com/questions/693582/bug-in-siunitx/693608. Currently, \tothe assumes that the input is a simple value. This means if no further maths takes place, it is simply printed even if a complex value. However, adding \per forces evaluation and a potentially a confusing error. There should be finer control of this: likely such a change would need to go with a way to convert decimals to fractions.

@josephwright josephwright self-assigned this Aug 16, 2023
@josephwright josephwright added the enhancement New feature or request label Aug 16, 2023
@josephwright josephwright added this to the v3.4 milestone Aug 16, 2023
@lhy7889678
Copy link

There is another use case where mathmatical expressions in \tothe is desired. In chemical kinetics, the unit of rate constant is usually written as \unit{\mole\tothe{1 - \alpha}\liter\tothe{\alpha - 1}\per\second}, where \alpha is the overall reaction order. When we don't know the reaction order in advance (for example, when we are faced with a completely new reaction and we want to determine its kinetic properties by multivariate fitting), such expressions will be useful. However, if we turn off parse-units, \per will be printed as a slash whatever per-mode is, which may cause inconsistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants