Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions quantities/markup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def format_units_latex(udict,font='mathrm',mult=r'\\cdot',paren=False):
'''
Replace the units string provided with an equivalent latex string.

Division (a/b) will be replaced by \frac{a}{b}.
Division (a/b) will be replaced by \\frac{a}{b}.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has not been fixed yet

Division (a/b) will be replaced by \frac{a}{b}.


Exponentiation (m**2) will be replaced with superscripts (m^{2})

Expand All @@ -100,7 +100,7 @@ def format_units_latex(udict,font='mathrm',mult=r'\\cdot',paren=False):
By default this is the latex \\cdot symbol. Other useful
options may be '' or '*'.

If paren=True, encapsulate the string in '\\left(' and '\right)'
If paren=True, encapsulate the string in '\\left(' and '\\right)'
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one of the two errors on this line had been fixed

If paren=True, encapsulate the string in '\\left(' and '\right)'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... but it does look like this one is actually fixed by #196


The result of format_units_latex is encapsulated in $. This allows the result
to be used directly in Latex in normal text mode, or in Matplotlib text via the
Expand Down