library(knitr)
opts_chunk$set(
  echo = FALSE,
  dev = "cairo_pdf",
  fig.width = INBOmd::column_width(3) / 25.4,
  fig.height = 6
)
library(ggplot2)
library(INBOtheme)
theme_set(theme_inbo(base_size = 20))
update_geom_defaults("text", list(size = 8))

\btextblock{r INBOmd::column_width(3)}(r INBOmd::column_start(3, 1), 0)

```{block2 chunk-name, type="block", latex.options="{title of a standard block}", echo = TRUE} You can use any markdown code in a box

```{block2 columns, type="exampleblock", latex.options="{Defining columns}", echo = TRUE}
- start a column by adding `\btextblock{w}(x, y)`
    - `w` is the width of the column in mm
    - `x` is the horizontal position in mm
        - start from the left margin
    - `y` is the vertical position in mm
        - starts below the footer
- end a column by placing `\etextblock`
- `INBOmd::column_width(n)` returns the width in case you want `n` equal sized columns
- `INBOmd::column_start(n, i)` returns the horizontal position for column `i` of `n` equal sized columns

\etextblock

\btextblock{r 2 * INBOmd::column_width(3)}(r INBOmd::column_start(3, 2), 0)

``{block2 warnings, type="alertblock", latex.options="{Warnings}", echo = TRUE} - The block chunks look likerchunks but start withblock2- useecho = TRUE` otherwise they won't appear on the poster - end these chunks with a blank line, otherwise you'll get an error

```{block2 the-name, type="exampleblock", latex.options="{title}", echo = TRUE}
- `r` chunks cannot be nested in `block2` chunks
- surround the `r` chunks with `\bblock{title}` and `\eblock`

Text and figure outside of box

ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()

\bblock{Figure in box}

ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()

\eblock

\etextblock



inbo/INBOmd documentation built on Feb. 3, 2024, 5:58 p.m.