Skip to content

Formatting

Brad Cannell edited this page Dec 15, 2023 · 8 revisions

This page contains formatting notes for R4Epi authors and contributors.

Page contents

Textbook versions

Guidelines for creating book versions on GitHub.

  • Major: physical copy editions
  • Minor: new chapters, deletion of chapters, chapter reordering.
  • 3rd level: significant edits to existing chapters
  • Version number doesn’t change with typo (I.e., spelling and grammar) corrections.

Emphasizing text

Emphasizing Text has its own page.

Top

Language

We want to use informal language (we, us, etc.) in the text of R4Epi. We feel as though it makes the book feel more approachable. Additionally, we want to convey to readers that we are learning along with them – because we definitely are!

For example:

  • Do this: “In that chapter, we also discussed a potential downside of nesting functions.”
  • Avoid this:: “In that chapter, readers were introduced to the potential downside of nesting functions.”

Top

Font Awesome

Font Awesome seems like a great tool for adding an additional visual dimension to the textbook. Here are some links with useful information about adding Font Awesome graphics to Quarto documents:

Here are the basics:

  1. Install the Font Awesome Quarto Extension by typing quarto install extension quarto-ext/fontawesome in the terminal.
  2. We will be asked, “Do you trust the authors of this extension?” Type “Yes.”
  3. We will be asked, “Would you like to continue?” Type “Yes.”
  4. There should be a new folder called _extensions. Inside that folder, there should be a folder named fontawesome.
  5. We will have to repeat this process any time we create a new Quarto project.

Now that the extension is installed, we can use the following syntax to insert Font Awesome icons: \{\{< fa name-of-icon >}} (don’t include the backslashes. They are just there to prevent GitHub from attempting to render the code). We can find a list of icons on the Font Awesome website.

For example, this code creates a Font Awesome envelope:

\{\{< fa envelope >}} (don't include the backslashes. They are just there to prevent GitHub from attempting to render the code)

However, the example above doesn’t work on this Wiki page because the Quarto file used to create it is rendering to GitHub flavored markdown (format: gfm) instead of html (format: html).

Here are some links with notes on using Font Awesome with GitHub flavored markdown:

For example:

<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/crown.svg" width="50" height="50">

Produces:

Top

Citations

  • To change the citation style, change the csl: argument in _quarto.yml. For example, use csl: ama.csl to change the citation style to AMA.
  • Here is more information about citations from Test Quarto Book.

Top

Headers

  • Always add a single space in between the pound sign (#) and the header text.
  • Each level one header should have a single, high-level theme, but not high-level enough to (currently) warrant its own Chapter. Over time, we may find that what we originally thought of as a single, high-level theme was really more appropriate to break into multiple themes.
  • Level one headers should be written in title case. All other headers should be written in sentence case.

Top

R4Epi hex logo

R for Epidemiology Wiki

Authoring Procedures

Wiki maintenance

Clone this wiki locally