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

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

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 来说并不适用:

  1. ---
  2. title: Sample Document
  3. header-includes: \usepackage{multicol}
  4. output: pdf_document
  5. ---
  6. \begin{multicols}{2}
  7. # 第一部分
  8. \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:

  1. ---
  2. title: Sample Document
  3. header-includes: \usepackage{multicol}
  4. output: pdf_document
  5. ---
  6. \begin{multicols}{2}
  7. # First section
  8. \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:

  1. ```{=latex}
  2. \begin{multicols}{2}
  3. ```
  4. # First section
  5. ```{=latex}
  6. \end{multicols}
  7. ```
  8. <details>
  9. <summary>英文:</summary>
  10. Surround the `\begin` and `\end` commands with blank lines. If that doesn&#39;t work, then mark them as LaTeX snippets like so:
  11. ```` markdown
  12. ```{=latex}
  13. \begin{multicols}{2}
  14. ```
  15. # First section
  16. ```{=latex}
  17. \end{multicols}
  18. ```

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:

确定