我正在尝试在 rmdformats::material 主题中放大图像,但我无法更改宽度,只能更改图像的高度。我尝试过使用“px”、“%”、“in”,但它们都无法改变图像的宽度。有人知道该怎么办吗?难道是主题的边距问题,如果是的话,如何更改?
谢谢
---
title: "Long Non-Coding RNAs"
author: "Name"
date: "date"
output:
rmdformats::material:
highlight: "tango"
code_folding: hide
number_sections: yes
---
```{r, echo=FALSE, out.width="200px", out.height="300px", fig.align="center", fig.cap="abc"}
library(knitr)
knitr::include_graphics("img.png")
我成功在 yaml 标头后添加此 css 代码:
{css, echo = FALSE}
.pages .page img.image-thumb {
max-width: 600px;
}
默认宽度为 250px,您可以在 ../rmdformats/templates/material/material.css 中找到它