This function builds a template directory with all the necessary files, as well as a rmarkdown script which is ready to edit. The result is an Elsevier ready document that conforms to most academic journal standards. In the directory folder provided, the user will have the tex files, as well as all relevant figure folders created in R upon knitting the rmarkdown file. I strongly recommend working in a .Rproj environment, and thus recommend setting build_project to TRUE (as default). Using open_project will open the new project in a new session. The Tex files should not be renamed or moved. Prior to submitting a paper, the user should zip the template_name.tex file, together with the figure files and Tex folder, and send it through to journal editors. Feel free to edit any of the settings in the template_name.tex file to conform to particular preferences (e.g. setting margins, etc.)

create_template(directory = tempdir(), template_name, bib.file,
  build_project = TRUE, open_project = TRUE)

Arguments

directory

A character string with the target folder directory. This folder will be created if it does not already exist, and you will be prompted if the folder already exists. In this case, it will create a subfolder within the existing folder. By default, it will save to a temporary directory.

template_name

The folder, as well as the rmarkdown template, will be given this name.

bib.file

If left blank, the default bib file will be used. This can be a user specified bib file. Should be the full path for the file (e.g. C:/Example/Bibfile.bib)

build_project

Create .Rproj file in your provided location.

open_project

Open project after running this function.

Examples

# NOT RUN {
create_template(directory = tempdir(), template_name = "Write_Up",
build_project = TRUE, open_project = TRUE)
# }