diff --git a/src/latexify_recipes.jl b/src/latexify_recipes.jl index 0e895e0be..a36fd43d3 100644 --- a/src/latexify_recipes.jl +++ b/src/latexify_recipes.jl @@ -195,12 +195,9 @@ function _toexpr(O) sym = string(nameof(O)) sym = replace(sym, NAMESPACE_SEPARATOR => ".") if length(sym) > 1 - sym = Latexify.unicode2latex(sym) - sym = replace(sym, "_"=>"\\_") - return LaTeXString(string("\\texttt", "{", sym, "}")) - else - return Symbol(sym) + sym = string("\\mathtt{", sym, "}") end + return Symbol(sym) end !iscall(O) && return O diff --git a/test/latexify_refs/integral1.txt b/test/latexify_refs/integral1.txt index d03e515c2..1c25cc18e 100644 --- a/test/latexify_refs/integral1.txt +++ b/test/latexify_refs/integral1.txt @@ -1,3 +1,3 @@ \begin{equation} -\int_{0}^{1)} \texttt{dx} x +\int_{0}^{1)} \mathtt{dx} x \end{equation} diff --git a/test/latexify_refs/integral2.txt b/test/latexify_refs/integral2.txt index 3e8ba3144..aab3f1da5 100644 --- a/test/latexify_refs/integral2.txt +++ b/test/latexify_refs/integral2.txt @@ -1,3 +1,3 @@ \begin{equation} -\int_{-\infty}^{\infty)} \texttt{dx} \left( u\left( x \right) \right)^{2} +\int_{-\infty}^{\infty)} \mathtt{dx} \left( u\left( x \right) \right)^{2} \end{equation} diff --git a/test/latexify_refs/integral3.txt b/test/latexify_refs/integral3.txt index 2857cd437..e4c62994b 100644 --- a/test/latexify_refs/integral3.txt +++ b/test/latexify_refs/integral3.txt @@ -1,3 +1,3 @@ \begin{equation} -\int_{ - z}^{u\left( x \right))} \texttt{dx} x^{2} +\int_{ - z}^{u\left( x \right))} \mathtt{dx} x^{2} \end{equation}