带有csl的bookdown :: tufte_html_book无法将引文置于空白处

问题描述 投票:2回答:1

bookdown::tufte_html_book不会将带注释的csl引文置于空白处。例如:

bookdown::render_book(input = "index.rmd", 
                      output_format = "bookdown::tufte_html_book")

[来自cslhttps://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>
html bookdown csl tufte
1个回答
0
投票

这归因于tufte程序包中的a bug,该程序包已修复。您可能会install.packages('tufte'),问题应该消失了。

© www.soinside.com 2019 - 2024. All rights reserved.