diff --git a/src/latexify_recipes.jl b/src/latexify_recipes.jl index a39ed97f22..ecbd42f6d1 100644 --- a/src/latexify_recipes.jl +++ b/src/latexify_recipes.jl @@ -28,12 +28,11 @@ const LATEX_DEFS = CatalystLatexParams() end function Latexify.infer_output(env, rs::ReactionSystem, args...) - env in [:arrows, :chem, :chemical, :arrow] && return chemical_arrows - - error("The environment $env is not defined.") - latex_function = Latexify.get_latex_function(rs, args...) - - return latex_function + if env in (:arrows, :chem, :chemical, :arrow) + return chemical_arrows + else + error("The environment $env is not defined.") + end end function processsym(s)