mirror of https://github.com/mpastell/Weave.jl
added :displaysize as chunk option and chunks now respect displaysize
parent
381de22c7d
commit
b5a0e8652b
|
@ -17,8 +17,9 @@ const _DEFAULT_PARAMS = Dict{Symbol,Any}(
|
|||
:term => false,
|
||||
:prompt => "julia>",
|
||||
:label => nothing,
|
||||
:wrap => true,
|
||||
:wrap => false,
|
||||
:line_width => 75,
|
||||
:displaysize => displaysize(),
|
||||
:fig_ext => nothing,
|
||||
:fig_pos => nothing,
|
||||
:fig_env => nothing,
|
||||
|
|
|
@ -260,7 +260,11 @@ function eval_chunk(doc::WeaveDoc, chunk::CodeChunk, report::Report, mod::Module
|
|||
chunk.options[:out_width] = report.format.out_width
|
||||
end
|
||||
|
||||
chunk.result = run_code(doc, chunk, report, mod)
|
||||
# Get the default `displaysize`.
|
||||
lines, cols = chunk.options[:displaysize]
|
||||
chunk.result = withenv("LINES" => lines, "COLUMNS" => cols) do
|
||||
run_code(doc, chunk, report, mod)
|
||||
end
|
||||
|
||||
execute_posthooks!(chunk)
|
||||
|
||||
|
|
Loading…
Reference in New Issue