Trivial indentation reformat.
This does not affect semantic of the code block.
This commit is contained in:
parent
c89c51cf6b
commit
0002e948c4
|
@ -74,17 +74,17 @@ class _Measurement(object):
|
|||
def __format__(self, spec):
|
||||
# special cases
|
||||
if 'Lx' in spec: # the LaTeX siunitx code
|
||||
# the uncertainties module supports formatting
|
||||
# numbers in value(unc) notation (i.e. 1.23(45) instead of 1.23 +/- 0.45),
|
||||
# which siunitx actually accepts as input. we just need to give the 'S'
|
||||
# formatting option for the uncertainties module.
|
||||
spec = spec.replace('Lx','S')
|
||||
# todo: add support for extracting options
|
||||
opts = 'separate-uncertainty=true'
|
||||
mstr = format( self.magnitude, spec )
|
||||
ustr = siunitx_format_unit(self.units)
|
||||
ret = r'\SI[%s]{%s}{%s}'%( opts, mstr, ustr )
|
||||
return ret
|
||||
# the uncertainties module supports formatting
|
||||
# numbers in value(unc) notation (i.e. 1.23(45) instead of 1.23 +/- 0.45),
|
||||
# which siunitx actually accepts as input. we just need to give the 'S'
|
||||
# formatting option for the uncertainties module.
|
||||
spec = spec.replace('Lx','S')
|
||||
# todo: add support for extracting options
|
||||
opts = 'separate-uncertainty=true'
|
||||
mstr = format( self.magnitude, spec )
|
||||
ustr = siunitx_format_unit(self.units)
|
||||
ret = r'\SI[%s]{%s}{%s}'%( opts, mstr, ustr )
|
||||
return ret
|
||||
|
||||
|
||||
# standard cases
|
||||
|
|
Loading…
Reference in New Issue