https://github.com/edoardocostantini/paper-template
My Rnw template for scientific papers
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Last synced: 5 months ago
·
JSON representation
Repository
My Rnw template for scientific papers
Basic Info
- Host: GitHub
- Owner: EdoardoCostantini
- Language: TeX
- Default Branch: master
- Size: 1.22 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 3 years ago
· Last pushed over 3 years ago
https://github.com/EdoardoCostantini/paper-template/blob/master/
# Project description
Repository hosting the LaTeX manuscript for a paper comparing different MI-PCR specifications.
# Repository contents
This is the template for a LaTex Rnw project. Editing should be done only in the `Rnw` files as the `.tex` are updated based on them upon compilation.
This directory contains:
- **section_##.Rnw**, the files where the actual content of the paper is written.
- **document_version.Rnw**, the global files calling all the other section files to make up the final manuscript.
- **compile.sh** is a shell script to compile a pdf of any **document_version.Rnw**.
- **trackChanges.sh** is a shell script to obtain track changes pdf versions of the paper
- **makearxiv.sh** is a shell script to create a zip archive that can be uploaded on arxiv.org and compiled by AutoTeX.
- **bib** is the folder containing the .bib file for the bibliography.
- **code** is the folder containing the R scripts defining the plots.
The scripts for the simulation study plots use plotting functions that are stored in the script `functions.R`.
- `knit-rnw.R` is the script that prepares the R environment to generate the results to be reported in the paper and knits the document
- `functions.R` is a script containing possibly complex plotting functions used multiple times in your paper.
- `sec-study-1-plots.R` contains the call to produce a specific plot to be placed where requested (based on the "title")
- **data** a folder containing the data files to plot
- `mtcars.rds` is just an example dataset
- **figure** is the folder where the pictures will be stored. You do not need to actively interact with this folder.
- **style** is the folder containing the .cls and .bst files for general formatting of the manuscript.
# How to compile pdfs
## Clean version
You can compile any desired version of the paper using the `compile.sh` bash script.
1. Create a `document_version.Rnw` with the desired latex preamble (style, paper title, authors, etc.)
2. Add calls to the desired sections to include in the manuscript
- Include `section_##.Rnw` by using
- Include `section_##.tex` by using
3. Open a terminal window located at the root of the paper folder
4. Execute the following line of code in the terminal
. compile.sh document_version.Rnw
which will create a `document_version.pdf` in the pdf folder.
For example,
. compile.sh main-arxiv.Rnw
produces the `main-arxiv.pdf` file
## Track-changes versions
After a few commits, you might want to generate a pdf showing the differences between the current version of the paper and any previous one. This can be done easily with the `trackChanges.sh` bash script. To achieve this, run the following command in a terminal window located at the root of the paper folder:
. trackChanges.sh document_version.Rnw SHA_old SHA_new
which will create a `document_version_diff_SHA_old-SHA_new.pdf` in the pdf folder.
For example,
. trackChanges.sh main-journal.Rnw 12376d19f157d927714aeff0cd1a098a4e087bdd 6c032dc00dede5d862be42fa8f7ae559f7485b5f
produces the file:
`main-journal_diff_12376d19f157d927714aeff0cd1a098a4e087bdd_6c032dc00dede5d862be42fa8f7ae559f7485b5f.pdf`
# Repository structure
Here is the project structure:
```
.
README.md
bib
bibshelf.bib
code
functions.R
knit-rnw.R
sec-study-1-plots.R
compile.sh
data
mtcars.rds
figure
plot-distribution-1.pdf
plot-mice-1.pdf
plot-pdf-1.pdf
main-arxiv.Rnw
main-arxiv.tex
main-journal.Rnw
main-journal.tex
makearxiv.sh
pdf
main-arxiv.pdf
main-journal.pdf
sec-abstract.Rnw
sec-biblio.Rnw
sec-conclusions.Rnw
sec-discussion.Rnw
sec-introduction.Rnw
sec-limits.Rnw
sec-methods.Rnw
sec-study-1.Rnw
sec-study-2.Rnw
style
asj.bst
response.cls
sagej.cls
submissions
sup-journal.Rnw
trackChanges.sh
```
Owner
- Name: Edo
- Login: EdoardoCostantini
- Kind: user
- Location: Tilburg, Netherlands
- Company: Tilburg University
- Website: https://edoardocostantini.github.io
- Repositories: 9
- Profile: https://github.com/EdoardoCostantini
Sociologist turned statistician, missed developer, born interior designer but never got there