Merge branch 'noalign'

pull/185/merge
Matti Pastell 2019-02-27 16:43:15 +02:00
commit f2773376d9
3 changed files with 6 additions and 4 deletions

View File

@ -157,7 +157,7 @@ end
function html(io::IO, tex::LaTeX)
withtag(io, :p, :class => "math") do
write(io, string("\\[\n\\begin{align}\n", tex.formula, "\n\\end{align}\n\\]"))
write(io, string("\\[\n", tex.formula, "\n\\]"))
end
end

View File

@ -343,5 +343,9 @@ function wrapline(text, line_width=75)
end
function latex(io::IO, tex::Markdown.LaTeX)
write(io, string("\n\\begin{align}\n", tex.formula, "\n\\end{align}\n"))
math_envs = ["align", "equation", "eqnarray"]
use_dollars = !any([occursin("\\begin{$me", tex.formula) for me in math_envs])
use_dollars && write(io, "\\[")
write(io, string("\n", tex.formula, "\n"))
use_dollars && write(io, "\\]\n")
end

View File

@ -50,9 +50,7 @@ ref_html = """<h1>H1</h1>
</div>
<hr />
<p class=\"math\">\\[
\\begin{align}
more math
\\end{align}
\\]</p>
<ul>
<li><p>List one</p>