Skip to content

Commit

Permalink
ENH: group decay node in decay LaTeX rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Apr 29, 2024
1 parent a387b25 commit c0568ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ampform_dpd/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ def render_arrow(node: IsobarNode) -> str:
to = render_arrow(obj)
child1 = aslatex(obj.child1, **kwargs)
child2 = aslatex(obj.child2, **kwargs)
return Rf"{parent} {to} {child1} {child2}"
latex = Rf"{parent} {to} {child1} {child2}"
if isinstance(obj.parent, State):
return latex
return Rf"\left({latex}\right)"


@aslatex.register(ThreeBodyDecay)
Expand Down

0 comments on commit c0568ec

Please sign in to comment.