py2latex.siunit

Functions:

SI(quantity[, per_mode])

Create an siunitx-formatted formula from an astropy.units unit.

si(unit[, per_mode])

Create an siunitx-formatted formula from an astropy.units unit.

SI(quantity, per_mode='symbol')[source]

Create an siunitx-formatted formula from an astropy.units unit.

Parameters
  • quantity (Quantity)

  • per_mode (Literal['repeated-symbol', 'symbol', 'fraction', 'symbol-or-fraction', 'reciprocal']) – Default 'symbol'.

Returns

Return type

str

si(unit, per_mode='symbol')[source]

Create an siunitx-formatted formula from an astropy.units unit.

Parameters
  • unit (UnitBase)

  • per_mode (Literal['repeated-symbol', 'symbol', 'fraction', 'symbol-or-fraction', 'reciprocal']) – Default 'symbol'.

Returns

Return type

str