Putting things on the slide
Content flows from the top, left aligned, one thing under the next.
my-deck.qmd
my-deck.qmd
The cheapest way to put content somewhere other than the top left.
Everything inside a single r-fit-text gets the same size, set by the longest line.
One block per line, and each line fills the slide on its own.
Pick by how much the image is content and how much it is atmosphere.
It is content, so it pushes other content around and it respects the margins.
Photo by Holly Mandarich on Unsplash
Photo by Noelle Rebekah on Unsplash
| Attribute | Description |
|---|---|
width |
width of the element |
height |
height of the element |
top |
distance from the top of the slide |
left |
distance from the left of the slide |
bottom |
distance from the bottom of the slide |
right |
distance from the right of the slide |
One of top / bottom, one of left / right, and only one of width / height so the image is not distorted.
Not just images. Text takes the class too.
Reveal caps every image with max-width: 95% and max-height: 95%, so no height will push it past the edge.
my-deck.qmd
Unset the cap, then use negative offsets to bleed off the edge.
my-deck.qmd
Photo by Galen Crout on Unsplash
my-deck.qmd
Photo by Tim Marshall on Unsplash
my-deck.qmd
A half-transparent background and some padding, and it is readable.
Shrink the slide itself and give it a shadow, and the background can be as loud as it likes.
styles.scss
The !important is there because reveal positions slides with inline styles.
my-deck.qmd
fig-width / fig-height how big the plot is drawn, which sets how big its text isfig-asp the ratio, so you only tune one of the twofig-dpi raise it when the plot looks softfig-align left, center, or rightThe defaults sit around fig-width: 9, fig-height: 5, which makes axis labels too small from the back row.
my-deck.qmd
Drawing the plot smaller makes its text bigger, because reveal scales it back up to fit.
my-deck.qmd
code-line-numbers takes the lines you want lit up, and | splits it into steps.
my-deck.qmd
my-deck.qmd
A leading | means the first step is the whole block with nothing highlighted.
Sometimes you want to point at one argument, in your own color, at your own pace.
.mono class gets you the lookThen put the code in a div with that class. \ gives you a leading space, and two trailing spaces end a line.
my-deck.qmd
fig-width on a plot and see what happens to its textBack to the workshop materials.
Slidecrafting Workshop