forked from PeterKDunn/SRM-Textbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UseHTML-gitbook.Rmd
executable file
·61 lines (45 loc) · 1.75 KB
/
UseHTML-gitbook.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
## How to use this online book {-}
In the desktop-computer version of this book,
icons appear at the top of each page.
On other devices,
all or some of these icons may also appear.
* **Navigation**: Navigate between pages using the arrows.
* The **table of contents** can be toggled on or off using the Contents menu item:
```{r echo=FALSE}
knitr::include_graphics("Menu-TOC.png")
```
* Words can be searched for using **Search** button on the menu:
```{r echo=FALSE}
knitr::include_graphics("Menu-Search.png")
```
* The font can be changed (e.g., enlarged) using the **Font** button on the menu:
```{r echo=FALSE}
knitr::include_graphics("Menu-Font.png")
```
* A **PDF** version of the book can be downloaded using the PDF button on the menu:
```{r echo=FALSE}
knitr::include_graphics("Menu-PDF.png")
```
::: {.importantBox .important data-latex="{important}"}
The book is optimised for *online viewing*,
and the book may be updated frequently,
so a printed PDF version may not be the most recent version.
:::
In some places,
interactive 'quiz' questions are given.
*In the online version*,
the background turns from red to green when the answer is correct.
Try it now:
::: {.webex-check .webex-box}
1. What is $1+1$?
`r if( knitr::is_html_output() ) {mcq( c("One", answer="Two", "Three") )}`
1. What is $1+2$?
`r if( knitr::is_html_output() ) {fitb( answer= c("3", "three"), ignore_case=TRUE )}`
1. Is $2 + 2=4$?
`r if( knitr::is_html_output() ) { torf( TRUE )}`
1. Which one of these is FALSE?
`r if( knitr::is_html_output() ) {
longmcq( c("The inventor of the fairy floss machine was a dentist",
"Barack Obama has won two Grammy awards",
answer = "Once a year all of Wikipedia is printed, and placed in a vault in Norway.") )}`
:::