Path: blob/master/RMarkdown/rticles/sim_article/sim_article.Rmd
2355 views
------The Article Header Information
YAML header:
Configure the YAML header including the following elements:
title: Titleauthor: List of author(s) containingnameandnumaddress: List containingnumandorgfor definingauthoraffiliationspresentaddress: Not sure what they mean with thiscorres: Author and address for correspondenceauthormark: Short author list for headerreceived,revised,accepted: dates of submission, revision, and acceptance of the manuscriptabstract: Limited to 250 wordskeywords: Up to 6 keywordsbibliography: BibTeX.bibfileclassoption: options of theWileyNJD-v2classlongtable: set totrueto include thelongtablepackage, used by default frompandocto convert markdown to \LaTeX code
Remarks
In
authormarkuse et al. if there are three or more authors.Note the use of
numto link names and addresses.For submitting a double-spaced manuscript, add
doublespaceas an option to aclassoptionline in the YAML header:classoption: doublespace.Keywords are separated by semicolons.
The Body of the Article
Mathematics
Use mathematics in Rmarkdown as usual.
Figures and Tables
Figures are supported from R code:
...and can be referenced (Figure \ref{fig:plot}) by including the \\label{} tag in the fig.cap attribute of the R chunk: fig.cap = "Fancy Caption\\label{fig:plot}". It is a quirky hack at the moment, see here.
Analogously, use Rmarkdown to produce tables as usual:
Referenced via \ref{tab:table}. You can also use the YAML option header-includes to includes custom \LaTeX packages for tables (keep in mind that pandoc uses longtables by default, and it is hardcoded; some things may require including the package longtable). E.g., using ctable:
Then, just write straight-up \LaTeX code and reference is as usual (\ref{tab:ctable}):
It is also possible to set the YAML option longtable: true and use markdown tables (or the knitr::kable function): knitr::kable(head(cars)) produces the same table as the xtable example presented before.
Cross-referencing
The use of the Rmarkdown equivalent of the \LaTeX cross-reference system for figures, tables, equations, etc., is encouraged (using [@<name>], equivalent of \ref{<name>} and \label{<name>}). That works well for citations in Rmarkdown, not so well for figures and tables. In that case, it is possible to revert to standard \LaTeX syntax.
Double Spacing
If you need to double space your document for submission please use the doublespace option in the header.
Bibliography
Link a .bib document via the YAML header, and bibliography will be printed at the very end (as usual). The default bibliography style is provided by Wiley as in WileyNJD-AMA.bst, do not delete that file.
Use the Rmarkdown equivalent of the \LaTeX citation system using [@<name>]. Example: [@Taylor1937], [@Knupp1999; @Kamm2000].
To include all citation from the .bib file, add \nocite{*} before the end of the document.
Further information
All \LaTeX enviroments supported by the main template are supported here as well; see the .tex sample file here for more details and example.