-
Notifications
You must be signed in to change notification settings - Fork 54
Formatting
This page contains formatting notes for R4Epi authors and contributors.
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 has its own page.
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.”
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:
- Brad’s Test Quarto Book
- How to include fontawesome icons in Quarto documents: basic styling AND special effects (YouTube)
Here are the basics:
- Install the Font Awesome Quarto Extension by typing
quarto install extension quarto-ext/fontawesomein the terminal. - We will be asked, “Do you trust the authors of this extension?” Type “Yes.”
- We will be asked, “Would you like to continue?” Type “Yes.”
- There should be a new folder called
_extensions. Inside that folder, there should be a folder namedfontawesome. - 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:
- Add to markdown: https://stackoverflow.com/questions/63913973/how-can-i-put-fontawesome-icons-in-markdown-readme
- GitHub repository: https://github.com/FortAwesome/Font-Awesome
- R font awesome package: https://github.com/rstudio/fontawesome
For example:
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/crown.svg" width="50" height="50">Produces:
- To change the citation style, change the
csl:argument in_quarto.yml. For example, usecsl: ama.cslto change the citation style to AMA. - Here is more information about citations from Test Quarto Book.
- 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.