2015-01-04 14:18:17 +01:00
|
|
|
|
2015-01-06 23:01:25 +01:00
|
|
|
type WeaveDoc
|
|
|
|
source::String
|
|
|
|
basename::String
|
|
|
|
path::String
|
|
|
|
chunks::Array
|
|
|
|
cwd::String
|
|
|
|
format
|
|
|
|
function WeaveDoc(source, chunks)
|
|
|
|
path, fname = splitdir(abspath(source))
|
|
|
|
basename = splitext(fname)[1]
|
|
|
|
new(source, basename, path, chunks, "", nothing)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2015-01-04 14:18:17 +01:00
|
|
|
type CodeChunk
|
|
|
|
content::String
|
|
|
|
number::Int
|
|
|
|
start_line::Int
|
|
|
|
option_string::String
|
|
|
|
options::Dict{Symbol, Any}
|
|
|
|
output::String
|
2015-01-05 15:35:24 +01:00
|
|
|
figures::Array{String}
|
2015-01-04 14:18:17 +01:00
|
|
|
function CodeChunk(content, number, start_line, option_string, options)
|
|
|
|
new(content, number, start_line, option_string, options, "", String[])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
type DocChunk
|
|
|
|
content::String
|
|
|
|
number::Int
|
|
|
|
start_line::Int
|
|
|
|
end
|