Skip to content

Commit

Permalink
Update latex_to_html_name in utilities.py
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo-rodrigues authored Jun 11, 2024
1 parent 01d35fb commit b0437bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/particle/particle/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def latex_to_html_name(name: str) -> str:
"""Conversion of particle names from LaTeX to HTML."""
name = re.sub(r"\^\{(.*?)\}", r"<SUP>\1</SUP>", name)
name = re.sub(r"\_\{(.*?)\}", r"<SUB>\1</SUB>", name)
name = re.sub(r"\^\\prime(.*?)", r"<SUP>&#8242;</SUP>", name)
name = re.sub(r"\\prime(.*?)", r"&#8242;", name)
name = re.sub(r"\\mathrm\{(.*?)\}", r"\1", name)
name = re.sub(r"\\left\[(.*?)\\right\]", r"[\1] ", name)
Expand Down

0 comments on commit b0437bf

Please sign in to comment.