增加 Rmarkdown 主题“readthedown”的宽度

问题描述 投票:0回答:1

我有一个关于 rmarkdown 的问题。我使用这个主题“readthedown”,我想增加页面的宽度,因为我有一个巨大的灰色右侧面板未使用。我在自定义 css 中尝试了一些东西,如下所示,但它不起作用:

body .main-container {
  max-width: 1920px !important;
  width: 1920px !important;
}

body {
  max-width: 1920px !important;
}

我成功地减少了宽度,但没有增加。使用 goole 检查器,页面大小似乎设置为 900px!

css r r-markdown themes
1个回答
5
投票

您可以通过声明来增加内容宽度:

```{css}
#content{
    max-width:1920px;
}
```

默认为

max-width:900px;

您可以在库

.libPaths()
文件夹中的 rmdformats > templates > readthedown > readthedown.css 下找到 .css 文件。您可以在那里搜索“宽度”。

© www.soinside.com 2019 - 2024. All rights reserved.