2016-04-21 13:36:55 +02:00
|
|
|
|
|
|
|
# Getting started
|
|
|
|
|
|
|
|
The best way to get started using Weave.jl is to look at the example input and
|
2020-03-04 11:23:48 +01:00
|
|
|
output documents. Examples for different formats are included in the packages
|
|
|
|
[`examples`](https://github.com/JunoLab/Weave.jl/tree/master/examples) directory.
|
2016-04-21 13:36:55 +02:00
|
|
|
|
2020-03-04 11:23:48 +01:00
|
|
|
First have a look at source document using markdown code chunks and
|
|
|
|
[Plots.jl](https://github.com/JuliaPlots/Plots.jl) for figures:
|
|
|
|
[FIR_design.jmd](../examples/FIR_design.jmd) and then see the
|
2016-04-22 14:04:15 +02:00
|
|
|
output in different formats:
|
2016-04-21 13:36:55 +02:00
|
|
|
|
2020-04-01 10:46:19 +02:00
|
|
|
- HTML: [`FIR_design.html`](../examples/FIR_design.html)
|
|
|
|
- PDF: [`FIR_design.pdf`](../examples/FIR_design.pdf)
|
|
|
|
- Pandoc markdown: [`FIR_design.txt`](../examples/FIR_design.txt)
|
2016-04-21 13:36:55 +02:00
|
|
|
|
2020-04-01 10:46:19 +02:00
|
|
|
!!! note
|
|
|
|
Producing PDF output requires that you have XeLateX installed.
|
2016-04-21 13:36:55 +02:00
|
|
|
|
2018-08-13 14:51:08 +02:00
|
|
|
Add dependencies for the example if needed:
|
2017-03-14 17:08:15 +01:00
|
|
|
|
|
|
|
```julia
|
2018-08-13 14:51:08 +02:00
|
|
|
using Pkg; Pkg.add.(["Plots", "DSP"])
|
2017-03-14 17:08:15 +01:00
|
|
|
```
|
|
|
|
|
2020-04-01 10:46:19 +02:00
|
|
|
Weave the files to your working directory:
|
2016-04-21 13:36:55 +02:00
|
|
|
|
2016-12-12 20:40:05 +01:00
|
|
|
```julia
|
2016-04-21 13:36:55 +02:00
|
|
|
using Weave
|
2020-04-01 10:46:19 +02:00
|
|
|
|
|
|
|
# Julia markdown to HTML
|
|
|
|
weave(
|
|
|
|
joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd");
|
|
|
|
doctype = "md2html",
|
|
|
|
out_path = :pwd
|
|
|
|
)
|
|
|
|
|
|
|
|
# Julia markdown to PDF
|
|
|
|
weave(
|
|
|
|
joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd");
|
|
|
|
doctype = "md2pdf",
|
|
|
|
out_path = :pwd
|
|
|
|
)
|
|
|
|
|
|
|
|
# Julia markdown to Pandoc markdown
|
|
|
|
weave(
|
|
|
|
joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd");
|
|
|
|
doctype = "pandoc",
|
|
|
|
out_path = :pwd
|
|
|
|
)
|
2016-04-21 13:36:55 +02:00
|
|
|
```
|