Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 bookdown 同时生成 html 和 pdf。我想在 html 版本中使用动态表(DT),但在 pdf 文件中使用普通表。有没有办法在降价中做到这一点,而不必将文件作为输入分开并使用 yml 文件。就像是
if (output = html) { DT... } if (output = "pdf"){ xlatex ... }
谢谢伦格
编辑感谢一辉的评论:
if( knitr:::is_latex_output() ) { xlatex ... } else { DT... }