Browse Source

Use $$...$$ instead of equation environment (#72)

pull/76/head
David Widmann 6 years ago committed by Fredrik Ekre
parent
commit
84c11dd041
  1. 4
      docs/src/documenter.md
  2. 2
      src/Literate.jl
  3. 4
      test/runtests.jl

4
docs/src/documenter.md

@ -41,9 +41,9 @@ if we set `documenter = true`: @@ -41,9 +41,9 @@ if we set `documenter = true`:
````
is replaced with notebook compatible
```
\begin{equation}
$$
\int f dx
\end{equation}
$$
```
### [`Literate.script`](@ref):

2
src/Literate.jl

@ -157,7 +157,7 @@ function replace_default(content, sym; @@ -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

4
test/runtests.jl

@ -611,9 +611,9 @@ end @@ -611,9 +611,9 @@ end
"""
"source": [
"Some math:\\n",
"\\\\begin{equation}\\n",
"\$\$\\n",
"\\\\int f(x) dx\\n",
"\\\\end{equation}"
"\$\$"
]
""",

Loading…
Cancel
Save