mirror of https://github.com/mpastell/Weave.jl
parent
f1b42156e1
commit
6c2f0a7bb5
|
@ -131,25 +131,27 @@ function format_chunk(chunk::DocChunk, formatdict, docformat::JMarkdown2HTML)
|
|||
return string(Documenter.Writers.HTMLWriter.mdconvert(m))
|
||||
end
|
||||
|
||||
if VERSION < v"v0.6.0-362b271"
|
||||
#Fixes to Base latex writer
|
||||
function Base.Markdown.latex(io::IO, md::Base.Markdown.Paragraph)
|
||||
println(io)
|
||||
for md in md.content
|
||||
Base.Markdown.latexinline(io, md)
|
||||
end
|
||||
println(io)
|
||||
end
|
||||
function Base.Markdown.latex(io::IO, md::Base.Markdown.Paragraph)
|
||||
println(io)
|
||||
for md in md.content
|
||||
Base.Markdown.latexinline(io, md)
|
||||
end
|
||||
println(io)
|
||||
end
|
||||
|
||||
function wrapverb(f, io, cmd)
|
||||
print(io, "\\", cmd, "|")
|
||||
f()
|
||||
print(io, "|")
|
||||
end
|
||||
function wrapverb(f, io, cmd)
|
||||
print(io, "\\", cmd, "|")
|
||||
f()
|
||||
print(io, "|")
|
||||
end
|
||||
|
||||
function Base.Markdown.latexinline(io::IO, code::Base.Markdown.Code)
|
||||
wrapverb(io, "verb") do
|
||||
print(io, code.code)
|
||||
end
|
||||
function Base.Markdown.latexinline(io::IO, code::Base.Markdown.Code)
|
||||
wrapverb(io, "verb") do
|
||||
print(io, code.code)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue