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 27, 2024
1 parent 379c56c commit 1636635
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 @@ -102,7 +102,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 1636635

Please sign in to comment.