Weave.jl/README.md

86 lines
3.3 KiB
Markdown
Raw Normal View History

2016-12-23 09:54:48 +01:00
# Weave
[![Build Status](https://travis-ci.org/JunoLab/Weave.jl.svg?branch=master)](https://travis-ci.org/JunoLab/Weave.jl)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](http://weavejl.mpastell.com/stable/)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](http://weavejl.mpastell.com/dev/)
2017-03-22 13:56:57 +01:00
[![](http://joss.theoj.org/papers/10.21105/joss.00204/status.svg)](http://dx.doi.org/10.21105/joss.00204)
2016-12-23 09:54:48 +01:00
Weave is a scientific report generator/literate programming tool
for Julia. It resembles [Pweave](http://mpastell.com/pweave), Knitr, rmarkdown
and Sweave.
You can write your documentation and code in input document using Noweb,
Markdown, Script syntax and use `weave` function to execute to document to capture results
2018-08-17 09:28:12 +02:00
and figures.
2016-12-23 09:54:48 +01:00
**Current features**
2019-03-04 14:42:16 +01:00
* Publish markdown directly to html and pdf using Julia or Pandoc markdown.
* Markdown, script of Noweb syntax for input documents.
2016-12-23 09:54:48 +01:00
* Execute code as terminal or "script" chunks.
2019-03-04 14:42:16 +01:00
* Capture Plots.jl or Gadfly.jl figures
* Supports LaTex, Pandoc, Github markdown, MultiMarkdown, Asciidoc and reStructuredText output
* Simple caching of results
2016-12-12 13:05:26 +01:00
* Convert to and from IJulia notebooks
2017-03-30 17:25:41 +02:00
**Citing Weave:** *Pastell, Matti. 2017. Weave.jl: Scientific Reports Using Julia. The Journal of Open Source Software. http://dx.doi.org/10.21105/joss.00204*
2020-03-06 12:23:44 +01:00
![Weave in Juno demo](./doc/src/assets/demo.png)
2017-03-14 17:08:15 +01:00
2017-03-06 16:43:12 +01:00
## Installation
You can install the latest release using Julia package manager:
```julia
2018-08-13 14:30:06 +02:00
using Pkg
2017-03-06 16:43:12 +01:00
Pkg.add("Weave")
```
2016-12-23 09:54:48 +01:00
## Usage
2018-08-13 14:30:06 +02:00
Run from julia using Plots.jl for plots:
2016-12-23 09:54:48 +01:00
```julia
2017-03-14 17:08:15 +01:00
#First add depencies for the example
2018-08-13 14:30:06 +02:00
using Pkg; Pkg.add.(["Plots", "DSP"])
2017-03-14 17:08:15 +01:00
#Use Weave
2016-12-23 09:54:48 +01:00
using Weave
2018-08-13 14:30:06 +02:00
weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd"), out_path=:pwd)
2016-12-23 09:54:48 +01:00
```
2018-08-13 14:30:06 +02:00
If you have LaTeX installed you can also weave directly to pdf.
2016-12-23 09:54:48 +01:00
```julia
2018-08-13 14:30:06 +02:00
weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd"),
out_path=:pwd, doctype="md2pdf")
2016-12-23 09:54:48 +01:00
```
## Documentation
Documenter.jl with MKDocs generated documentation:
[![](https://img.shields.io/badge/docs-stable-blue.svg)](http://weavejl.mpastell.com/stable/)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](http://weavejl.mpastell.com/dev/)
2016-12-23 09:54:48 +01:00
## Editor support
2019-03-04 14:42:16 +01:00
Install [language-weave](https://atom.io/packages/language-weave) to add Weave support to Juno.
It allows running code from Weave documents with usual keybindings and allows preview of
html and pdf output.
2016-12-23 09:54:48 +01:00
2019-06-10 20:23:01 +02:00
The [Julia extension for Visual Studio Code](https://www.julia-vscode.org/)
adds Weave support to [Visual Studio Code](https://code.visualstudio.com/).
2016-12-23 09:54:48 +01:00
## Contributing
I will probably add new features to Weave when I need them myself or if they are requested and not too difficult to implement. You can contribute by opening issues on Github or implementing things yourself and making a pull request. I'd also appreciate example documents written using Weave to add to examples.
## Contributors
You can see the list of contributors on Github: https://github.com/mpastell/Weave.jl/graphs/contributors. Thanks for the important additions, fixes and comments.
2019-03-04 14:42:16 +01:00
## Example projects using Weave
- [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.