【问题标题】:How can I set wide screen when using R markdown with html output?使用带有 html 输出的 R markdown 时如何设置宽屏?
【发布时间】:2015-07-13 11:18:56
【问题描述】:

我想用 R markdown 获得一个 html 输出,但输出屏幕非常窄。这会导致非常有限的 dplyr 输出。

在 ioslides 中有一个选项,如“widescreen : TRUE”。

在使用纯 html 输出时是否有类似的选项?

【问题讨论】:

    标签: r r-markdown


    【解决方案1】:

    您可以使用自定义CSS 来更改输出的宽度。使用

    output: 
        html_document:
            css: styles.css
    

    并在styeles.css 中添加如下内容:

    p {
      width: 200%;
    }
    
    pre {
      width: 200%;
    }
    
    img {
      width: 50%;
    }
    

    当然,您可能希望将数字更改为更合适的数字。 p 块是您的文本,pre 是您的 R 代码,img 是您的图像。

    【讨论】:

      猜你喜欢
      • 2013-03-01
      • 2019-10-06
      • 2016-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-23
      • 2020-02-25
      • 1970-01-01
      相关资源
      最近更新 更多