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

leading 0s in e exponential expressions #741

Open
Overcraft90 opened this issue Jul 20, 2024 · 4 comments
Open

leading 0s in e exponential expressions #741

Overcraft90 opened this issue Jul 20, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Overcraft90
Copy link

Overcraft90 commented Jul 20, 2024

Hi there,

as per this issue I was having some trouble of parsing leading zeros in expressions with e exponential.

The solution provided seems to be working just fine; however, I was wondering whether there is something that could be done to implement this feature in siunitx. Thanks!

\documentclass[12pt]{report}

\usepackage{siunitx}
\sisetup{output-exponent-marker=\ensuremath{\mathrm{e}}}

\begin{document}

\dots (error rate: \num{4.11e-07} and \num{1.89e-07}).

\end{document}
@josephwright
Copy link
Owner

There's no issue with parsing here, rather it's about what you want to see as output. The model in siunitx with numbers is to normalise leading zeros, as these are typically not mathematically required. That said, there are options for minimum digits in the integer and decimal parts. I can look at a similar feature for exponents. However, it would be useful to have an idea of where you are using this type of formatting - it's well outside the norm.

@josephwright josephwright added the enhancement New feature or request label Jul 20, 2024
@Overcraft90
Copy link
Author

Overcraft90 commented Jul 20, 2024

@josephwright thanks for adding a code block and for the explanation. I understand as well this is unconventional; however, I'm evaluating the quality of some genome assemblies and the software I'm using returns an estimate for the error in k-mers count after a genome is assembled starting from raw data.

This tool outputs such values with the leading 0s, and I simply wished to report them as such. Thanks again, let me know!

@josephwright
Copy link
Owner

I'm gong to need to see some use of this in professionally-typeset material.

@Overcraft90
Copy link
Author

Overcraft90 commented Oct 8, 2024

@josephwright for the moment it's not urgent as I have submitted my thesis. I think we can close this issue for now since it was mostly restricted to my particular use case. Thanks again.

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