mirror of https://github.com/mpastell/Weave.jl
Merge branch 'noalign'
commit
f2773376d9
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue