mirror of https://github.com/mpastell/Weave.jl
Merge branch 'noalign'
commit
f2773376d9
|
@ -157,7 +157,7 @@ end
|
||||||
|
|
||||||
function html(io::IO, tex::LaTeX)
|
function html(io::IO, tex::LaTeX)
|
||||||
withtag(io, :p, :class => "math") do
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -343,5 +343,9 @@ function wrapline(text, line_width=75)
|
||||||
end
|
end
|
||||||
|
|
||||||
function latex(io::IO, tex::Markdown.LaTeX)
|
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
|
end
|
||||||
|
|
|
@ -50,9 +50,7 @@ ref_html = """<h1>H1</h1>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<p class=\"math\">\\[
|
<p class=\"math\">\\[
|
||||||
\\begin{align}
|
|
||||||
more math
|
more math
|
||||||
\\end{align}
|
|
||||||
\\]</p>
|
\\]</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>List one</p>
|
<li><p>List one</p>
|
||||||
|
|
Loading…
Reference in New Issue