diff --git a/src/latexify_recipes.jl b/src/latexify_recipes.jl index 7f801b6c9..65b881411 100644 --- a/src/latexify_recipes.jl +++ b/src/latexify_recipes.jl @@ -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 @@ -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) diff --git a/src/rewrite-helpers.jl b/src/rewrite-helpers.jl index f3279f8bd..9cfe72ecb 100644 --- a/src/rewrite-helpers.jl +++ b/src/rewrite-helpers.jl @@ -34,7 +34,7 @@ end """ hasnode(c, x) -Returns true if any part of `x` fufills the condition given in c. c can be a function or an expression. +Returns true if any part of `x` fulfills the condition given in c. c can be a function or an expression. If it is a function, returns true if x is true for any part of x. If c is an expression, returns true if x contains c. @@ -76,7 +76,7 @@ end """ filterchildren(c, x) -Returns all parts of `x` that fufills the condition given in c. c can be a function or an expression. +Returns all parts of `x` that fulfills the condition given in c. c can be a function or an expression. If it is a function, returns everything for which the function is `true`. If c is an expression, returns all expressions that matches it.