diff --git a/DESCRIPTION b/DESCRIPTION
index 16e5cdd..26165a1 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: labeleR
Title: Automate the Production of Custom Labels, Badges, Certificates, and Other Documents
-Version: 0.4.0
+Version: 0.4.1
Authors@R:
c(
person("Ignacio", "Ramos-Gutierrez",, "ig.ramosgutierrez@gmail.com", role = c("aut", "cre", "cph"),
diff --git a/NEWS.md b/NEWS.md
index 43740c9..7573ff3 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,7 @@
+# labeleR 0.4.1
+
+* New argument `font` allows users to change the document font
+
# labeleR 0.4.0
* New function to create book of abstracts
diff --git a/R/abstractbook.R b/R/abstractbook.R
index 71d5d71..eeb5ce2 100644
--- a/R/abstractbook.R
+++ b/R/abstractbook.R
@@ -25,14 +25,17 @@
#' in the output folder? Default is FALSE.
#' @param template Character (optional) RMarkdown template to use. If not provided,
#' using the default template included in `labeleR`.
+#' @inheritParams create_badge
#'
#' @return A PDF file named after `filename` is saved on disk, in the folder defined
#' by `path`. If `keep.files = TRUE`, an RMarkdown will also
#' appear in the same folder.
#'
-#' @details You can copy and modify at your convenience \href{https://docs.google.com/forms/d/1u4SFWDobQrD8AEvKpvPCdwAZiVGd55B2dAtPmPEfU6E/copy}{this Google form template}
+#' @note
+#' You can copy and modify at your convenience \href{https://docs.google.com/forms/d/1u4SFWDobQrD8AEvKpvPCdwAZiVGd55B2dAtPmPEfU6E/copy}{this Google form template}
#' to retrieve abstract information which will match labeleR's requirements for a straightforward use.
#'
+#' @inherit create_badge details
#'
#' @export
#'
@@ -50,6 +53,7 @@
#' title.cex = 20,
#' authors.cex = 15,
#' affiliations.cex = 14,
+#' font = "libertinus",
#' text.cex = 12,
#' frontpage = "Congress_frontpage.pdf"
#')
@@ -68,6 +72,7 @@ create_abstractbook <- function(data = NULL,
authors.cex = 16,
affiliations.cex = 14,
text.cex = 14,
+ font = NULL,
keep.files = FALSE,
template = NULL) {
@@ -92,6 +97,15 @@ create_abstractbook <- function(data = NULL,
filename <- "AbstractBook"
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
+
# if (is.null(event)) {
# message("No event provided")
# event <- ""
@@ -239,7 +253,8 @@ create_abstractbook <- function(data = NULL,
title.cex = as.character(rep(title.cex , times = nrow(data))) ,
authors.cex = as.character(rep(authors.cex , times = nrow(data))) ,
affiliations.cex = as.character(rep(affiliations.cex , times = nrow(data))) ,
- text.cex = as.character(rep(text.cex , times = nrow(data)))
+ text.cex = as.character(rep(text.cex , times = nrow(data))),
+ font = font
)
)
diff --git a/R/badge.R b/R/badge.R
index 6d81fa7..750d801 100644
--- a/R/badge.R
+++ b/R/badge.R
@@ -11,6 +11,7 @@
#' storing participants' affiliation.
#' @param lpic Character (optional) Path to a PNG image to be located in the badge top-left.
#' @param rpic Character (optional) Path to a PNG image to be located in the badge top-right.
+#' @param font Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.
#' @param keep.files Logical. Keep the RMarkdown template and associated files
#' in the output folder? Default is FALSE.
#' @param template Character (optional) RMarkdown template to use. If not provided,
@@ -20,6 +21,33 @@
#' by `path`. If `keep.files = TRUE`, an RMarkdown and PNG lpic and rpic files will also
#' appear in the same folder.
#'
+#' @details
+#'
+#' **font**
+#' Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+#' and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+#' `\normalfont`, `\itshape` and `\bfseries` usually fail during installation and/or rendering.
+#'
+#' Several fonts tried that seem to work are:
+#' - libertinus
+#' - accanthis
+#' - Alegreya
+#' - algolrevived
+#' - almendra
+#' - antpolt
+#' - Archivo
+#' - Baskervaldx
+#' - bitter
+#' - tgbonum
+#' - caladea
+#' - librecaslon
+#' - tgchorus
+#' - cyklop
+#' - forum
+#' - imfellEnglish
+#' - LobsterTwo
+#' - quattrocento
+#'
#' @export
#'
#' @author Ignacio Ramos-Gutierrez, Julia G. de Aledo, Francisco Rodriguez-Sanchez
@@ -32,6 +60,7 @@
#' event = "INTERNATIONAL CONFERENCE OF MUGGLEOLOGY",
#' name.column = "List",
#' affiliation.column = "Affiliation",
+#' font = "libertinus",
#' lpic = NULL,
#' rpic = NULL)
@@ -43,6 +72,7 @@ create_badge <- function(data = NULL,
affiliation.column = NULL,
lpic = NULL,
rpic = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL) {
@@ -72,6 +102,15 @@ create_badge <- function(data = NULL,
event <- ""
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
+
check_column_in_df(data, name.column)
data[,name.column] <- check_latex(data, name.column)
@@ -126,7 +165,8 @@ create_badge <- function(data = NULL,
params = list(
event = event,
names = data[, name.column],
- affiliations = if (affiliation.column == "") {"~"} else {data[, affiliation.column]}
+ affiliations = if (affiliation.column == "") {"~"} else {data[, affiliation.column]},
+ font = font
)
)
diff --git a/R/certificate_attendance.R b/R/certificate_attendance.R
index e886efe..7038045 100644
--- a/R/certificate_attendance.R
+++ b/R/certificate_attendance.R
@@ -26,11 +26,14 @@
#' in the output folder? Default is FALSE.
#' @param template Character (optional) RMarkdown template to use. If not provided,
#' using the default template included in `labeleR`.
+#' @inheritParams create_badge
#'
#' @return PDF certificates are saved on disk, in the folder defined
#' by `path`. If `keep.files = TRUE`, the RMarkdown template and PNG logo files
#' will also appear in the same folder.
#'
+#' @inherit create_badge details
+#'
#' @export
#'
#' @author Ignacio Ramos-Gutierrez, Julia G. de Aledo, Francisco Rodriguez-Sanchez
@@ -52,6 +55,7 @@
#' lpic = NULL,
#' rpic = NULL,
#' signature.pic = NULL,
+#' font = "libertinus"
#' )
@@ -73,6 +77,7 @@ create_attendance_certificate <- function(
signature.pic = NULL,
lpic = NULL,
rpic = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL) {
@@ -101,6 +106,15 @@ create_attendance_certificate <- function(
if (language == "Spanish") {filename <- "Asistencia"}
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
+
sendmail <- sendmail_setup(email.column, email.info)
@@ -203,7 +217,8 @@ create_attendance_certificate <- function(
date = if (date == "") {bl.char} else {date},
hours = if (hours == "") {bl.char} else {hours},
signer = if (signer == "") {bl.char} else {signer},
- signer.role = if (signer.role == "") {bl.char} else {signer.role}
+ signer.role = if (signer.role == "") {bl.char} else {signer.role},
+ font = font
)
)
diff --git a/R/certificate_participation.R b/R/certificate_participation.R
index d81b170..84027be 100644
--- a/R/certificate_participation.R
+++ b/R/certificate_participation.R
@@ -33,6 +33,9 @@
#' in the output folder? Default is FALSE.
#' @param template Character (optional) RMarkdown template to use. If not provided,
#' using the default template included in `labeleR`.
+#' @inheritParams create_badge
+#'
+#' @inherit create_badge details
#'
#' @return PDF certificates are saved on disk, in the folder defined
#' by `path`. If `keep.files = TRUE`, the RMarkdown template and PNG logo files
@@ -60,7 +63,8 @@
#' signer.role = "School Headmaster",
#' lpic = NULL,
#' rpic = NULL,
-#' signature.pic = NULL
+#' signature.pic = NULL,
+#' font = "libertinus"
#' )
create_participation_certificate <- function(
@@ -84,6 +88,7 @@ create_participation_certificate <- function(
signature.pic = NULL,
lpic = NULL,
rpic = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
){
@@ -112,6 +117,14 @@ create_participation_certificate <- function(
if (language == "Spanish") {filename <- "Participacion"}
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
sendmail <- sendmail_setup(email.column, email.info)
@@ -238,7 +251,8 @@ create_participation_certificate <- function(
date.i = if (date.column == "") {bl.char} else {data[i, date.column]},
freetext.i = if (freetext == "") {bl.char} else {freetext},
signer.i = if (signer == "") {bl.char} else {signer},
- signer.role.i = if (signer.role == "") {bl.char} else {signer.role}
+ signer.role.i = if (signer.role == "") {bl.char} else {signer.role},
+ font = font
)
)
diff --git a/R/collection_label.R b/R/collection_label.R
index ef3a2d9..a745bca 100644
--- a/R/collection_label.R
+++ b/R/collection_label.R
@@ -27,6 +27,8 @@
#' by `path`. If `keep.files = TRUE`, an RMarkdown and PNG logo files will also
#' appear in the same folder.
#'
+#' @inherit create_badge details
+#'
#' @export
#'
#' @author Ignacio Ramos-Gutierrez, Julia G. de Aledo, Francisco Rodriguez-Sanchez
@@ -56,6 +58,7 @@ create_collection_label <- function(data = NULL,
logo = NULL,
bgcolor = "D0ECC1",
textcolor = "1E3F20",
+ font = NULL,
keep.files = FALSE,
template = NULL) {
@@ -81,6 +84,15 @@ create_collection_label <- function(data = NULL,
filename <- "Collection_label"
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
+
## QR code
@@ -163,8 +175,10 @@ create_collection_label <- function(data = NULL,
field4.i = if (field4.column == "") {bl.char} else {data[,field4.column]},
field5.i = if (field5.column == "") {bl.char} else {data[,field5.column]},
bgcolor = bgcolor,
- textcolor = textcolor
+ textcolor = textcolor,
+ font = font
)
)
-}
+
+ }
diff --git a/R/herbarium.R b/R/herbarium.R
index 92b2a15..ebbafba 100644
--- a/R/herbarium.R
+++ b/R/herbarium.R
@@ -41,6 +41,8 @@
#' was collected.
#' @inheritParams create_badge
#'
+#' @inherit create_badge details
+#'
#' @return A pdf file with four herbarium labels per page within an 'output' folder.
#'
#' @export
@@ -69,7 +71,8 @@
#' collector.column = "Collector",
#' collection.column = "Collection_number",
#' assistants.column = "Assistants",
-#' date.column = "Date"
+#' date.column = "Date",
+#' font = "libertinus"
#' )
create_herbarium_label <- function(data = data,
@@ -95,6 +98,7 @@ create_herbarium_label <- function(data = data,
collection.column = NULL,
assistants.column = NULL,
date.column = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
){
@@ -119,6 +123,15 @@ create_herbarium_label <- function(data = data,
filename <- "Herbarium"
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
+
if (any(apply(data, 1, nchar) > 150)) {
message("Too long texts may give undesired results. Please consider shortening long fields.")
@@ -274,7 +287,8 @@ create_herbarium_label <- function(data = data,
collector.i = if (collector.column == "") {bl.char} else {data[,collector.column]},
collection.i = if (collection.column == "") {bl.char} else {data[,collection.column]},
assistants.i = if (assistants.column == "") {bl.char} else {data[,assistants.column]},
- date.i = if (date.column == "") {bl.char} else {data[,date.column]}
+ date.i = if (date.column == "") {bl.char} else {data[,date.column]},
+ font = font
)
)
diff --git a/R/multichoice.R b/R/multichoice.R
index 9259162..ce506a8 100644
--- a/R/multichoice.R
+++ b/R/multichoice.R
@@ -25,6 +25,8 @@
#' (as front page and/or instructions).
#' @inheritParams create_badge
#'
+#' @inherit create_badge details
+#'
#' @return A PDF file is saved on disk, in the folder defined
#' by `path`. If `keep.files = TRUE`, an RMarkdown file will also appear in the same folder.
#'
@@ -43,6 +45,7 @@
#' option2.column = "opt2",
#' option3.column = "opt3",
#' option4.column = "opt4",
+#' font = "libertinus",
#' start = 1,
#' solutions=T,
#' seeds = c(1:2)
@@ -62,6 +65,7 @@ create_multichoice <- function(data = NULL,
start = 1,
seeds = NULL,
frontpage = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL) {
@@ -87,6 +91,14 @@ create_multichoice <- function(data = NULL,
filename <- "Exam"
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
if (any(apply(data, 1, nchar) > 150)) {
message("Too long texts may give undesired results. Please consider shortening long fields.")
@@ -222,7 +234,8 @@ create_multichoice <- function(data = NULL,
option2.i = if (option2.column == "") {bl.char} else {data[,option2.column]},
option3.i = if (option3.column == "") {bl.char} else {data[,option3.column]},
option4.i = if (option4.column == "") {bl.char} else {data[,option4.column]},
- image.i = if (image.column == "") {bl.char} else {data[,image.column]}
+ image.i = if (image.column == "") {bl.char} else {data[,image.column]},
+ font = font
)
)
@@ -248,7 +261,8 @@ create_multichoice <- function(data = NULL,
option2.i = if (option2.column == "") {bl.char} else {datasols[,option2.column]},
option3.i = if (option3.column == "") {bl.char} else {datasols[,option3.column]},
option4.i = if (option4.column == "") {bl.char} else {datasols[,option4.column]},
- image.i = if (image.column == "") {bl.char} else {data[,image.column]}
+ image.i = if (image.column == "") {bl.char} else {data[,image.column]},
+ font = font
)
)
}
diff --git a/R/tiny_label.R b/R/tiny_label.R
index 6c0a173..33b1941 100644
--- a/R/tiny_label.R
+++ b/R/tiny_label.R
@@ -20,6 +20,8 @@
#' appear below field4.
#' @inheritParams create_badge
#'
+#' @inherit create_badge details
+#'
#' @return A PDF file named "Tiny_label.pdf" is saved on disk, in the folder defined
#' by `path`. If `keep.files = TRUE`, an RMarkdown file will also appear in the same folder.
#'
@@ -36,7 +38,8 @@
#' field2.column = "field2",
#' field3.column = "field3",
#' field4.column = "field4",
-#' field5.column = "field5"
+#' field5.column = "field5",
+#' font = "libertinus"
#' )
#'
@@ -49,6 +52,7 @@ create_tiny_label <- function(data = NULL,
field3.column = NULL,
field4.column = NULL,
field5.column = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL) {
@@ -73,6 +77,14 @@ create_tiny_label <- function(data = NULL,
filename <- "Tiny_label"
}
+ if(is.null(font)){
+ font <- ""
+ }else{
+ font <- as.character(font)
+ if(length(font)!= 1){
+ stop("Font length should be 1")
+ }
+ }
if (any(apply(data, 1, nchar) > 150)) {
message("Too long texts may give undesired results. Please consider shortening long fields.")
@@ -154,7 +166,8 @@ create_tiny_label <- function(data = NULL,
field2.i = if (field2.column == "") {bl.char} else {data[,field2.column]},
field3.i = if (field3.column == "") {bl.char} else {data[,field3.column]},
field4.i = if (field4.column == "") {bl.char} else {data[,field4.column]},
- field5.i = if (field5.column == "") {bl.char} else {data[,field5.column]}
+ field5.i = if (field5.column == "") {bl.char} else {data[,field5.column]},
+ font = font
)
)
diff --git a/README.Rmd b/README.Rmd
index 3e85546..02b3f23 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -33,13 +33,15 @@ knitr::opts_chunk$set(
-Have you ever thought, if there was an automatic way…? labeleR is an R package to optimize the creation of your own collection labels, scientific documentation for events, and much more! 🏷️
+Have you ever thought, if there was an automatic way…? labeleR is an R
+package to optimize the creation of your own collection labels,
+scientific documentation for events, and much more! 🏷️
-If you need to create your labels (for your lab, plant
-vouchers, insect collections), attendance, participation certificates or
-accreditation badges (to a course, a congress)... labeleR is the answer!
-Decide which function to use, copy the code into your console, modify it
-and run! Keep an eye 👀 on this easy tutorial on how to use it 👇
+If you need to create your labels (for your lab, plant vouchers, insect
+collections), attendance, participation certificates or accreditation
+badges (to a course, a congress)... labeleR is the answer! Decide which
+function to use, copy the code into your console, modify it and run!
+Keep an eye 👀 on this easy tutorial on how to use it 👇
## Installing labeleR
@@ -191,9 +193,6 @@ Warning! Including too long texts may cause the alteration of the
structure of the labels, so we recommend to be concise (specially with
area description!)
-|  |
-|-------------------------------------------------------------|
-
##### Herbarium labels example:
In this example, we show the labels some students have created for their
@@ -228,9 +227,6 @@ create_herbarium_label(
```
-|  |
-|---------------------------------------------------------------|
-
#### 2.1.2. Collection labels
Collection labels are one of the most aesthetic labels. They have five
@@ -245,9 +241,6 @@ their preference, using HTML color codes (same code as HEX, but without
the '\#'). By default, background colors are two hues of green. Eight
different labels will fit in each of the A4 pdf pages.
-|  |
-|---------------------------------------------------------------|
-
##### Collection labels example:
In this example we can see six labels created for the school's displayed
@@ -270,9 +263,6 @@ create_collection_label(
)
```
-|  |
-|-----------------------------------------------------------------|
-
### 2.1.3 Tiny labels
This type of labels is a simplified version of the previous, and
@@ -288,9 +278,6 @@ size is too big for the pretended use (as can happen for small insect
collections, for example), we recommend to use the "print several pages
per sheet" in the printer's options.
-|  |
-|---------------------------------------------------------|
-
#### Tinylabels example:
Here, tiny labels are created for typical collections stored in insect
@@ -311,9 +298,6 @@ create_tiny_label(
```
-|  |
-|---------------------------------------------------|
-
### 2.2. Documents for scientific events
#### 2.2.1. Abstract book
@@ -356,9 +340,6 @@ As an example, we present the accreditation cards that might have been
used in the International Conference of Muggleology, where the only
changing fields are names and affiliations of attendees.
-|  |
-|------------------------------------------------------|
-
### 2.2.2. Badges
Badges can be used for personal accreditation in congresses, courses,
@@ -367,9 +348,6 @@ affiliation), and can include two top logos or images, although are not
signed. Accreditation cards include a dot line in the bottom for
individual hand-edition.
-|  |
-|-------------------------------------------------|
-
#### Badges example:
```{r create accreditations, eval=FALSE}
@@ -389,12 +367,10 @@ As an example, we present the accreditation cards that might have been
used in the International Conference of Muggleology, where the only
changing fields are names and affiliations of attendees.
-|  |
-|-------------------------------------------|
-
#### 2.2.3. Attendance certificates
-**NOTE:** It is possible to send certificates automatically via email! To see how go to the FAQ section!
+**NOTE:** It is possible to send certificates automatically via email!
+To see how go to the FAQ section!
Attendance certificates are one of the easiest templates; the only
variable parameter is the name of the attendees. Our template allows to
@@ -405,9 +381,6 @@ modify their size in the template.
The structure of the certificate looks as follows:
-|  |
-|---------------------------------------------------------------------|
-
##### Attendance certificate example:
In this example, we create four different certificates for four students
@@ -439,9 +412,6 @@ create_attendance_certificate(
In this example, each certificate will be rendered in an individual PDF
document.
-|  |
-|---------------------------------------------------------------------|
-
#### 2.2.4 Participation certificates
Participation certificates are similar to the previous, but with more
@@ -449,9 +419,6 @@ variable parameters (such as speaker, affiliation, title, etc.). As well
as the attendance certificate, these documents can be rendered in
English and in Spanish.
-|  |
-|------------------------------------------------------|
-
#### Participation certificate example:
Here, Albus Dumbledore certifies that four of the school teachers have
@@ -483,10 +450,6 @@ create_participation_certificate(
In this example, each certificate will be rendered in an individual PDF
document in a common folder.
-|  |
-|------------------------------------------------------|
-
-
### 2.3. Other functions
The ´labeleR´ philosophy is quite simple: creating documents with a
@@ -532,11 +495,101 @@ create_multichoice(
#### Multiple choice exam example:
-|  |
-|-------------------------------------------------------------|
+|  |
+|------------------------------------------|
## 3. Frequently Asked Questions
+### Template customization
+
+One of the greatest features of `labeleR`, in our opinion, is its
+customizable potential to attend all user's needs. Although functions
+have a set number of arguments (as the information they gather has to be
+checked adn translated to LATEX), the way it is rendered can be adapted
+to each user preference. Some of the most common changes are listed
+here, and some clues on how to adapt them on your template. To see how
+to create and use a custom template see section [1.2 Some advice for the
+labeleR functions].
+
+**\*NOTE:** Backslashes (i.e. `\`) define special characters in
+different ways. When editing a RMarkdown template (e.g. certificates)
+only one bar is needed. However, when a text in R has to be passed to
+Markdown and render after (i.e. templates starting with a `cat()`
+function), double backslashes (`\\`) must be used!
+
+- [Text size:]{.underline}\
+ Text size can be defined using functions as (e.g.) `{\Huge text }`
+ to make it "huge", or different default type sizes ([see
+ more](https://texblog.org/2012/08/29/changing-the-font-size-in-latex/)).
+ Alternatively, a specific font size can be specified using
+ `{\fontsize{30pt}{0pt}\selectfont text }` (in this case to set a
+ font size of 30).
+
+- [Text emphasis (bold/italic/teletype):]{.underline} To make a text
+ bold, use `\bf{ text }`. To make a text italics, use
+ `\textit{ text }` or `\emph{ text }` . To make a text appear in code
+ appearance, use `\texttt{ text }`
+
+- [Image size:]{.underline} When images are included in documents,
+ their size can be modified using
+ `\includegraphics[height=1.5cm]{lpic.png}` (in this case to reduce
+ it to 1.5 cm from the original 3 cm). QR codes can be also scaled
+ using (e.g.) `\qrcode[height=0.5in, version=5]`.
+
+- [Font type:]{.underline} If a non-default font type has to be used
+ just for one parameter, for example, it should be specified in the
+ template as follows: `{\fontfamily{pcr}\selectfont text }`. Here,
+ what has to be specified is the "font code" ([see available codes
+ here](https://www.overleaf.com/learn/latex/Font_typefaces)); we have
+ used `pcr`, "courier"). Bear in mind that no spaces can be left
+ between the brackets and the code.
+
+### Including italic or bold texts within a single text
+
+This implementation should be used just to change text formats in only a
+part of values stored in columns (variable parameters).
+
+To do so, you must edit the cell value, specifying where the italics
+text must start with `\\textit` (or `\\emph`, which allows to open
+italics in a reular text, and vice-versa), and `\\end` where it ends;
+and `\\textbf` followed by `\\end` for bold text. In case you want to
+combine both, you will have to specify `\\end` twice.
+
+For example, this could be helpful to include italics in a species name
+which is included as part of a title; where just the species name should
+be italicized.
+
+```{r custom italics, eval=FALSE}
+seminar.table <- data.frame(
+ "Name" = "Rubeus Hagrid",
+ "Date" = "01/01/1996",
+ "Title" = "Population dynamics of a species of giant spider
+ (\\textitAcromantula gigantea\\end) in Hogwart's Forbidden Forest",
+ "Comm.type" = "seminar",
+ "Affil" = "Hogwarts Keeper of Keys and Grounds")
+
+create_participation_certificate(
+ data = seminar.table,
+ path = "labeleR_output",
+ filename = "participation_certificates",
+ language = "English",
+ name.column = "Name",
+ affiliation.column = "Affil",
+ comm.type.column = "Comm.type",
+ title.column = "Title",
+ date.column = "Date",
+ type = "online",
+ event = "seminar",
+ freetext = "organized by Hogwarts School of Magic and Wizardry",
+ signer = "A.P.W.B. Dumbledore",
+ signer.role = "School Headmaster",
+ rpic = system.file("rmarkdown/pictures/Hogwartslogo.png", package = "labeleR"),
+ lpic = system.file("rmarkdown/pictures/MinMagic.png", package = "labeleR"),
+ signature.pic = system.file("rmarkdown/pictures/dumbledore.png", package = "labeleR")
+)
+
+```
+
## Send certificates automatically using create_certificate functions
Sending attendance or participation certificates one by one by hand can
@@ -590,9 +643,6 @@ soon as they are rendered!\
Here an example of how the recipient will receive the mail:
-|  |
-|-----------------------------------------|
-
```{r eval = F}
create_attendance_certificate(
@@ -615,56 +665,6 @@ create_attendance_certificate(
)
```
-### Including italic or bold texts within a single text
-
-This implementation should be used just to change text formats in only a
-part of values stored in columns (variable parameters).
-
-To do so, you must edit the cell value, specifying where the italics
-text must start with `\\textit` (or `\\emph`, which allows to open
-italics in a reular text, and vice-versa), and `\\end` where it ends;
-and `\\textbf` followed by `\\end` for bold text. In case you want to
-combine both, you will have to specify `\\end` twice.
-
-For example, this could be helpful to include italics in a species name
-which is included as part of a title; where just the species name should
-be italicized.
-
-```{r custom italics, eval=FALSE}
-seminar.table <- data.frame(
- "Name" = "Rubeus Hagrid",
- "Date" = "01/01/1996",
- "Title" = "Population dynamics of a species of giant spider
- (\\textitAcromantula gigantea\\end) in Hogwart's Forbidden Forest",
- "Comm.type" = "seminar",
- "Affil" = "Hogwarts Keeper of Keys and Grounds")
-
-create_participation_certificate(
- data = seminar.table,
- path = "labeleR_output",
- filename = "participation_certificates",
- language = "English",
- name.column = "Name",
- affiliation.column = "Affil",
- comm.type.column = "Comm.type",
- title.column = "Title",
- date.column = "Date",
- type = "online",
- event = "seminar",
- freetext = "organized by Hogwarts School of Magic and Wizardry",
- signer = "A.P.W.B. Dumbledore",
- signer.role = "School Headmaster",
- rpic = system.file("rmarkdown/pictures/Hogwartslogo.png", package = "labeleR"),
- lpic = system.file("rmarkdown/pictures/MinMagic.png", package = "labeleR"),
- signature.pic = system.file("rmarkdown/pictures/dumbledore.png", package = "labeleR")
-)
-
-```
-
-|  |
-|-------------------------------------------------------------|
-
-
## Citation
```{r citation, eval=TRUE}
diff --git a/README.md b/README.md
index 2285938..58ab351 100644
--- a/README.md
+++ b/README.md
@@ -180,9 +180,6 @@ Warning! Including too long texts may cause the alteration of the
structure of the labels, so we recommend to be concise (specially with
area description!)
-|  |
-|--------------------------------------|
-
##### Herbarium labels example:
In this example, we show the labels some students have created for their
@@ -216,9 +213,6 @@ create_herbarium_label(
)
```
-|  |
-|---------------------------------------|
-
#### 2.1.2. Collection labels
Collection labels are one of the most aesthetic labels. They have five
@@ -233,9 +227,6 @@ their preference, using HTML color codes (same code as HEX, but without
the ‘\#’). By default, background colors are two hues of green. Eight
different labels will fit in each of the A4 pdf pages.
-|  |
-|----------------------------------------------|
-
##### Collection labels example:
In this example we can see six labels created for the school’s displayed
@@ -258,9 +249,6 @@ create_collection_label(
)
```
-|  |
-|----------------------------------------|
-
### 2.1.3 Tiny labels
This type of labels is a simplified version of the previous, and
@@ -276,9 +264,6 @@ size is too big for the pretended use (as can happen for small insect
collections, for example), we recommend to use the “print several pages
per sheet” in the printer’s options.
-|  |
-|---------------------------------------|
-
#### Tinylabels example:
Here, tiny labels are created for typical collections stored in insect
@@ -298,9 +283,6 @@ create_tiny_label(
)
```
-|  |
-|---------------------------------|
-
### 2.2. Documents for scientific events
#### 2.2.1. Abstract book
@@ -343,9 +325,6 @@ As an example, we present the accreditation cards that might have been
used in the International Conference of Muggleology, where the only
changing fields are names and affiliations of attendees.
-|  |
-|-------------------------------------------|
-
### 2.2.2. Badges
Badges can be used for personal accreditation in congresses, courses,
@@ -354,9 +333,6 @@ affiliation), and can include two top logos or images, although are not
signed. Accreditation cards include a dot line in the bottom for
individual hand-edition.
-|  |
-|-----------------------------------|
-
#### Badges example:
``` r
@@ -376,9 +352,6 @@ As an example, we present the accreditation cards that might have been
used in the International Conference of Muggleology, where the only
changing fields are names and affiliations of attendees.
-|  |
-|-----------------------------|
-
#### 2.2.3. Attendance certificates
**NOTE:** It is possible to send certificates automatically via email!
@@ -393,9 +366,6 @@ modify their size in the template.
The structure of the certificate looks as follows:
-|  |
-|---------------------------------------|
-
##### Attendance certificate example:
In this example, we create four different certificates for four students
@@ -426,9 +396,6 @@ create_attendance_certificate(
In this example, each certificate will be rendered in an individual PDF
document.
-|  |
-|----------------------------------------------|
-
#### 2.2.4 Participation certificates
Participation certificates are similar to the previous, but with more
@@ -436,9 +403,6 @@ variable parameters (such as speaker, affiliation, title, etc.). As well
as the attendance certificate, these documents can be rendered in
English and in Spanish.
-|  |
-|------------------------------------------|
-
#### Participation certificate example:
Here, Albus Dumbledore certifies that four of the school teachers have
@@ -470,9 +434,6 @@ create_participation_certificate(
In this example, each certificate will be rendered in an individual PDF
document in a common folder.
-|  |
-|-------------------------------------------------|
-
### 2.3. Other functions
The ´labeleR´ philosophy is quite simple: creating documents with a
@@ -523,6 +484,95 @@ create_multichoice(
## 3. Frequently Asked Questions
+### Template customization
+
+One of the greatest features of `labeleR`, in our opinion, is its
+customizable potential to attend all user’s needs. Although functions
+have a set number of arguments (as the information they gather has to be
+checked adn translated to LATEX), the way it is rendered can be adapted
+to each user preference. Some of the most common changes are listed
+here, and some clues on how to adapt them on your template. To see how
+to create and use a custom template see section [1.2 Some advice for the
+labeleR functions](#some-advice-for-the-labeler-functions).
+
+**\*NOTE:** Backslashes (i.e. `\`) define special characters in
+different ways. When editing a RMarkdown template (e.g. certificates)
+only one bar is needed. However, when a text in R has to be passed to
+Markdown and render after (i.e. templates starting with a `cat()`
+function), double backslashes (`\\`) must be used!
+
+- Text size:
+ Text size can be defined using functions as (e.g.) `{\Huge text }` to
+ make it “huge”, or different default type sizes ([see
+ more](https://texblog.org/2012/08/29/changing-the-font-size-in-latex/)).
+ Alternatively, a specific font size can be specified using
+ `{\fontsize{30pt}{0pt}\selectfont text }` (in this case to set a font
+ size of 30).
+
+- Text emphasis (bold/italic/teletype): To make a text bold, use
+ `\bf{ text }`. To make a text italics, use `\textit{ text }` or
+ `\emph{ text }` . To make a text appear in code appearance, use
+ `\texttt{ text }`
+
+- Image size: When images are included in documents, their size
+ can be modified using `\includegraphics[height=1.5cm]{lpic.png}` (in
+ this case to reduce it to 1.5 cm from the original 3 cm). QR codes can
+ be also scaled using (e.g.) `\qrcode[height=0.5in, version=5]`.
+
+- Font type: If a non-default font type has to be used just for
+ one parameter, for example, it should be specified in the template as
+ follows: `{\fontfamily{pcr}\selectfont text }`. Here, what has to be
+ specified is the “font code” ([see available codes
+ here](https://www.overleaf.com/learn/latex/Font_typefaces)); we have
+ used `pcr`, “courier”). Bear in mind that no spaces can be left
+ between the brackets and the code.
+
+### Including italic or bold texts within a single text
+
+This implementation should be used just to change text formats in only a
+part of values stored in columns (variable parameters).
+
+To do so, you must edit the cell value, specifying where the italics
+text must start with `\\textit` (or `\\emph`, which allows to open
+italics in a reular text, and vice-versa), and `\\end` where it ends;
+and `\\textbf` followed by `\\end` for bold text. In case you want to
+combine both, you will have to specify `\\end` twice.
+
+For example, this could be helpful to include italics in a species name
+which is included as part of a title; where just the species name should
+be italicized.
+
+``` r
+seminar.table <- data.frame(
+ "Name" = "Rubeus Hagrid",
+ "Date" = "01/01/1996",
+ "Title" = "Population dynamics of a species of giant spider
+ (\\textitAcromantula gigantea\\end) in Hogwart's Forbidden Forest",
+ "Comm.type" = "seminar",
+ "Affil" = "Hogwarts Keeper of Keys and Grounds")
+
+create_participation_certificate(
+ data = seminar.table,
+ path = "labeleR_output",
+ filename = "participation_certificates",
+ language = "English",
+ name.column = "Name",
+ affiliation.column = "Affil",
+ comm.type.column = "Comm.type",
+ title.column = "Title",
+ date.column = "Date",
+ type = "online",
+ event = "seminar",
+ freetext = "organized by Hogwarts School of Magic and Wizardry",
+ signer = "A.P.W.B. Dumbledore",
+ signer.role = "School Headmaster",
+ rpic = system.file("rmarkdown/pictures/Hogwartslogo.png", package = "labeleR"),
+ lpic = system.file("rmarkdown/pictures/MinMagic.png", package = "labeleR"),
+ signature.pic = system.file("rmarkdown/pictures/dumbledore.png", package = "labeleR")
+)
+
+```
+
## Send certificates automatically using create_certificate functions
Sending attendance or participation certificates one by one by hand can
@@ -576,9 +626,6 @@ soon as they are rendered!
Here an example of how the recipient will receive the mail:
-|  |
-|----------------------------|
-
``` r
create_attendance_certificate(
@@ -601,55 +648,6 @@ create_attendance_certificate(
)
```
-### Including italic or bold texts within a single text
-
-This implementation should be used just to change text formats in only a
-part of values stored in columns (variable parameters).
-
-To do so, you must edit the cell value, specifying where the italics
-text must start with `\\textit` (or `\\emph`, which allows to open
-italics in a reular text, and vice-versa), and `\\end` where it ends;
-and `\\textbf` followed by `\\end` for bold text. In case you want to
-combine both, you will have to specify `\\end` twice.
-
-For example, this could be helpful to include italics in a species name
-which is included as part of a title; where just the species name should
-be italicized.
-
-``` r
-seminar.table <- data.frame(
- "Name" = "Rubeus Hagrid",
- "Date" = "01/01/1996",
- "Title" = "Population dynamics of a species of giant spider
- (\\textitAcromantula gigantea\\end) in Hogwart's Forbidden Forest",
- "Comm.type" = "seminar",
- "Affil" = "Hogwarts Keeper of Keys and Grounds")
-
-create_participation_certificate(
- data = seminar.table,
- path = "labeleR_output",
- filename = "participation_certificates",
- language = "English",
- name.column = "Name",
- affiliation.column = "Affil",
- comm.type.column = "Comm.type",
- title.column = "Title",
- date.column = "Date",
- type = "online",
- event = "seminar",
- freetext = "organized by Hogwarts School of Magic and Wizardry",
- signer = "A.P.W.B. Dumbledore",
- signer.role = "School Headmaster",
- rpic = system.file("rmarkdown/pictures/Hogwartslogo.png", package = "labeleR"),
- lpic = system.file("rmarkdown/pictures/MinMagic.png", package = "labeleR"),
- signature.pic = system.file("rmarkdown/pictures/dumbledore.png", package = "labeleR")
-)
-
-```
-
-|  |
-|--------------------------------------------------------|
-
## Citation
``` r
diff --git a/inst/rmarkdown/templates/abstractbook/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/abstractbook/skeleton/skeleton.Rmd
index cc578d3..2dfa7bc 100644
--- a/inst/rmarkdown/templates/abstractbook/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/abstractbook/skeleton/skeleton.Rmd
@@ -17,7 +17,9 @@ params:
title.cex: ""
authors.cex: ""
affiliations.cex: ""
- text.cex: ""
+ text.cex: ""
+ font: ""
+fontfamily: "`r params$font`"
---
```{r echo=FALSE, results='asis'}
diff --git a/inst/rmarkdown/templates/attendance_EN/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/attendance_EN/skeleton/skeleton.Rmd
index 79e3638..5afeb19 100644
--- a/inst/rmarkdown/templates/attendance_EN/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/attendance_EN/skeleton/skeleton.Rmd
@@ -13,6 +13,8 @@ params:
freetext: ""
signer: ""
signer.role: ""
+ font: ""
+fontfamily: "`r params$font`"
---
\begin{center}
diff --git a/inst/rmarkdown/templates/attendance_ES/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/attendance_ES/skeleton/skeleton.Rmd
index c0a28d3..2c2a9e8 100644
--- a/inst/rmarkdown/templates/attendance_ES/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/attendance_ES/skeleton/skeleton.Rmd
@@ -13,6 +13,8 @@ params:
freetext: ""
signer: ""
signer.role: ""
+ font: ""
+fontfamily: "`r params$font`"
---
\begin{center}
diff --git a/inst/rmarkdown/templates/badge/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/badge/skeleton/skeleton.Rmd
index a4b0431..e475a6f 100644
--- a/inst/rmarkdown/templates/badge/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/badge/skeleton/skeleton.Rmd
@@ -12,6 +12,8 @@ params:
event: ""
names: ""
affiliations: ""
+ font: ""
+fontfamily: "`r params$font`"
---
```{r echo=FALSE, results='asis'}
diff --git a/inst/rmarkdown/templates/collection_label/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/collection_label/skeleton/skeleton.Rmd
index 2d49628..d0d8ec9 100644
--- a/inst/rmarkdown/templates/collection_label/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/collection_label/skeleton/skeleton.Rmd
@@ -22,7 +22,9 @@ params:
field4.i: ""
field5.i: ""
bgcolor: ""
- textcolor: ""
+ textcolor: ""
+ font: ""
+fontfamily: "`r params$font`"
---
```{r echo=FALSE, results='asis'}
diff --git a/inst/rmarkdown/templates/herbarium/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/herbarium/skeleton/skeleton.Rmd
index e282c80..559e614 100644
--- a/inst/rmarkdown/templates/herbarium/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/herbarium/skeleton/skeleton.Rmd
@@ -31,6 +31,8 @@ params:
collection.i: ""
assistants.i: ""
date.i: ""
+ font: ""
+fontfamily: "`r params$font`"
---
```{r echo=FALSE, results='asis'}
diff --git a/inst/rmarkdown/templates/multichoice/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/multichoice/skeleton/skeleton.Rmd
index 58faed7..d945c17 100644
--- a/inst/rmarkdown/templates/multichoice/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/multichoice/skeleton/skeleton.Rmd
@@ -16,6 +16,8 @@ params:
option3.i: ""
option4.i: ""
image.i: ""
+ font: ""
+fontfamily: "`r params$font`"
---
```{r echo=FALSE, results='asis'}
diff --git a/inst/rmarkdown/templates/participation_EN/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/participation_EN/skeleton/skeleton.Rmd
index 3f0ab0d..a14d6da 100644
--- a/inst/rmarkdown/templates/participation_EN/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/participation_EN/skeleton/skeleton.Rmd
@@ -16,6 +16,8 @@ params:
signer.i: ""
signer.role.i: ""
freetext.i: ""
+ font: ""
+fontfamily: "`r params$font`"
---
\begin{center}
diff --git a/inst/rmarkdown/templates/participation_ES/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/participation_ES/skeleton/skeleton.Rmd
index 9e82598..edf950d 100644
--- a/inst/rmarkdown/templates/participation_ES/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/participation_ES/skeleton/skeleton.Rmd
@@ -16,6 +16,8 @@ params:
signer.i: ""
signer.role.i: ""
freetext.i: ""
+ font: ""
+fontfamily: "`r params$font`"
---
\begin{center}
diff --git a/inst/rmarkdown/templates/tiny_label/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/tiny_label/skeleton/skeleton.Rmd
index 6fe61bc..106525b 100644
--- a/inst/rmarkdown/templates/tiny_label/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/tiny_label/skeleton/skeleton.Rmd
@@ -16,6 +16,8 @@ params:
field3.i: ""
field4.i: ""
field5.i: ""
+ font: ""
+fontfamily: "`r params$font`"
---
```{r echo=FALSE, results='asis'}
diff --git a/man/create_abstractbook.Rd b/man/create_abstractbook.Rd
index 3b4aa37..2a9f670 100644
--- a/man/create_abstractbook.Rd
+++ b/man/create_abstractbook.Rd
@@ -19,6 +19,7 @@ create_abstractbook(
authors.cex = 16,
affiliations.cex = 14,
text.cex = 14,
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -56,6 +57,8 @@ Separations between authors must be specified using a semi-colon (';').}
\item{text.cex}{Text font size used for the abstract main text body. Default is 14.}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -71,7 +74,35 @@ appear in the same folder.
Create a book of abstracts given a dataframe or tibble.
}
\details{
-You can copy and modify at your convenience \href{https://docs.google.com/forms/d/1u4SFWDobQrD8AEvKpvPCdwAZiVGd55B2dAtPmPEfU6E/copy}{this Google form template}
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
+\note{
+You can copy and modify at your convenience \href{https://docs.google.com/forms/d/1u4SFWDobQrD8AEvKpvPCdwAZiVGd55B2dAtPmPEfU6E/copy}{this Google form template}
to retrieve abstract information which will match labeleR's requirements for a straightforward use.
}
\examples{
@@ -87,6 +118,7 @@ text.column = "abstract_text",
title.cex = 20,
authors.cex = 15,
affiliations.cex = 14,
+font = "libertinus",
text.cex = 12,
frontpage = "Congress_frontpage.pdf"
)
diff --git a/man/create_attendance_certificate.Rd b/man/create_attendance_certificate.Rd
index 3549bd8..6a65ace 100644
--- a/man/create_attendance_certificate.Rd
+++ b/man/create_attendance_certificate.Rd
@@ -22,6 +22,7 @@ create_attendance_certificate(
signature.pic = NULL,
lpic = NULL,
rpic = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -64,6 +65,8 @@ the bottom, above signer's name.}
\item{rpic}{Character (optional). Path to a PNG image to appear in the top-right.}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -78,6 +81,34 @@ will also appear in the same folder.
\description{
Create certificate of attendance (1 certificate per DIN-A4 page)
}
+\details{
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
@@ -96,6 +127,7 @@ create_attendance_certificate(
lpic = NULL,
rpic = NULL,
signature.pic = NULL,
+ font = "libertinus"
)
\dontshow{\}) # examplesIf}
}
diff --git a/man/create_badge.Rd b/man/create_badge.Rd
index 42b0f6e..8217bfe 100644
--- a/man/create_badge.Rd
+++ b/man/create_badge.Rd
@@ -13,6 +13,7 @@ create_badge(
affiliation.column = NULL,
lpic = NULL,
rpic = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -35,6 +36,8 @@ storing participants' affiliation.}
\item{rpic}{Character (optional) Path to a PNG image to be located in the badge top-right.}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -49,6 +52,34 @@ appear in the same folder.
\description{
Create badges (8 badges per DIN-A4 page)
}
+\details{
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
create_badge(
@@ -58,6 +89,7 @@ create_badge(
event = "INTERNATIONAL CONFERENCE OF MUGGLEOLOGY",
name.column = "List",
affiliation.column = "Affiliation",
+ font = "libertinus",
lpic = NULL,
rpic = NULL)
\dontshow{\}) # examplesIf}
diff --git a/man/create_collection_label.Rd b/man/create_collection_label.Rd
index 01152af..9aba528 100644
--- a/man/create_collection_label.Rd
+++ b/man/create_collection_label.Rd
@@ -17,6 +17,7 @@ create_collection_label(
logo = NULL,
bgcolor = "D0ECC1",
textcolor = "1E3F20",
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -53,6 +54,8 @@ appear below field4.}
\item{textcolor}{HTML color for label text. Default is 1E3F20}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -67,6 +70,34 @@ appear in the same folder.
\description{
Create collection labels (8 labels per DIN-A4 page)
}
+\details{
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
diff --git a/man/create_herbarium_label.Rd b/man/create_herbarium_label.Rd
index 71a064f..c323edf 100644
--- a/man/create_herbarium_label.Rd
+++ b/man/create_herbarium_label.Rd
@@ -28,6 +28,7 @@ create_herbarium_label(
collection.column = NULL,
assistants.column = NULL,
date.column = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -93,6 +94,8 @@ collector's assistants.}
\item{date.column}{Character (optional). Name of the column in \code{data} storing the date when the specimen
was collected.}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -105,6 +108,34 @@ A pdf file with four herbarium labels per page within an 'output' folder.
\description{
Create herbarium labels (4 labels per DIN-A4 page)
}
+\details{
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
@@ -128,7 +159,8 @@ create_herbarium_label (
collector.column = "Collector",
collection.column = "Collection_number",
assistants.column = "Assistants",
- date.column = "Date"
+ date.column = "Date",
+ font = "libertinus"
)
\dontshow{\}) # examplesIf}
}
diff --git a/man/create_multichoice.Rd b/man/create_multichoice.Rd
index be7e987..1823e2e 100644
--- a/man/create_multichoice.Rd
+++ b/man/create_multichoice.Rd
@@ -19,6 +19,7 @@ create_multichoice(
start = 1,
seeds = NULL,
frontpage = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -59,6 +60,8 @@ If the length of \code{seeds} is longer than one, a multiple choice exam will be
\item{frontpage}{Character (optional). Path to PDF file to be inserted before the document
(as front page and/or instructions).}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -72,6 +75,34 @@ by \code{path}. If \code{keep.files = TRUE}, an RMarkdown file will also appear
\description{
Creates a multichoice exam, with 4 questions per page (first one has title plus 3 questions).
}
+\details{
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
create_multichoice(
@@ -84,6 +115,7 @@ option1.column = "opt1.correct",
option2.column = "opt2",
option3.column = "opt3",
option4.column = "opt4",
+font = "libertinus",
start = 1,
solutions=T,
seeds = c(1:2)
diff --git a/man/create_participation_certificate.Rd b/man/create_participation_certificate.Rd
index b45e3fd..92cf038 100644
--- a/man/create_participation_certificate.Rd
+++ b/man/create_participation_certificate.Rd
@@ -25,6 +25,7 @@ create_participation_certificate(
signature.pic = NULL,
lpic = NULL,
rpic = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -77,6 +78,8 @@ the bottom, above signer's name.}
\item{rpic}{Character (optional) Path to a PNG image to appear in the top-right.}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -91,6 +94,34 @@ will also appear in the same folder.
\description{
Create certificate of participation (1 certificate per DIN-A4 page)
}
+\details{
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
create_participation_certificate(
@@ -109,7 +140,8 @@ create_participation_certificate(
signer.role = "School Headmaster",
lpic = NULL,
rpic = NULL,
- signature.pic = NULL
+ signature.pic = NULL,
+ font = "libertinus"
)
\dontshow{\}) # examplesIf}
}
diff --git a/man/create_tiny_label.Rd b/man/create_tiny_label.Rd
index 3057728..53a4312 100644
--- a/man/create_tiny_label.Rd
+++ b/man/create_tiny_label.Rd
@@ -14,6 +14,7 @@ create_tiny_label(
field3.column = NULL,
field4.column = NULL,
field5.column = NULL,
+ font = NULL,
keep.files = FALSE,
template = NULL
)
@@ -44,6 +45,8 @@ appear below field3.}
\item{field5.column}{Character (optional). Name of the column in \code{data} storing the fifth free text to
appear below field4.}
+\item{font}{Character. Font face to use. Default is Latin Modern. NOTE: not all fonts are supported, so unexpected results may occur. A list of fonts is available at \url{https://tug.org/FontCatalogue/opentypefonts.html}. See Details for more information.}
+
\item{keep.files}{Logical. Keep the RMarkdown template and associated files
in the output folder? Default is FALSE.}
@@ -57,6 +60,34 @@ by \code{path}. If \code{keep.files = TRUE}, an RMarkdown file will also appear
\description{
Create tiny labels (16 labels per DIN-A4 page)
}
+\details{
+\strong{font}
+Not all fonts can be used. Consider only those which are stated to be 'Part of TeX Live',
+and have OTF and TT available. Additionally, fonts whose 'Usage' differs from
+\verb{\\normalfont}, \verb{\\itshape} and \verb{\\bfseries} usually fail during installation and/or rendering.
+
+Several fonts tried that seem to work are:
+\itemize{
+\item libertinus
+\item accanthis
+\item Alegreya
+\item algolrevived
+\item almendra
+\item antpolt
+\item Archivo
+\item Baskervaldx
+\item bitter
+\item tgbonum
+\item caladea
+\item librecaslon
+\item tgchorus
+\item cyklop
+\item forum
+\item imfellEnglish
+\item LobsterTwo
+\item quattrocento
+}
+}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
create_tiny_label(
@@ -67,7 +98,8 @@ create_tiny_label(
field2.column = "field2",
field3.column = "field3",
field4.column = "field4",
- field5.column = "field5"
+ field5.column = "field5",
+ font = "libertinus"
)
\dontshow{\}) # examplesIf}
}