【问题标题】:Germany quotation marks broken in tinytex/rmarkdown [duplicate]德国引号在tinytex / rmarkdown中损坏[重复]
【发布时间】:2020-01-08 11:38:23
【问题描述】:

我想要什么:

我想在 MacOS (Catalina) 上通过 rmarkdown 和 tinytex 在我的 TeX-PDF 中添加德语引号。例如:

问题:

它曾经按照as proposed here 的指导方针工作。但是现在,它停止了工作。我只得到英文引号,但没有德文引号:

我试过了,没有成功:

  • 我更新了我的 R 包
  • 我更新了 TeX 包
  • 我检查了 TeX 包“csquotes”是否已安装
  • 我将语言从“de”更改为“de-De”

R 代码:

---
title: "German quotation marks"
output: pdf_document
---

"Das ist sehr schön", sagte sie. 

【问题讨论】:

    标签: localization r-markdown tex tinytex


    【解决方案1】:

    R Markdown 包用于提供自己的模板,使用csquotes.sty。现在使用默认的pandoc 模板,似乎没有使用csquotes。不过,您可以手动调用它:

    ---
    title: "German quotation marks"
    output: 
        pdf_document:
            keep_tex: yes
    lang: de-DE
    header-includes:
        - \usepackage{csquotes}
    ---
    
    "Das ist sehr schön", sagte sie. 
    

    结果:

    【讨论】:

    • 您好,感谢您的建议。您提出的方式是正确的方式。但是,我忘记将我确实使用 csquotes 的代码放入其中。即使使用 csquotes,它也不起作用(或者更确切地说,由于我不清楚的原因,前一段时间停止了工作)。为清楚起见,我将接受并关闭此问题并打开一个包含 csquotes 的新问题。
    • 根据pandoc.org/MANUAL.html#creating-a-pdf,还需要在frontmatter中添加csquotes: true。
    猜你喜欢
    • 2020-04-26
    • 2017-02-06
    • 1970-01-01
    • 2013-11-04
    • 2016-10-07
    • 2017-06-30
    • 1970-01-01
    • 2017-10-16
    • 1970-01-01
    相关资源
    最近更新 更多