Skip to content

Commit

Permalink
Fix Unicode NAMESPACE_SEPARATOR and subscripts in latex output
Browse files Browse the repository at this point in the history
Fixes #1288
  • Loading branch information
ChrisRackauckas committed Oct 11, 2024
1 parent af8a07c commit 198e156
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/latexify_recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ recipe(n) = latexify_derivatives(cleanup_exprs(_toexpr(n)))
cdot --> false
fmt --> FancyNumberFormatter(5)
index --> :subscript
snakecase --> true
safescripts --> true

return recipe(n)
end
Expand Down Expand Up @@ -189,7 +191,10 @@ function _toexpr(O)
return frac_expr
end
end
issym(O) && return nameof(O)
if issym(O)
sym = string(nameof(O))
return Symbol(replace(sym, NAMESPACE_SEPARATOR => "."))
end
!iscall(O) && return O

op = operation(O)
Expand Down

0 comments on commit 198e156

Please sign in to comment.