You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,22 +20,19 @@ We provide instructions for both methods here.
20
20
21
21
To build the **html version** of the book, navigate to the repository root folder and run
22
22
```
23
-
./build.sh
23
+
./build_html.sh
24
24
```
25
25
from the command line. This command automatically spawns a docker container
26
-
with the `ubcdsci/intro-to-ds` image, runs the script `build.R` from within the container,
27
-
and then stops the container. It may ask you for a password; this is the password for the
28
-
`sudo` command on your computer. Typically this is just your usual computer user account password.
29
-
But if your setup doesn't require you to use `sudo` to start a docker container, you can just
30
-
open `build.sh` and delete the word `sudo` at the start of the script.
26
+
with the `ubcdsci/intro-to-ds` image, runs the script `_build_html.r` from within the container,
27
+
and then stops the container.
31
28
32
29
To build the **PDF version** of the book, instead run
33
30
```
34
-
./pdfbuild.sh
31
+
./build_pdf.sh
35
32
```
36
-
The same comments regarding passwords and `sudo` as above apply here.
33
+
This command again spawns a docker container and runs `pdf/_build_pdf.r` inside the container.
37
34
38
-
### With RStudio
35
+
### With RStudio (HTML only)
39
36
40
37
1. Run RStudio inside the `ubcdsci/intro-to-ds` docker container:
41
38
- in terminal, navigate to the root of this project repo
@@ -127,16 +124,19 @@ bookdown::gitbook:
127
124
- make sure all figures get (capitalized) labels ("Figure \\@ref(blah)", not "figure below" or "figure above")
128
125
- make sure all figures get captions
129
126
- specify image widths in terms of linewidth percent (e.g. `out.width="70%"`)
130
-
- center align all images
127
+
- center align all images via `fig.align = "center"`
131
128
- make sure we have permission for every figure/logo that we use
132
129
- Make sure all figures follow the visualization principles in Chapter 4
133
130
- Make sure axes are set appropriately to not inflate/deflate differences artificially *where it does not compromise clarity* (e.g. in the classification
134
131
chapter there are a few examples where zoomed-in accuracy axes are better than using the full range 0 to 1)
132
+
-
135
133
136
134
#### Tables
137
135
- make sure all tables get capitalized labels ("Table \\@ref(blah)", not "table below" or "table above")
138
136
- make sure all tables get captions
139
137
- make sure the row + column spacing is reasonable
138
+
- Do not put links in table captions, it breaks pdf rendering
139
+
- Do not put underscores in table captions, it breaks pdf rendering
140
140
141
141
#### Note boxes
142
142
- note boxes should be typeset as quote boxes using `>` and start with **Note:**
@@ -178,6 +178,10 @@ Generally the book uses American spelling. Some common British vs American and C
178
178
- c vs s: defense (not defence)
179
179
- er vs re: center (not centre)
180
180
181
+
#### Whitespace
182
+
We need a line of whitespace before and after code fences (code surrounded by three backticks above and below). This is for readability,
183
+
and it is essential for figure captions.
184
+
181
185
#### PDF Output
182
186
These are absolute last steps when rendering the PDF output:
183
187
- Look for and fix bad line breaks (e.g. with only one word on the next line, orphans, and widows)
0 commit comments