knitr::opts_chunk$set(fig.width=3, fig.height=3, fig.crop = F, 
                      fig.pos = "tb", fig.path='figs/',
                      echo=F, warning=F, cache=F, 
                      message=F, sanitize = T)
library(png)
library(grid)
library(ggplot2)
library(xtable)

General Formatting Instructions

For general information about authoring in markdown, see here.

The entire content of a paper (including figures, references, and anything else) can be no longer than six pages in the \textbf{initial submission}. In the \textbf{final submission}, the text of the paper, including an author line, must fit on six pages. Up to one additional page can be used for acknowledgements and references.

The text of the paper should be formatted in two columns with an overall width of 7 inches (17.8 cm) and length of 9.25 inches (23.5 cm), with 0.25 inches between the columns. Leave two line spaces between the last author listed and the text of the paper; the text of the paper (starting with the abstract) should begin no less than 2.75 inches below the top of the page. The left margin should be 0.75 inches and the top margin should be 1 inch. \textbf{The right and bottom margins will depend on whether you use U.S. letter or A4 paper, so you must be sure to measure the width of the printed text.} Use 10~point Times Roman with 12~point vertical spacing, unless otherwise specified.

The title should be in 14~point bold font, centered. The title should be formatted with initial caps (the first letter of content words capitalized and the rest lower case). In the initial submission, the phrase ``Anonymous CogSci submission'' should appear below the title, centered, in 11~point bold font. In the final submission, each author's name should appear on a separate line, 11~point bold, and centered, with the author's email address in parentheses. Under each author's name list the author's affiliation and postal address in ordinary 10~point type.

Indent the first line of each paragraph by 1/8~inch (except for the first paragraph of a new section). Do not add extra vertical space between paragraphs.

First-Level Headings

First level headings should be in 12 point , initial caps, bold and centered. Leave one line space above the heading and 1/4~line space below the heading.

Second-Level Headings

Second level headings should be 11 point , initial caps, bold, and flush left. Leave one line space above the heading and 1/4~ line space below the heading.

Third-Level Headings

Third-level headings should be 10 point , initial caps, bold, and flush left. Leave one line space above the heading, but no space after the heading.

Formalities, Footnotes, and Floats

Use standard APA citation format. Citations within the text should include the author's last name and year. If the authors' names are included in the sentence, place only the year in parentheses, as in [-@NewellSimon1972a], but otherwise place the entire reference in parentheses with the authors and year separated by a comma [@NewellSimon1972a]. List multiple references alphabetically and separate them by semicolons [@ChalnickBillman1988a; @NewellSimon1972a]. Use the et. al. construction only after listing all the authors to a publication in an earlier reference and for citations with four or more authors.

For more information on citations in RMarkdown, see here.

Footnotes

Indicate footnotes with a number\footnote{Sample of the first footnote.} in the text. Place the footnotes in 9 point type at the bottom of the page on which they appear. Precede the footnote with a horizontal rule.\footnote{Sample of the second footnote.} You can also use markdown formatting to include footnotes using this syntax [^1].

[^1]: Sample of a markdown footnote.

Figures

All artwork must be very dark for purposes of reproduction and should not be hand drawn. Number figures sequentially, placing the figure number and caption, in 10 point, after the figure with one line space above the caption and one line space below it. If necessary, leave extra white space at the bottom of the page to avoid splitting the figure and figure caption. You may float figures to the top or bottom of a column, or set wide figures across both columns.

Two-column images

You can read local images using png package for example and plot it like a regular plot using grid.raster from the grid package. With this method you have full control of the size of your image. Note: Image must be in .png file format for the readPNG function to work.

You might want to display a wide figure across both columns. To do this, you change the fig.env chunk option to figure*. To align the image in the center of the page, set fig.align option to center. To format the width of your caption text, you set the num.cols.cap option to 2.

img <- png::readPNG("figs/walrus.png")
grid::grid.raster(img)

One-column images

Single column is the default option, but if you want set it explicitly, set fig.env to figure. Notice that the num.cols option for the caption width is set to 1.

img <- png::readPNG("figs/lab_logo_stanford.png")
grid::grid.raster(img)

R Plots

You can use R chunks directly to plot graphs. And you can use latex floats in the fig.pos chunk option to have more control over the location of your plot on the page. For more information on latex placement specifiers see here

x <- 0:100
y <- 2 * (x + rnorm(length(x), sd = 3) + 3)

ggplot2::ggplot(data = data.frame(x, y), 
                aes(x = x, y = y)) + 
  geom_point() + 
  geom_smooth(method = "lm")

Tables

Number tables consecutively; place the table number and title (in 10 point) above the table with one line space above the caption and one line space below it, as in Table 1. You may float tables to the top or bottom of a column, set wide tables across both columns.

You can use the xtable function in the xtable package.

n <- 100
x <- rnorm(n)
y <- 2*x + rnorm(n)
out <- lm(y ~ x)

tab1 <- xtable::xtable(summary(out)$coef, digits=c(0, 2, 2, 1, 2), 
                       caption = "This table prints across one column.")

print(tab1, type="latex", comment = F, table.placement = "H")

Acknowledgements

Place acknowledgments (including funding information) in a section at the end of the paper.

References

# References will be generated automatically by Pandoc and included here.
# The following code is some latex to format the bibliography. Do not remove it.

\setlength{\parindent}{-0.1in} \setlength{\leftskip}{0.125in} \noindent



kemacdonald/cogsci2016 documentation built on Jan. 26, 2021, 3:14 p.m.