7 Formatting for a journal

7.1 Journal-specific formatting

Use the rticles package to produce a draft manuscript in a journal-specific format. Many journal formats are available.

library("rmarkdown")
draft("MyArticle.Rmd", template = "plos", package = "rticles")

7.2 Line numbers

If you are creating a PDF, you can include line numbers by adding a header-includes section to the YAML.

---
title: "My Manuscript"
output: bookdown::pdf_document2
header-includes:
   - \usepackage{lineno}
   - \linenumbers
---

Other LaTeX packages can be added in a similar way to add extra functionality, for example, pages in landscape.