Bordered text box and R Markdown

Hi,

This is a basic R Markdown question. I'm using RStudio and Distill to write a document.
How do I achieve the effect of a text box that looks like the image below (just an example) ?
(I'm not concerned with the syntax highlighting, as such.)

Thanks.

Howard

Hi, Howard and welcome!

```{r, layout="l-body-outset"}
library(rmarkdown)
paged_table(mtcars)

from the distill docs

Hi,

I'm a newbie at this and don't understand what you mean.

If you mean I should use the Table function to do this, can you illustrate this with the following text:


Here are keypoints from this section

• keypoint one
• keypoint two


Thanks.

Howard

1 Like

No need to explain why you don't understand an answer. If I could make everything perfectly clear on the first attempt I'd be ... unusual.

The example I gave takes a data frame as an argument, so one option is to convert your bullet points into a single column data frame. For HTML, you can use CSS styling with a custom style see § 3.1.4.1 Custom CSS of the docs for YAML header with something like

.boxBorder {
 border: 2px solid #990066;
 padding: 10px;
 outline: #990066 solid 5px;
 outline-offset: 5px;
 }

from here

Then, you'd add the HTML mark-up in your text

* keypoint 1 * keypoint 2

The .css style needs to be in your working directory

1 Like