symengine icon indicating copy to clipboard operation
symengine copied to clipboard

Latex lower index conversion

Open hejfil opened this issue 11 months ago • 3 comments

Hello, would be possible to convert greek letters in lower index also to latex or I am doing something wrong ?

Example:


const std::string formulaStr1 = "k_y_theta * chi_theta_y";
SymEngine::Expression expresion = SymEngine::parse(formulaStr1);
std::string d = SymEngine::latex(*expresion.get_basic());

result d is \chi_{theta_y} k_{y_{theta}} but I would expect \chi_{\theta_y} k_{y_{\theta}}

hejfil avatar May 02 '25 18:05 hejfil

Seems to be possible, but do you also expect more than two levels of subscripts?

rikardn avatar May 05 '25 08:05 rikardn

Yes, I also expect more than two levels of subscripts

hejfil avatar May 05 '25 08:05 hejfil

Since multiple levels of subscripts seems to be supported the bug here must be that "greekification" is only supported at the topmost level and not in any of the subscript levels.

rikardn avatar May 05 '25 08:05 rikardn

@hejfil, now that #2098 is merged, do you think this issue can be closed?

bjodah avatar Jul 16 '25 08:07 bjodah

It works and is solved from my point of view. Thank you very much for the fix.

k_y_theta_com Image

hejfil avatar Aug 08 '25 05:08 hejfil