erwanp / pytexit

Convert a Python expression to a LaTeX formula
https://pytexit.readthedocs.io/
Other
114 stars 31 forks source link

Issue #52 Add global variables #58

Closed OfirSiboni closed 1 year ago

OfirSiboni commented 2 years ago

Hey, added 2 global variables, PRINT_FORMULA and PRINT_LATEX so users can change them and not pass it every time they call the function.

codecov[bot] commented 2 years ago

Codecov Report

Merging #58 (39d7c8f) into master (f4f97df) will decrease coverage by 0.99%. The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
- Coverage   81.21%   80.22%   -1.00%     
==========================================
  Files          13       13              
  Lines         607      612       +5     
==========================================
- Hits          493      491       -2     
- Misses        114      121       +7     
Impacted Files Coverage Δ
pytexit/pytexit.py 71.18% <60.00%> (-10.30%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f4f97df...39d7c8f. Read the comment docs.

erwanp commented 2 years ago

Does your code work if you use

import pytexit
pytexit.PRINT_FORMULA = False

py2tex("...")

?

If so, you should mention such an example in the py2tex() docstring; and maybe in the Notes of the documentation (edit this file ) so that other users can easily use your changes

erwanp commented 1 year ago

(linting error only, mergin)