Markdown语法在\multicol环境中无法正常工作。

huangapple go评论62阅读模式
英文:

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 输出时,如以下示例所示,对于 RMarkdownpandoc 来说并不适用:

---
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&#39;t work, then mark them as LaTeX snippets like so:

```` markdown
```{=latex}
\begin{multicols}{2}
```

# First section

```{=latex}
\end{multicols}
```

huangapple
  • 本文由 发表于 2023年6月12日 19:45:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76456349.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定