-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add parentheses to units in \per
mode in console output
#40
Comments
\per
mode in console output
I find this difficult as |
I refer to the console output, not the output to |
I know. But both should be built upon the same logic. |
But for However, in the console, we don't have a fraction available. Instead, a meaningful representation of If the user specifies And last but not least: I don't think we should go as far as allowing customization of the printouts to the console. These printouts just serve as a first glance for the variable and are mainly intended for Jupyter notebooks. The core of ResultWizard is still the output in a siunitx-compatible format. |
I see the following problem: Depending on the mode used in
|
As far as I know, Also see the documentation |
...but only if you use multiple |
Now I see the confusion: my original comment in this post is then wrong, that's true.
You probably have to build a small Lexer to achieve this. |
maybe use the same "parentheses logic" for the numerator as well to print |
This, I don't get again. We can only do such grouping, if we analyze the user's unit string more deeply, i.e. detect whether there are multiple |
Yes, exactly, that's what I mean with
If you like, I can support you with this task as I have a tiny bit of knowledge in compiler construction |
I added a small lexer. |
Consider this:
will print:
The unit representation might be misleading. Instead, I'd expect something like
(mm s)/(N kg)
. This is also whatsiunitx
is doing when users specifyper-mode=symbol
in the\sisetup{}
.Edit: My assumptions how siunitx parses the input were wrong in this issue. See the discussion below for how it looks like in reality, i.e. in this example, we'd expect
(mm s kg) / N
.The text was updated successfully, but these errors were encountered: