Returns units in LaTeX format, without opening and closing '$'. :param units: String representing an expression with units :type units: str :return: LaTeX code of 'units' without opening or closing tags. :rtype: str
(units)
| 2399 | return integratedResult |
| 2400 | |
| 2401 | def units2TeX(units): |
| 2402 | """ |
| 2403 | Returns units in LaTeX format, without opening and closing '$'. |
| 2404 | |
| 2405 | :param units: String representing an expression with units |
| 2406 | :type units: str |
| 2407 | |
| 2408 | :return: LaTeX code of 'units' without opening or closing tags. |
| 2409 | :rtype: str |
| 2410 | """ |
| 2411 | tex = " " |
| 2412 | if type(units) == str and units != '': |
| 2413 | replacements = {} |
| 2414 | replacements['Ohm'] = 'Omega' |
| 2415 | for key in replacements.keys(): |
| 2416 | units = units.replace(key, replacements[key]) |
| 2417 | for unitpart in units.split(): |
| 2418 | tex += py2tex(unitpart, print_latex=False, |
| 2419 | print_formula=False, simplify_output=False)[2:-2] + " " |
| 2420 | return tex[:-1] |
| 2421 | |
| 2422 | def filterFunc(f_char, f_type, f_order, f_low=None, f_high=None, ripple=1): |
| 2423 | """ |
no outgoing calls
no test coverage detected