html - 带有 csl 的 bookdown::tufte_html_book 无法将引文放在边距中
问题描述
bookdown::tufte_html_book
没有将引用放在 csl 的页边距中并附注。例如:
bookdown::render_book(input = "index.rmd",
output_format = "bookdown::tufte_html_book")
来自csl
:https://raw.githubusercontent.com/citation-style-language/styles/master/chicago-fullnote-bibliography-short-title-subsequent.csl
对于文件index.rmd
:
---
title: "Test title"
output:
bookdown::tufte_html_book
link-citations: yes
bibliography: [test.bib]
csl: chicago-fullnote-bibliography-short-title-subsequent.csl
---
# First section
The citation for this[@edwinabbottFlatlandRomanceMany2018] should show up in the margin.
和参考书目test.bib
:
@book{edwinabbottFlatlandRomanceMany2018,
title = {Flatland: {{A Romance}} of {{Many Dimensions}}},
shorttitle = {Flatland},
author = {{Edwin Abbott}},
year = {2018},
publisher = {{CreateSpace Independent Publishing Platform}},
file = {/Users/ssp3nc3r/Zotero/storage/NZBIJ84R/Edwin Abbott - 2018 - Flatland A Romance of Many Dimensions.pdf},
isbn = {978-1-5239-6216-7}
}
结果是这个html:
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Test title" />
<meta property="og:type" content="book" />
<meta name="description" content="Test title">
<title>Test title</title>
<link href="libs/tufte-css-2015.12.29/tufte-fonts.css" rel="stylesheet" />
<link href="libs/tufte-css-2015.12.29/tufte-background.css" rel="stylesheet" />
<link href="libs/tufte-css-2015.12.29/tufte-italics.css" rel="stylesheet" />
<link href="libs/tufte-css-2015.12.29/tufte.css" rel="stylesheet" />
</head>
<body>
<div class="row">
<div class="col-sm-12">
<div id="TOC">
<ul>
<li><a href="#first-section"><span class="toc-section-number">1</span> First section</a></li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div id="header">
<h1 class="title">Test title</h1>
</div>
<div id="first-section" class="section level1">
<h1><span class="header-section-number">1</span> First section</h1>
<p>The citation for this<span class="citation"><a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a></span> should show up in the margin.</p>
<div id="refs" class="references">
<div>
<p>Edwin Abbott. <em>Flatland: A Romance of Many Dimensions</em>. CreateSpace Independent Publishing Platform, 2018.</p>
</div>
</div>
</div>
<p style="text-align: center;">
</p>
</div>
</div>
</body>
</html>
解决方案
这是由于tufte包中的一个错误,该错误已得到修复。你可以,问题应该消失了。install.packages('tufte')
推荐阅读
- c# - 在c#中使用/不使用正则表达式清除不需要的十六进制字符
- c++ - 为什么在三元中返回静态大小的数组时 MSVC 2019 会失败?
- javascript - 如何使用 JavaScript 和 Github API 更新托管在 GitHub 存储库中的 JSON 文件
- google-api - API 密钥对谷歌云翻译无效
- sql - Azure SQL 数据库中的 SQL 作业中的语法错误
- python - django中的url可以传入一个空字符串吗?
- javascript - vue-cli-service serve 和 buid 生成不同的样式
- python - 通过 API 向 JIRA 问题添加请求类型
- jenkins - 使用自定义 settings.xml 时,避免在 Jenkins 声明式管道中使用 Maven / configFileProvider 冗余
- javascript - Angular:如何从后台更新打开的对话框数据?