|
| 1 | +--- |
| 2 | +title: An Rticles Template for the Transport Research Board Annual Meeting |
| 3 | +runningheader: "Anonymous, Security, and Zoolander" |
| 4 | +author: |
| 5 | + - name: Alice Anonymous |
| 6 | + note: Corresponding Author |
| 7 | + position: Graduate Student |
| 8 | + email: alice@example.com |
| 9 | + affiliation: Some Institute of Technology |
| 10 | + - name: Bob Security |
| 11 | + position: Assistant Professor |
| 12 | + email: bob@example.com |
| 13 | + affiliation: State University |
| 14 | + - name: Derek Zoolander |
| 15 | + position: Professor |
| 16 | + email: derek@example.com |
| 17 | + affiliation: Some Institute of Technology |
| 18 | +abstract: | |
| 19 | + The Transportation Research Board (TRB) has unique and seemingly arbitrary requirements for manuscripts submitted for review. These requirements make it difficult to write the manuscripts quickly, and no existing \LaTeX\ style comes close to fooling the guidelines. This represents an initial effort at creating a template to meet the requirements of TRB authors using \LaTeX, R, Sweave, and/or other literate programming software. |
| 20 | + |
| 21 | +keywords: ["Transportation", "Travel Behavior"] |
| 22 | +bibliography: mybibfile.bib |
| 23 | +biblio-style: unsrtnat |
| 24 | +classoption: |
| 25 | + - numbered # When numbered option is activated, lines are numbered. |
| 26 | +output: rticles::trb_article |
| 27 | +wordcount: 684 |
| 28 | +--- |
| 29 | + |
| 30 | +```{r setup, include = FALSE} |
| 31 | +knitr::opts_chunk$set(echo = FALSE) |
| 32 | +``` |
| 33 | + |
| 34 | + |
| 35 | +# Transportation Research Board Annual Meetings |
| 36 | + |
| 37 | +TRB has greatly simplified the submissions to its system, meaning that this |
| 38 | +template is no longer strictly required. However, there is a typical format |
| 39 | +that most people still use by default, and this template implements that change. |
| 40 | + |
| 41 | + |
| 42 | +# Features |
| 43 | + |
| 44 | +The template has a number of features that enable quick and painless manuscript authoring. |
| 45 | + |
| 46 | +## Mathematics |
| 47 | + |
| 48 | +Standard pandoc / \LaTeX math environments are available. For example, the |
| 49 | +probability of an individual choosing alternative $i$ in a multinomial logit |
| 50 | +model is |
| 51 | +\begin{equation} |
| 52 | + P_i = \frac{exp(V_i)}{\sum_{i, j \in J}exp(V_j)} \label{eq:mnl} |
| 53 | +\end{equation} |
| 54 | +Equations with a `\label{eq:label}` can be referred to later in the text with |
| 55 | +`\ref{eq:label}`, such as Equation \ref{eq:mnl}. |
| 56 | + |
| 57 | +## Title Page |
| 58 | + |
| 59 | +The template will automatically create a title page with the authors in the |
| 60 | +listed order. Near the bottom of the title page, TRB requires a count of the manuscript's |
| 61 | +words and tables. The YAML header information contains a `wordcount` key where |
| 62 | +this can be encoded. The number of tables is counted automatically on build; |
| 63 | +a default 250 words per table can be overriden with the `wordspertable` YAML |
| 64 | +key. |
| 65 | + |
| 66 | +The LaTeX template available from <https://github.com/chiehrosswang/TRB_LaTeX_tex> |
| 67 | +contain automatic word counters that have not been implemented in this `rticles` |
| 68 | +template. Authors can use the R Studio word count add-in available from |
| 69 | +<https://github.com/benmarwick/wordcountaddin>. |
| 70 | + |
| 71 | +## Page Layout |
| 72 | + |
| 73 | +The document has 1 inch margins as required, with the author's names in the left |
| 74 | +heading and the page number in the right. The running header information is set |
| 75 | +with the `runningheader` YAML key. Paragraphs leading sections and subsections |
| 76 | +are not indented, while all subsequent paragraphs in that section are. Section |
| 77 | +heading types are defined as outlined by the old TRB Author's Guide. |
| 78 | + |
| 79 | +The document is single-spaced in 12 point Times font. Times New Roman is a |
| 80 | +proprietary font and is therefore not available by installation in open-source |
| 81 | +software. While the differences between Times variants are negligible, Times New |
| 82 | +Roman itself can be used in Mac OSX by compiling under `xelatex`. |
| 83 | + |
| 84 | +## Figure and Table references |
| 85 | + |
| 86 | +The document can use standard pandoc referencing tools for in-text |
| 87 | +citations to figures and tables. If an R code chunk outputs a figure, the figure |
| 88 | +number can be referred to with `\@ref(fig:chunkname)` where `chunkname` is the |
| 89 | +name of the chunk that prints the figure. For example, Figure \@ref(fig:figure-example) |
| 90 | +shows a default figure made by the R chunk below. |
| 91 | + |
| 92 | +```{r figure-example, fig.cap="Generic plot.", echo = TRUE} |
| 93 | +# Generate some sample data, then compute mean and standard deviation |
| 94 | +# in each group |
| 95 | +Speed <- cars$speed |
| 96 | +Distance <- cars$dist |
| 97 | +plot(Speed, Distance, |
| 98 | + panel.first = lines(stats::lowess(Speed, Distance), lty = "dashed"), |
| 99 | + pch = 0, cex = 1.2, col = "blue") |
| 100 | +``` |
| 101 | + |
| 102 | +The template setup chunk sets `echo = FALSE` for the entire document, as printing |
| 103 | +code listings would not usually be appropriate or needed for a TRB article. But |
| 104 | +the option is there! |
| 105 | + |
| 106 | +The same referencing logic works for tables, with the `tab:` prefix on the |
| 107 | +chunk name instead of `fig:` used for figures. Table \@ref(tab:table-example) |
| 108 | +has a basic table. We recommend the `kableExtra` package for formatting |
| 109 | +publication-ready tables with greater control than the default `knitr::kable()` |
| 110 | +function. |
| 111 | + |
| 112 | +```{r table-example} |
| 113 | +knitr::kable(mtcars[1:5, 1:6], format = "latex", table.envir = "table", |
| 114 | + booktabs = TRUE, caption = "Example Table") |
| 115 | +``` |
| 116 | + |
| 117 | + |
| 118 | +## Bibliography styles |
| 119 | + |
| 120 | +TRB still wants numbered, unsorted citations beginning on a new page. The |
| 121 | +template is configured to use `natbib` with the `unsrtnat` citation style, with |
| 122 | +some additional logic to use parentheses instead of brackets. The YAML key |
| 123 | +`bibliostyle` will allow the authors to select a different citation format, but |
| 124 | +this is not recommended at the moment. Citations use the pandoc logic. Including |
| 125 | +the reference in brackets `[@reference]` will print only the numeric reference; |
| 126 | +e.g. [@Feynman1963118; @Dirac1953888]. Including the reference without brackets |
| 127 | +`@reference` will print the authors and then the numeric reference; e.g. |
| 128 | +@Feynman1963118. |
| 129 | + |
| 130 | +# Author Contribution Statement |
| 131 | + |
| 132 | +The authors confirm contribution to the paper as follows: study conception and |
| 133 | +design: A. Anonymous, D. Zoolander; data collection: B. Security; analysis and |
| 134 | +interpretation of results: A. Anonymous, B. Security; draft manuscript |
| 135 | +preparation: A. Anonymous. All authors reviewed the results and approved |
| 136 | +the final version of the manuscript. |
| 137 | + |
| 138 | +# Acknowledgements |
| 139 | + |
| 140 | +David Pritchard posted the original versions of this template in 2009 and |
| 141 | +updated it in 2011, soon after TRB began allowing PDF submissions. Gregory |
| 142 | +Macfarlane and Ross Wang made adjustments to the template, and Ross Wang now |
| 143 | +maintains the \LaTeX template at |
| 144 | +<https://github.com/chiehrosswang/TRB_LaTeX_tex>. Gregory Macfarlane created the `rticles` template in 2021. |
| 145 | + |
| 146 | + |
| 147 | +# References {#references } |
0 commit comments