-
Notifications
You must be signed in to change notification settings - Fork 370
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
Alignment of complex numbers #2756
Conversation
Oops, I need to fix an overflow in the tests. |
In "very_big_column_name_4" there should also be a test case with negative real part. |
Good catch! I have updated the code. Let's see if the test passes. |
@nalimilan - can you please have a quick look if you agree with the rules used? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Just a few style comments.
(Ideally I would say that in addition to aligning on the sign of the imaginary parts, the real parts should be aligned like real numbers, and imaginary parts should be aligned like real numbers, but Base doesn't do this either since that would require adding spaces in the middle of the number...)
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Yes, this would be good but involve some changes in PrettyTables.jl. What we need to implement is the support for multiple anchors, so that we can have multiple alignments. It is not an easy task. I think I resolved all @nalimilan's comments! |
This is what I would imagine. I would leave it for later. I think we have more pivotal functionalities (like HTML/LaTeX support) that should get a higher priority. |
@ronisbr - OK to merge? |
Yes! |
Thank you! |
Hi!
This PR should fix #2754 . However, it adds somewhat complex regexes, which can decrease performance, and have some corner case that I did not think of. Thus, I need help testing this algorithm :)