diff --git a/docs/src/documenter.md b/docs/src/documenter.md index ac56022..361c943 100644 --- a/docs/src/documenter.md +++ b/docs/src/documenter.md @@ -41,9 +41,9 @@ if we set `documenter = true`: ```` is replaced with notebook compatible ``` - \begin{equation} + $$ \int f dx - \end{equation} + $$ ``` ### [`Literate.script`](@ref): diff --git a/src/Literate.jl b/src/Literate.jl index 62df503..6f9adcb 100644 --- a/src/Literate.jl +++ b/src/Literate.jl @@ -157,7 +157,7 @@ function replace_default(content, sym; push!(repls, r"^#!nb.*\n?"m => "") # remove #!nb lines push!(repls, r"^#jl.*\n?"m => "") # remove leading #jl lines push!(repls, r"^#!jl "m => "") # remove leading #!jl - push!(repls, r"```math(.*?)```"s => s"\\begin{equation}\1\\end{equation}") + push!(repls, r"```math(.*?)```"s => s"$$\1$$") else # sym === :jl push!(repls, r"^#md.*\n?"m => "") # remove #md lines push!(repls, r"^#!md "m => "") # remove leading #!md diff --git a/test/runtests.jl b/test/runtests.jl index 1040145..8e4ea38 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -611,9 +611,9 @@ end """ "source": [ "Some math:\\n", - "\\\\begin{equation}\\n", + "\$\$\\n", "\\\\int f(x) dx\\n", - "\\\\end{equation}" + "\$\$" ] """,