icons::icon_find("rocket")Icons
You can use Icons in your bookdown
Package site: https://github.com/mitchelloharawild/icons
You will only be able to use free icons.
Fontawesome
Generally Font awesome is my first choice for most icons.
The below code can be used to add . Colour chosen to work on Light and Dark styles.
`r icons::icon_style(icons::fontawesome("rocket", style="solid"), fill = "#648fff")`To add to text do like so:
A compass
(`r icons::icon_style(icons::fontawesome("compass", style="solid"), fill = "#648fff")`)
is useful to find north.This will produce:
A compass () is useful to find north.
You need to set the style fontawesome but not the below 2 icon sets. More info below in the Searching part and Fontawesome styles.
Ionicons
Ionicons is my second choice.
The below code can be used to add .
`r icons::icon_style(icons::ionicons("calculator"), fill = "#648fff")`Bioicons
Bioicons is good for biological icons.
The below code can be used to add .
`r icons::bioicons("dna-7")`Searching
Search for your icons via the following websites:
You can check if the name will work with:
You get a bunch of text but the important lines are:
$`ionicons$rocket`and
$`fontawesome$solid$rocket`This shows there is a rocket icon in ionicons and fontawesome.
Let’s display them.
Ionicons:
Code:
`r icons::icon_style(icons::ionicons("rocket"), fill = "#648fff")`Fontawesome:
Code:
`r icons::icon_style(icons::fontawesome("rocket", style="solid"), fill = "#648fff")`Fontawesome styles
Notice in the search line for fontawesome we had the style (solid) between the set (fontawesome) and the icon (rocket). This is because fontawesome will have some icons with multiple styles. An example is circle.
icons::icon_find("circle")We can display the solid and regular circle for fontawesome.
Solid circle:
Code:
`r icons::icon_style(icons::fontawesome("circle", style="solid"), fill = "#648fff")`regular circle:
Code:
`r icons::icon_style(icons::fontawesome("circle", style="regular"), fill = "#648fff")`Installing icons
See install and icon set download instructions in the setup page.