Symbolics.jl icon indicating copy to clipboard operation
Symbolics.jl copied to clipboard

Switch Latexify interface to use LaTeX strings instead of expressions

Open isaacsas opened this issue 7 months ago • 2 comments

Currently the Latex interface tries to generate Exprs to pass to Latexify via the recipes. This results in Symbolics being limited by how Latexify chooses to convert an expression into a Latex string (and any bugs that might be present there). A more flexible approach would be to use latexraw to generate strings within the Symbolics recipes, as this would allow Symbolics to then easily post-process the generated strings to customize display (and make it easier to have user-provided customization options).

isaacsas avatar Apr 11 '25 14:04 isaacsas

It is also inconsistent, as sometimes Symbolics generates strings and sometimes it generates Exprs as in https://github.com/JuliaSymbolics/Symbolics.jl/blob/60a414e633c6abead5ad0367359f8a5f1da1cca5/src/latexify_recipes.jl#L18-L55

isaacsas avatar Apr 11 '25 14:04 isaacsas

Yes it would be nice to just make latex strings.

ChrisRackauckas avatar Apr 11 '25 20:04 ChrisRackauckas