Skip to content

Emphasizing Text

Brad Cannell edited this page Jul 11, 2023 · 4 revisions

Use the following conventions to emphasize keywords, concepts, code snippets, and other words or phrases that need to stand out or be emphasized.

Application names

Capitalize the names of applications.

  • Do this: Microsoft Word, RStudio.
  • Do not do this: microsoft word, rstudio.

Keywords

Hyperlink a keyword or phrase if it is a keyword or phrase that we would want to define in the glossary.

  • Do this: Console
  • Do not do this: Console, Console

Bold a keyword or phrase that we want to call attention to, but it is not necessarily a keyword or phrase that we want to define in the glossary.

At times, we will also Italicize keywords or phrases that we want to call attention to, but are not necessarily keywords or phrases that we want to define in the glossary. In general, we will follow standard English grammar rules for using the italics typeface (pay special attention to bullet 14). Further, “avoid using italics with other stylized typefaces, such as bold and underline. Since all three are designed to make words stand out, only one at a time is necessary.” (Ellis, 2022)

  • Do this: We do not want to coerce participants into signing the consent form.
  • Do not do this: We do NOT want to coerce participants into signing the consent form.

R Code

Snippets of programming code should be surrounded by backticks. This matches the style convention used by many popular programming websites like GitHub and Stack Overflow.

End function names with parentheses when writing then out. This is to emphasize that they are functions.

When writing about functions in the narrative part of the text (not in actual code chunks) that are not part of base R, prepend the package name with the double colon syntax. This

  • Do this: dplyr::select(), min().
  • Do not do this: dplyr::select(), dplyr::select(), dplyr::select(), “dplyr::select()”, min()

R Package Names

R package names should be surround by backticks when they are mentioned in the text. The exception is base R.

  • Do this: dplyr, base R.
  • Do not do this: dplyr, dplyr, base R.

Clickable Operations in Applications

In some of the applications we use, clickable steps or operations serve the same function as programming code. For example, in Microsoft word, we don’t type “bold(‘Do this’)”. Instead, we highlight the phrase “Do this” with our mouse and then click the B button in the toolbar. Then, Microsoft Word takes care of the programming behind the scenes for us. Therefore, clickable operations that need to be performed in an application should be written in the same style used to write code.

If a clickable object isn’t explicitly named, see if it has a tooltip. If it does, consider using the tooltip as its name.

  • Do this: Click the Find/Replace button in RStudio.
  • Do not do this: Click the Find/Replace button in RStudio.

File Paths

All file paths should be surround by backticks when they are mentioned in the text.

  • Do this: /Users/bradcannell/Desktop/NTRHD/my_study_data.csv.
  • Do not do this: “/Users/bradcannell/Desktop/NTRHD/my_study_data.csv”.

File and Folder Names

All file paths should be surround by backticks when they are mentioned in the text.

  • Do this: my_study_data.csv.
  • Do not do this: “my_study_data.csv”.

R for Epidemiology Wiki

Authoring Procedures

Clone this wiki locally