skeleton.Rmd 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. ---
  2. title: Template for preparing your research report submission to PeerJ using RMarkdown
  3. preprint: false
  4. author:
  5. - name: Barbara McClintock
  6. affiliation: 1
  7. corresponding: true
  8. email: [email protected]
  9. - name: Charles E. Darwin
  10. affiliation: 2
  11. affiliation:
  12. - code: 1
  13. address: Cold Spring Harbor Laboratory, One Bungtown Road Cold Spring Harbor, NY 11724
  14. - code: 2
  15. address: Down House, Luxted Rd, Downe, Orpington BR6 7JT, UK
  16. abstract: >
  17. The abstract of the article.
  18. It can also be on *multiple* lines.
  19. header-includes: >
  20. \usepackage{lipsum}
  21. bibliography: sample.bib
  22. output:
  23. rticles::peerj_article:
  24. base_format: rmarkdown::pdf_document # bookdown::pdf_document2 # for using \@ref()
  25. ---
  26. # Introduction {-}
  27. Your introduction goes here! Some examples of commonly used commands and features are listed below, to help you get started.
  28. If you have a question, please use the help menu in the top right of the screen to get in touch. When your article or pre-print is complete, use the "Submit to PeerJ" button in the topbar to send your files to PeerJ.
  29. ## About PeerJ {-}
  30. PeerJ is an award-winning open access publisher covering the biological and medical sciences. PeerJ provides authors with three publication venues: *PeerJ* and *PeerJ Computer Science* (peer-reviewed academic journals) and *PeerJ PrePrints* (a 'pre-print server'). See https://peerj.com/about/publications/ for more information.
  31. The PeerJ model allows an author to publish articles in their peer-reviewed journal via the purchase of a lifetime Publication Plan. Prices start from just \$99 (a one-off payment) which entitles an author to the lifetime ability to publish 1 article per year for free. Publication in PeerJ PrePrints is entirely free.
  32. # Some \LaTeX{} Examples {-}
  33. Use section and subsection commands to organize your document. \LaTeX{} handles all the formatting and numbering automatically. Use ref and label commands for cross-references.
  34. ## Figures and Tables {-}
  35. Use the table and tabular commands for basic tables --- see Table \@ref(tab:widgets), for example. You can upload a figure (JPEG, PNG or PDF) using the project menu. To include it in your document, use the includegraphics command as in the code for Figure \@ref(fig:view) below.
  36. Standard \LaTeX references will work as well (e.g. Fig. \ref{fig:view}).
  37. <!-- There are three ways to include figures: -->
  38. <!-- 1. The LaTeX way -->
  39. <!--
  40. \begin{figure}[ht]
  41. \centering
  42. \includegraphics[width=\linewidth]{view}
  43. \caption{An example image.}
  44. \label{fig:view}
  45. \end{figure}
  46. -->
  47. <!-- 2. The RMarkdown way -->
  48. ```{r view, out.width = "100%", fig.cap = "An example image.", echo = FALSE}
  49. knitr::include_graphics("view.pdf")
  50. ```
  51. <!-- 3. The pandoc way -->
  52. <!--
  53. ![An example image. Text *can* be processed with markdown.](view.pdf){#view width = 100%}
  54. -->
  55. <!--
  56. \begin{table}[ht]
  57. \centering
  58. \begin{tabular}{l|r}
  59. Item & Quantity \\\hline
  60. Widgets & 42 \\
  61. Gadgets & 13
  62. \end{tabular}
  63. \caption{\label{tab:widgets}An example table.}
  64. \end{table}
  65. -->
  66. Item Quantity
  67. ------- ---------
  68. Widgets 42
  69. Gadgets 13
  70. Table: (\#tab:widgets) An Example Table.
  71. ## Citations {-}
  72. LaTeX formats citations and references automatically using the bibliography records in your .bib file, which you can edit via the project menu. Use the cite command for an inline citation, like @Figueredo:2009dg, and the citep command for a citation in parentheses [@Figueredo:2009dg].
  73. ## Mathematics {-}
  74. \LaTeX{} is great at typesetting mathematics. Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let
  75. $$S_n = \frac{X_1 + X_2 + \cdots + X_n}{n}
  76. = \frac{1}{n}\sum_{i}^{n} X_i$$
  77. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge in distribution to a normal $\mathcal{N}(0, \sigma^2)$.
  78. ## Lists {-}
  79. You can make lists with automatic numbering \dots
  80. 1. Like this,
  81. 1. and like this.
  82. or bullet points...
  83. - Like this,
  84. - and like this.
  85. or with descriptions...
  86. - **Word** Definition
  87. - **Concept** Explanation
  88. - **Idea** Text
  89. We hope you find write\LaTeX\ useful for your PeerJ submission, and please let us know if you have any feedback. Further examples with dummy text are included in the following pages.
  90. # Methods {-}
  91. \lipsum[4]
  92. \begin{equation}
  93. \cos^3 \theta =\frac{1}{4}\cos\theta+\frac{3}{4}\cos 3\theta
  94. \label{eq:refname2}
  95. \end{equation}
  96. \lipsum[5]
  97. ## Subsection {-}
  98. \lipsum[6]
  99. \paragraph{Paragraph} \lipsum[7]
  100. \paragraph{Paragraph} \lipsum[8]
  101. ## Subsection {-}
  102. \lipsum[9]
  103. <!-- \begin{figure}[ht]\centering -->
  104. <!-- \includegraphics[width=\linewidth]{results} -->
  105. <!-- \caption{In-text Picture} -->
  106. <!-- \label{fig:results} -->
  107. <!-- \end{figure} -->
  108. ```{r results, fig.width = 5, fig.height = 4, out.width = "100%", fig.cap = "In-text Picture", echo = FALSE}
  109. time = seq(1.5, 8, 0.1)
  110. plot(time, sin(time), type = "l", xlab = "time [s]", ylab = "amplitude [m]",
  111. cex.main = 2, col = "blue", lwd = 3, font = 2, font.main = 2)
  112. ```
  113. Reference to Figure \@ref(fig:results).
  114. # Results and Discussion {-}
  115. \lipsum[10]
  116. ## Subsection {-}
  117. \lipsum[11]
  118. ### Subsubsection {-}
  119. \lipsum[12]
  120. ### Subsubsection {-}
  121. \lipsum[14]
  122. ## Subsection {-}
  123. \lipsum[15-20]
  124. # Acknowledgments {-}
  125. So long and thanks for all the fish.
  126. # References