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

ENH: split latex expressions with terms_per_line #414

Merged
merged 8 commits into from
May 1, 2024

Conversation

redeboer
Copy link
Member

@redeboer redeboer commented May 1, 2024

The ampform.io.aslatex() function got a new keyword argument, terms_per_line, that allows splitting sympy.Exprs over multiple lines in a LaTeX array. By default, equations are not split, but setting it to terms_per_line=1 or any other positive integer, splits expressions that are an addition of multiple terms over multiple lines. This is particularly useful for large amplitude expressions, e.g. (generated with aslatex(..., terms_per_line=1)):

@redeboer redeboer added the ⚙️ Enhancement Improvements and optimizations of existing features label May 1, 2024
@redeboer redeboer added this to the 0.15.2 milestone May 1, 2024
@redeboer redeboer self-assigned this May 1, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@redeboer redeboer changed the title ENH: split sum expressions with terms_per_line ENH: split latex expressions with terms_per_line May 1, 2024
@redeboer redeboer enabled auto-merge (squash) May 1, 2024 15:16
@redeboer redeboer merged commit c190cb0 into ComPWA:main May 1, 2024
22 checks passed
@redeboer redeboer deleted the multiline-latex branch May 1, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Enhancement Improvements and optimizations of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant