Skip to content

Commit

Permalink
only do replacements in compound strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Oct 20, 2024
1 parent a1a3179 commit ae7aab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/latexify_recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ function _toexpr(O)
if issym(O)
sym = string(nameof(O))
sym = replace(sym, NAMESPACE_SEPARATOR => ".")
sym = Latexify.unicode2latex(sym)
sym = replace(sym, "_"=>"\\_")
if length(sym) > 1
sym = Latexify.unicode2latex(sym)
sym = replace(sym, "_"=>"\\_")
return LaTeXString(string("\\texttt", "{", sym, "}"))
else
return Symbol(sym)
Expand Down

0 comments on commit ae7aab9

Please sign in to comment.