added REPL code to code blocks

pull/429/head
Ashish Panigrahi 2021-06-30 18:58:57 +05:30
parent 2a44506fda
commit d8d45e4a7c
1 changed files with 8 additions and 8 deletions

View File

@ -36,28 +36,28 @@ and then use `weave` function to execute code and generate an output document wh
You can install the latest release using Julia package manager:
```julia
using Pkg
Pkg.add("Weave")
julia> using Pkg
julia> Pkg.add("Weave")
```
## Usage
```julia
using Weave
julia> using Weave
# add dependencies for the example
using Pkg; Pkg.add(["Plots", "DSP"])
julia> using Pkg; Pkg.add(["Plots", "DSP"])
filename = normpath(Weave.EXAMPLE_FOLDER, "FIR_design.jmd")
weave(filename, out_path = :pwd)
julia> filename = normpath(Weave.EXAMPLE_FOLDER, "FIR_design.jmd")
julia> weave(filename, out_path = :pwd)
```
If you have LaTeX installed you can also weave directly to pdf.
```julia
filename = normpath(Weave.EXAMPLE_FOLDER, "FIR_design.jmd")
weave(filename, out_path = :pwd, doctype = "md2pdf")
julia> filename = normpath(Weave.EXAMPLE_FOLDER, "FIR_design.jmd")
julia> weave(filename, out_path = :pwd, doctype = "md2pdf")
```
NOTE: `Weave.EXAMPLE_FOLDER` just points to [`examples`](./examples) directory.