mirror of https://github.com/mpastell/Weave.jl
Compare commits
No commits in common. "master" and "v0.10.10" have entirely different histories.
|
@ -1,6 +1,6 @@
|
|||
name = "Weave"
|
||||
uuid = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9"
|
||||
version = "0.10.12"
|
||||
version = "0.10.10"
|
||||
|
||||
[deps]
|
||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||
|
@ -18,11 +18,11 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
|
|||
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
|
||||
|
||||
[compat]
|
||||
Highlights = "0.3.1, 0.4, 0.5"
|
||||
Highlights = "0.3.1, 0.4"
|
||||
JSON = "0.21"
|
||||
Mustache = "0.4.1, 0.5, 1"
|
||||
Plots = "0.28, 0.29, 1.0"
|
||||
RelocatableFolders = "0.1,0.2,0.3,1"
|
||||
RelocatableFolders = "0.1"
|
||||
Requires = "1.0"
|
||||
YAML = "0.3, 0.4"
|
||||
julia = "1.2"
|
||||
|
|
|
@ -97,8 +97,3 @@ Thanks for the important additions, fixes and comments.
|
|||
|
||||
- [DiffEqTutorials.jl](https://github.com/JuliaDiffEq/DiffEqTutorials.jl) uses Weave to output tutorials (`.jmd` documents) to html, pdf and Jupyter notebooks.
|
||||
- [TuringTutorials](https://github.com/TuringLang/TuringTutorials) uses Weave to convert notebooks to html.
|
||||
|
||||
## Related packages
|
||||
|
||||
- [Literate.jl](https://github.com/fredrikekre/Literate.jl) can be used to generate Markdown and Jupyter notebooks directly from Julia source files with markdown in comments.
|
||||
- [Quarto](https://quarto.org) can generate Jupyter notebooks, HTML, or PDF directly from a Markdown format containing Julia code blocks, and also works with R and Python.
|
||||
|
|
|
@ -130,7 +130,7 @@ e.g. to include a Plots figure in markdown you can use:
|
|||
```
|
||||
or to produce any HTML output:
|
||||
```
|
||||
! display("text/html", HTML("Header from julia"));
|
||||
! display("text/html", "Header from julia");
|
||||
```
|
||||
|
||||
### Script Format
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Weave
|
||||
|
||||
using Highlights, Mustache, Requires, Pkg, REPL, RelocatableFolders, Base64
|
||||
using Highlights, Mustache, Requires, Pkg, REPL, RelocatableFolders
|
||||
|
||||
# directories
|
||||
const PKG_DIR = normpath(@__DIR__, "..")
|
||||
|
@ -243,12 +243,12 @@ function specific_options!(weave_options, doctype)
|
|||
end
|
||||
|
||||
get_out_path(doc, out_path, ext::Nothing = nothing) = get_out_path(doc, out_path, doc.format.extension)
|
||||
function get_out_path(doc, out_path, ext)
|
||||
function get_out_path(doc, out_path, ext)
|
||||
if (out_path === :doc) || (out_path === :pwd)
|
||||
abspath(get_cwd(doc, out_path), string(doc.basename, '.', ext))
|
||||
elseif isempty(splitext(out_path)[2]) # directory given
|
||||
abspath(get_cwd(doc, out_path), string(doc.basename, '.', ext))
|
||||
else
|
||||
else
|
||||
# out_path is given, but if extension is explitly provided override this will override the extension
|
||||
abspath(string(splitext(out_path)[1], '.', ext))
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module WeavePlots
|
||||
|
||||
using ..Base64, ..Plots, ..Weave
|
||||
using Base64, ..Plots, ..Weave
|
||||
|
||||
|
||||
# Pre-execute hooks to set the plot size for the chunk
|
||||
|
|
|
@ -90,8 +90,6 @@ function run_doc(
|
|||
@info "Weaved all chunks" progress=1 _id=PROGRESS_ID
|
||||
cd_back()
|
||||
popdisplay(report) # ensure display pops out even if internal error occurs
|
||||
# Temporary fig_path is not automatically removed because it contains files so...
|
||||
!isnothing(fig_path) && startswith(fig_path, "jl_") && rm(normpath(cwd, fig_path), force=true, recursive=true)
|
||||
end
|
||||
|
||||
return doc
|
||||
|
|
|
@ -61,7 +61,7 @@ function write_doc(docformat::Pandoc2PDF, doc, rendered, out_path)
|
|||
cmd = `pandoc -f markdown+raw_tex -s --pdf-engine=xelatex --highlight-style=tango
|
||||
$filt $citeproc $(docformat.pandoc_options)
|
||||
--include-in-header=$(docformat.header_template)
|
||||
-o $(out)`
|
||||
-V fontsize=12pt -o $(out)`
|
||||
proc = open(cmd, "r+")
|
||||
println(proc.in, rendered)
|
||||
close(proc.in)
|
||||
|
|
|
@ -10,7 +10,7 @@ DataFrame(a=rand(10))
|
|||
```
|
||||
"""; doctype = "md2html")
|
||||
@test isdefined(doc.chunks[1], :rich_output)
|
||||
@test count("<tr", doc.chunks[1].rich_output) == 12 # additonal 2 for name and type row
|
||||
@test count("<tr>", doc.chunks[1].rich_output) == 12 # additonal 2 for name and type row
|
||||
|
||||
# limit
|
||||
n = 100000
|
||||
|
|
Loading…
Reference in New Issue