mirror of https://github.com/mpastell/Weave.jl
Added documentation about new features
parent
8292c17674
commit
a9d0120c3d
|
@ -17,6 +17,6 @@ cp("build/examples/gadfly_md_sample.md",
|
|||
"build/examples/gadfly_md_sample.txt", remove_destination = true)
|
||||
|
||||
weave(Pkg.dir("Weave","examples","FIR_design.jl"), out_path = "build/examples")
|
||||
weave(Pkg.dir("Weave","examples","FIR_design.jl"), docformat = "md2pdf", out_path = "build/examples")
|
||||
weave(Pkg.dir("Weave","examples","FIR_design.jl"), doctype = "md2pdf", out_path = "build/examples")
|
||||
cp(Pkg.dir("Weave","examples","FIR_design.jl"),
|
||||
"build/examples/FIR_design.jl", remove_destination = true)
|
||||
|
|
|
@ -29,6 +29,6 @@ pages:
|
|||
- Home: index.md
|
||||
- Getting started: getting_started.md
|
||||
- Using Weave: usage.md
|
||||
- Publishing script: publish.md
|
||||
- Publishing scripts: publish.md
|
||||
- Chunk options: chunk_options.md
|
||||
- Function index: function_index.md
|
||||
|
|
|
@ -25,6 +25,7 @@ Weave currently supports the following chunk options with the following defaults
|
|||
* `line_width = 75`. Line width for wrapped lines.
|
||||
* `cache = false`. Cache results, depends on `cache` parameter on `weave` function.
|
||||
* `hold = false`. Hold all results until the end of the chunk.
|
||||
* `tangle = true`. Set tangle to false to exclude chunk from tangled code.
|
||||
|
||||
## Options for figures
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ You can Weave the files to your working directory using:
|
|||
```
|
||||
using Weave
|
||||
#Markdown
|
||||
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), informat="markdown",
|
||||
out_path = :pwd, doctype = "pandoc")
|
||||
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), out_path = :pwd,
|
||||
doctype = "pandoc")
|
||||
#HTML
|
||||
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), informat="markdown",
|
||||
out_path = :pwd, doctype = "md2html")
|
||||
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), out_path = :pwd,
|
||||
doctype = "md2html")
|
||||
#pdf
|
||||
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), informat="markdown",
|
||||
out_path = :pwd, doctype = "md2pdf")
|
||||
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), out_path = :pwd,
|
||||
doctype = "md2pdf")
|
||||
```
|
||||
|
|
|
@ -41,9 +41,21 @@ Tangling extracts the code from document:
|
|||
tangle(source)
|
||||
|
||||
|
||||
|
||||
## Supported formats
|
||||
|
||||
Weave sets the output format based on the file extension, but you can also set
|
||||
it using `doctype` option. The rules for detecting the format are:
|
||||
|
||||
```julia
|
||||
ext == ".jl" && return "md2html"
|
||||
contains(ext, ".md") && return "md2html"
|
||||
contains(ext, ".rst") && return "rst"
|
||||
contains(ext, ".tex") && return "texminted"
|
||||
contains(ext, ".txt") && return "asciidoc"
|
||||
return "pandoc"
|
||||
```
|
||||
|
||||
|
||||
You can get a list of supported output formats:
|
||||
|
||||
```
|
||||
|
@ -63,7 +75,19 @@ tex: Latex with custom code environments
|
|||
|
||||
## Document syntax
|
||||
|
||||
Weave uses noweb or markdown syntax for defining the code chunks and documentation chunks.
|
||||
Weave uses noweb, markdown or script syntax for defining the code chunks and
|
||||
documentation chunks. The format is detected based on the file extension, but
|
||||
you can also set it manually using the `informat` parameter.
|
||||
|
||||
The rules for autodetection are:
|
||||
|
||||
```
|
||||
ext == ".jl" && return "script"
|
||||
ext == ".jmd" && return "markdown"
|
||||
return "noweb"
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Noweb
|
||||
|
||||
|
|
Loading…
Reference in New Issue