Support greek lambda character
Author: dbrakenhoffCreated Apr 28, 2025Updated Apr 28, 2025
Labelstriage
First off, thanks for this great package! I'm not sure if this would qualify as a bug or a feature, but it would be great to get access to the $\lambda$ character using latexify.
Environment
- OS: Ubuntu 24.04
- Python: 3.12
- Package manager: pip 24.2.1
- Latexify version: latest (https://github.com/google/latexify_py/commit/54dc8697196370dad227b0d516b42f6b82825852)
Description
I would like to use the $\lambda$ symbol in my formulas but currently that raises an error.
Reproduction
import latexify
@latexify.function(identifiers={"foo": "f", "lambda_": "lambda"}, use_math_symbols=True)
def foo(lambda_):
return lambda_ + 1
foo
This gives me a `ValueError: 'lambda' is not an identifier name.`.Expected behavior
I would expect to be allowed to use the lambda symbol in LaTeX.
If I comment out these two lines, e.g. it does not throw an error when lambda is used. Obviously those line are probably there for a reason, so I'm not sure what the consequences are when they are removed, but perhaps the restrictions on the value side of the identifiers could be a bit more lenient...?
Screenshot of the output when those lines are commented out.
Source: google/latexify_py