在 bookdown 书中包含 css?
Include css in bookdown book?
我想包括以下内容 .css
以使我的书更宽:
.book .book-body .page-wrapper .page-inner {
max-width: 1200px !important;
}
这是我的 .yml
:
delete_merged_file: true
rmd_files: ["index.Rmd", "creating.Rmd", "subset.Rmd", "manipulation.Rmd",
"single_range_methods.Rmd", "intersection.Rmd", "overlap.Rmd", "join.Rmd",
"nearest.Rmd", "coverage.Rmd", "runlengths.Rmd", "runlength_dict.Rmd"]
output_dir: "."
bookdown::gitbook:
css: css.css
这是我用来制作本书的 R 代码:
mpl = reticulate::import("matplotlib")
mpl$use('TkAgg')
library(reticulate)
use_python("/mnt/work/me/software/anaconda/bin/python")
library(bookdown)
render_book("bookdown::gitbook")
为什么我的书没有变宽?我做错了什么?
删除 css:
前面的缩进,并确保文件 css.css
与 index.Rmd
文件位于同一位置。
YML 应如下所示:
delete_merged_file: true
rmd_files: ["index.Rmd", "creating.Rmd", "subset.Rmd", "manipulation.Rmd",
"single_range_methods.Rmd", "intersection.Rmd", "overlap.Rmd", "join.Rmd",
"nearest.Rmd", "coverage.Rmd", "runlengths.Rmd", "runlength_dict.Rmd"]
output_dir: "."
output:
bookdown::gitbook:
css: css.css
我想包括以下内容 .css
以使我的书更宽:
.book .book-body .page-wrapper .page-inner {
max-width: 1200px !important;
}
这是我的 .yml
:
delete_merged_file: true
rmd_files: ["index.Rmd", "creating.Rmd", "subset.Rmd", "manipulation.Rmd",
"single_range_methods.Rmd", "intersection.Rmd", "overlap.Rmd", "join.Rmd",
"nearest.Rmd", "coverage.Rmd", "runlengths.Rmd", "runlength_dict.Rmd"]
output_dir: "."
bookdown::gitbook:
css: css.css
这是我用来制作本书的 R 代码:
mpl = reticulate::import("matplotlib")
mpl$use('TkAgg')
library(reticulate)
use_python("/mnt/work/me/software/anaconda/bin/python")
library(bookdown)
render_book("bookdown::gitbook")
为什么我的书没有变宽?我做错了什么?
删除 css:
前面的缩进,并确保文件 css.css
与 index.Rmd
文件位于同一位置。
YML 应如下所示:
delete_merged_file: true
rmd_files: ["index.Rmd", "creating.Rmd", "subset.Rmd", "manipulation.Rmd",
"single_range_methods.Rmd", "intersection.Rmd", "overlap.Rmd", "join.Rmd",
"nearest.Rmd", "coverage.Rmd", "runlengths.Rmd", "runlength_dict.Rmd"]
output_dir: "."
output:
bookdown::gitbook:
css: css.css