1
votes

I have the following Rmd file that uses the tint package based on the tufte package:

---
title: "Test title"
author: ""
date: ""
output: 
  tint::tintPdf
classoption: twoside
---


```{r one, echo=FALSE, fig.width=8}
plot(pressure)
```


```{r two, echo=FALSE, fig.width=4}
plot(pressure)
```

I would expect the second figure to be half as wide as the first, but it appears that both are the width of the main column and that I'm really just altering the aspect ratio by specifying fig.width.

enter image description here

Is it possible to have a figure that is narrower than the width of the main column when using tint/tufte?

PS pressure is from the datasets package.


Edit

I could fake it like this:

```{r two, echo=FALSE, fig.width=4}
par(mfrow = c(1, 2))
plot(pressure)
```

but is there a less cludgy solution?

1

1 Answers

2
votes

You can do it using the out.width chunk option. This needs to be a character value which will be inserted into the LaTeX as a width, not just a number like fig.width. For example, changing your second chunk to

```{r two, echo=FALSE, out.width="2in"}
plot(pressure)
```

produces this output:

enter image description here