latexify_py
latexify_py copied to clipboard
Config class
Follows #65
It may be good if we provide a config class integrating every setting, which are currently passed directly to with_latex
:
import latexify
config = latexify.Config.defaults()
config.use_math_symbols()
config.expand_function("expit")
@latexify.with_latex(config)
def f(x):
return expit(x)
# Will generate: \mathrm{f}(x) \triangleq \frac{1}{1+\exp{(-x)}}
possible logic:
inner_config = copy(config if config is not None else Config.defaults())
for each kwarg:
inner_config.update(kwarg)
inner_process(fn, inner_config)
working on this
@chunibyo-wly Thanks for working on this. Since this feature should be carefully designed, could you provide your idea about the implementation before throwing PRs?
hello, thanks for your reply, could you please give me some time to do some tests? I will give you answer later
@chunibyo-wly Sure. I targeted this feature on the release after the next (0.3) so we don't need to rush at this point.