# Weave pkg to produce reports in Julia

**URL:** https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796
**Category:** Performance
**Created:** [August 1, 2018, 5:13pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796 "2018-08-01T17:13:39Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mvcavalcanti](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mvcavalcanti](https://discourse.julialang.org/u/mvcavalcanti)
#### Post date: [August 1, 2018, 5:13pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/1 "2018-08-01T17:13:39Z")

</div>

Hi. I’d like to do some reports in Julia as I used to do in R through RMarkdown. I found a pkg called Weave to do the same thing but it seems for me that it is necessary a greater integration with Latex (and also Python??) than R, not just run the code in Julia and get the pdf as RMarkdown used to be. Is there someone who has some experience with Weave and could help me?

Thanks in advance

---

<div class="post-metadata">

### Author: ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)
#### Post date: [August 1, 2018, 5:42pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/2 "2018-08-01T17:42:52Z")

</div>

I’ve used Weave.jl a number of times (not recently) and was quite happy with it. I am pleased to see that it still looks like it’s under very active development (I’m not a contributor myself). As I recall everything worked out of the box for me and was completely pain free.

I’m not sure what you mean by “greater integration with latex”. Are you looking for it to output latex source code? I don’t think it does this. You should have no trouble inserting latex into your script however. I’m also not sure what Python integration you are looking for. You could always use PyCall.jl from within your weave script to call python. In 0.7, once they update PyCall to use `getproperty` it will be possible to get Julia syntax to look very close to Python syntax if you so desire.

---

<div class="post-metadata">

### Author: ![ssfrr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssfrr/32/3736_2.png) [@ssfrr](https://discourse.julialang.org/u/ssfrr)
#### Post date: [August 1, 2018, 6:23pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/3 "2018-08-01T18:23:26Z")

</div>

My interpretation of the OP is that Weave seems to require some kind of Latex/Python support to do its thing. @mvcavalcanti can you clarify what problem you’re running into? It would be easier to help out if you have a more specific error message you’re getting.

---

<div class="post-metadata">

### Author: ![Non-Contradiction](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-contradiction/32/2208_2.png) [@Non-Contradiction](https://discourse.julialang.org/u/Non-Contradiction)
#### Post date: [August 1, 2018, 6:33pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/4 "2018-08-01T18:33:06Z")

</div>

This is not a direct answer to your question but might be helpful.  
`RMarkdown` and `knitr` also support `julia` chunk through the R package `JuliaCall`, see [https://github.com/yihui/knitr/releases/tag/v1.18](https://github.com/yihui/knitr/releases/tag/v1.18). If your `knitr` version is newer than v1.18 (the current release is v1.20.), you can just install the package `JuliaCall` and have `julia` chunk in your `RMarkdown` document like this:

````julia
```{julia}
1 + 1
```

```{julia}
using Plots
gr()
plot([1, 2, 3, 4, 5])
```
````

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [August 1, 2018, 6:43pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/5 "2018-08-01T18:43:32Z")

</div>

Another tool I am currently developing to automatically generated PDF from a LaTeX note database:

> [@Citations in docs](https://discourse.julialang.org/t/citations-in-docs/5066/30):
>
> Somewhat tangentially related: I am currently creating a package that will allow people to maintain a database of LaTeX notes, and the Julia package will automatically be able to parse this database of LaTeX notes to extract citations, references, and it will allow authors to generate graph diagrams depicting the inter-relationship and dependencies of definitions, theorems, calculations, references, and results. It might be possible to substitute it in place of a docs system in the future, but f…

This tool is fully functional as of now, but it will not be officially released and documented for another month.

> **[GitHub - chakravala/VerTeX.jl: Typeset scattered graph data rewriter based on...](https://github.com/chakravala/VerTeX.jl)**
>
> Typeset scattered graph data rewriter based on LaTeX nodes - GitHub - chakravala/VerTeX.jl: Typeset scattered graph data rewriter based on LaTeX nodes

---

<div class="post-metadata">

### Author: ![mvcavalcanti](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mvcavalcanti](https://discourse.julialang.org/u/mvcavalcanti)
#### Post date: [August 1, 2018, 6:47pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/6 "2018-08-01T18:47:22Z")

</div>

Thank you guys. So, I’ll tell you briefly what is going on. I’m trying to run that example “gadfly\_md\_sample.jmd” before apply in my code. My first problem starts in Julia with:

WARNING: Error converting document to pdf. Try running latex manually

The .tex document is created, but not converted. Then I open this .tex file and try to run with TexStudio. But I get another error:

Package minted Error: You must have ‘pygmentize’ installed to use this package. \begin{document}

After all this, I don’t know more what to do. I don’t want to make any integration, but all this effort seems to me that coding just in Julia is not enough.

---

<div class="post-metadata">

### Author: ![Non-Contradiction](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-contradiction/32/2208_2.png) [@Non-Contradiction](https://discourse.julialang.org/u/Non-Contradiction)
#### Post date: [August 1, 2018, 7:11pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/7 "2018-08-01T19:11:13Z")

</div>

The error message suggests that the tex file generated by `Weave` uses the latex package `minted`, which depends on `pygmentize`, which is not installed on your system. As far as I know, `RMarkdown` does a similar `Rmd -> tex -> pdf` thing, but I guess the tex file generated by `RMarkdown` doesn’t use the `minted` package.

And searching about `mint` in documentation of `Weave`, I found that it may be possible to generate tex file which doesn’t use `minted`, see [http://weavejl.mpastell.com/stable/usage/#supported-formats](http://weavejl.mpastell.com/stable/usage/#supported-formats).

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [August 1, 2018, 9:56pm UTC](https://discourse.julialang.org/t/weave-pkg-to-produce-reports-in-julia/12796/8 "2018-08-01T21:56:29Z")

</div>

It might be helpful to configure your Latex distribution to download packages on the fly. Perhaps it is not automatically downloading things as it encounters them.
