英文:
Markdown syntax not working within \multicol environment
问题
为了在两栏中扩展脚注,<https://tex.stackexchange.com/questions/462347/how-to-force-a-footnote-to-extend-over-both-columns-in-a-twocolumn-article?noredirect=1&lq=1> 建议使用\usepackage{multicol}
,而不是twocolumn
文档选项。
尽管这适用于纯 LaTeX 文档,但当在 multicol 环境中使用 Markdown 格式的元素生成 PDF 输出时,如以下示例所示,对于 RMarkdown 和 pandoc
来说并不适用:
---
title: Sample Document
header-includes: \usepackage{multicol}
output: pdf_document
---
\begin{multicols}{2}
# 第一部分
\end{multicols}
在使用 RMarkdown 时,有什么可能实现脚注跨两栏的方法呢?
英文:
For extending footnotes over two columns, <https://tex.stackexchange.com/questions/462347/how-to-force-a-footnote-to-extend-over-both-columns-in-a-twocolumn-article?noredirect=1&lq=1> recommends \usepackage{multicol}
instead of the twocolumn
document option.
Although this works for pure LaTeX documents, it will not work for generating PDF output by RMarkdown and pandoc
when having Markdown-formatted elements within the multicol environment as in:
---
title: Sample Document
header-includes: \usepackage{multicol}
output: pdf_document
---
\begin{multicols}{2}
# First section
\end{multicols}
What could be a possibility to achieve footnotes extending over two columns when using RMarkdown?
答案1
得分: 2
Surround the \begin
and \end
commands with blank lines. If that doesn't work, then mark them as LaTeX snippets like so:
```{=latex}
\begin{multicols}{2}
```
# First section
```{=latex}
\end{multicols}
```
<details>
<summary>英文:</summary>
Surround the `\begin` and `\end` commands with blank lines. If that doesn't work, then mark them as LaTeX snippets like so:
```` markdown
```{=latex}
\begin{multicols}{2}
```
# First section
```{=latex}
\end{multicols}
```
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论