简体   繁体   English

使用knitrBootstrap示例下拉样式

[英]using knitrBootstrap example drop-down styling

In the link below you'll see the current example for cars with a certain drop-down styling. 在下面的链接中,您将看到具有特定下拉样式的汽车的当前示例。 When I produce this same example I get a different style where the drop down boxes extend the width of the content area. 当我生成这个相同的例子时,我得到一个不同的样式,其中下拉框扩展内容区域的宽度。 Is there something I need to add to my Rmd to use the style on the website instead? 我需要添加到我的Rmd以使用网站上的样式吗?

http://rawgit.com/jimhester/knitrBootstrap/master/vignettes/two-D.html http://rawgit.com/jimhester/knitrBootstrap/master/vignettes/two-D.html

You need to use the github version of the knitrBootstrap package in order to use buttons rather than panels. 您需要使用knitrBootstrap包的github版本才能使用按钮而不是面板。 The CRAN version of the package only has panels. 该软件包的CRAN版本只有面板。 The easiest way to install the package from github is with devtools. 从github安装软件包的最简单方法是使用devtools。

install.packages(devtools) library(devtools) install.packages('jimhester/knitrBootstrap') library(knitrBootstrap)

Also note the github version of knitrBootstrap uses the new rmarkdown package, so you generate the report using the rmarkdown::render function. 另请注意,knitrBootstrap的github版本使用新的rmarkdown软件包,因此您可以使用rmarkdown::render函数生成报告。

The default is collapse type in the new version is buttons, but you can specify using panels to toggle with the chunk option bootstrap.panel .\\ 默认情况下,新版本是按钮中的折叠类型,但您可以指定使用面板切换块选项bootstrap.panel

See https://github.com/jimhester/knitrBootstrap for more details on using the new package and all the options available. 有关使用新软件包和所有可用选项的更多详细信息,请参阅https://github.com/jimhester/knitrBootstrap

I unfortunately cannot release the current code to CRAN until the rmarkdown package is also released to CRAN, so in the meantime this is the only way to get the new features. 遗憾的是,在将rmarkdown软件包发布到CRAN之前,我无法将当前代码发布到CRAN,因此在此期间这是获取新功能的唯一方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM