5 ms·
Is this like Rmarkdown for Julia?
by clircle 5y ago
Is this like Rmarkdown for Julia?
- rsfern 5y agoI think Weave.jl is a closer match for Rmarkdown. This project seems similar but geared more towards multi-chapter books instead of self-contained reports https://github.com/JunoLab/Weave.jl https://github.com/JunoLab/Weave.jl
- mbauman 5y agoThat exists more directly with Weave.jl — this is built for bigger things. As the README says: > If you want a small report instead of a book with numbered sections, then Weave.jl might be more suitable for your problem. http://weavejl.mpastell.com/stable/ http://weavejl.mpastell.com/stable/
- Hasnep 5y agoIt looks more like bookdown for Julia
- huijzer 5y agoHi. Creator of the package here. It is indeed very much like Bookdown. However, there are a few specific problems that I have with Rmarkdown and similar systems (the foundation for Bookdown) that I wanted to solve: 1. Rmarkdown does not make it easy to write a book as a package. With a package, you get testing, dependency control and some more organizational things for free. 2. Rmarkdown and similar systems encapsulate your code in code blocks and require you to set metadata for each block. For the metadata, there is a kind of DSL with things like `show=TRUE`. I switched this around and just evaluate exactly what the user writes. This sort of "metadata" can be set via functions such as `sco` (show code and output). In combination with Julia's macro system, this even allows for grabbing function definitions from within the package with `@sco`. So, you can write a software package with a function `foo` and call `@sco foo(1)` so see the source code and output for calling `foo` with argument `1`. The benefit of avoiding the DSL is that users can be much more expressive in what they decide to do around their code blocks.