Slide 8
Slide 8 text
忍法「隠れ蓑の術」 コード部分(2)
以下の処理をpre_processorとして準備
Rmdファイルからyamlとbodyを分離させる
body部分をさっきの添付ファイルに書き込む
https://github.com/yihui/xaringan/blob/master/R/render.R#L172-L185
pre_processor = function(
metadata, input_file, runtime, knit_meta, files_dir, output_dir
) {
res = split_yaml_body(input_file)
write_utf8(res$yaml, input_file)
res$body = protect_math(res$body)
content = htmlEscape(yolofy(res$body, yolo))
Encoding(content) = 'UTF-8'
write_utf8(content, tmp_md)
c(
if (seal) c(' variable', 'title slide=true'),
if (!identical(body, res$body)) c(' variable', 'math=true')
)
},
8 / 17