Table 带链接边注的页脚在文本中创建大的中断

Table footer with linked margin note creating large break in text

我正在使用 R Markdown 中的色调模板进行 HTML 渲染。不过,我不认为这个问题是特定于 R 或 R Markdown 的。我认为可以使用 CSS 或 HTML 来完成修复。虽然,我猜想 Dirk、Jon 或 JJ、Yihui 或 Dave 可能会告诉我如何在 R Markdown 中 正确地 修复这个问题,因为他们是 tint 的作者或对 tint 的开发做出了贡献。

我如何修改它以防止边注影响 table 下方的间距?

我确实尝试使用 align: left;float: left; 样式设置 table 标签,看看是否可行。两者都没有影响底部的间距。

这是 table 页脚,边注为 HTML 脚本:

<tfoot>
      <tr>
        <td style="padding: 0; " colspan="100%">
          <span style="font-style: italic;">Note.</span> <sup></sup> This is the data dictionary based on the data adapted from CFPB (n.d.)<label for="tufte-sn-3" class="margin-toggle sidenote-number">3</label><input type="checkbox" id="tufte-sn-3"
            class="margin-toggle"><span class="sidenote"><span class="sidenote-number">3</span> Consumer Financial Protection Bureau. (n.d.) <em>Consumer complaint database API docs</em> [data set and code book]. Office of Civil Rights. Retrieved
            April 28, 2021, from <a href="https://cfpb.github.io/api/ccdb/index.html" class="uri">https://cfpb.github.io/api/ccdb/index.html</a></span> and Rozzi (2021).<label for="tufte-sn-4" class="margin-toggle sidenote-number">4</label><input
            type="checkbox" id="tufte-sn-4" class="margin-toggle"><span class="sidenote"><span class="sidenote-number">4</span> Rozzi, G. (2021). <em>Data &amp; functions for working with US zip codes</em>. GitHub. <a
              href="https://github.com/gavinrozzi/zipcodeR/" class="uri">https://github.com/gavinrozzi/zipcodeR/</a></span>
        </td>
      </tr>
    </tfoot>

我意识到它并不是那么漂亮。虽然我可能会直接修改 HTML,但我没有写它。它是通过使用 R Markdown 生成的。我通常发现 tables 可以大大减轻痛苦,因为我使用它的频率,可以在脚本中进行调整。

当我渲染 HTML 时,table 和下一行文本之间存在巨大差距。这就是当我 运行 脚本时 HTML 中发生的事情:

然而,当我使用 table 之外的边距时,我没有这个问题。 (不要介意文字;它绝对不是校对的。)如果你看,你会发现这张图片中的第二个边注不会影响下一个 <p></p>.

如果我可以提供其他信息以便更快地获得帮助,请告诉我。

它可能不正确,但它有效。我将页脚从 table 上取下并添加了一个包含页脚内容的

块。问题解决了。我不知道为什么我没有早点想到这一点。 (叹气)