JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
823 stars 94 forks source link

[FR] writing journal papers with .jmd and weave #415

Open drbenvincent opened 3 years ago

drbenvincent commented 3 years ago

Seems like this FR is completely different from #332 (which is about markdown to html?), but is partially related to #185.

I am interested in a use case of writing full journal papers in .jmd format and weaving to pdf. I would obviously think so, because I want to do it, but I believe this would be a really cool addition to the Julia ecosystem.

From what I can tell there are a couple of things required:

Inline results

Apologies if I have missed this in the docs, but it would be extremely useful to be able to inline Julia variables (i.e. numbers or strings) into the markdown text. I have not been able to find any existing issues that relate to this. An example application would be referring to the results of a statistical calculation, but it would obviously be useful wherever you need to refer to the outputs of some computation in your paper.

EDIT: Sorry, my bad. Looks like this is possible. It is in the docs. Eg...

    ```julia
    my_pi = 3.12

The value of pi is j my_pi. Nice.



## bibtex citations
As far as I can tell this is underway in #185, but has potentially stalled?

EDIT: In this repo there is an [example paper](https://raw.githubusercontent.com/JunoLab/Weave.jl/master/paper/paper.md) with bibtex citations, but weaving doesn't seem to work at this point... citations not inserted into text, and references not placed in the reference section.

## use of latex templates
I have no idea how complex this would be, but often journals require a certain template or style file. From my own area, many journals require APA formatting. From the world of RMarkdown, there is a package called [papaja](http://frederikaust.com/papaja_man/) which allows you to specify that you would like your latex formatted according to the APA format. This would be the cherry on top, but is probably going to be an absolute requirement for submission, depending on how pedantic the journal is.

EDIT: Ok, looks like template functionality is in fact there (see [docs](http://weavejl.mpastell.com/stable/publish/#Templates)), but the level of flexibility is not immediately clear at the moment.