如何在 Org 模式下将 csquotes 与 LaTeX 导出一起使用?

N.N*_*.N. 3 emacs latex org-mode

使用csquotes时,csquotes 根据上下文添加引号。这是通过用宏标记引用来完成的\enquote,即 as \enquote{text}

从 Org 模式导出到 LaTeX 时,引号标记为``'',例如``text''

Org-mode 可以导出到 LaTeX 并用 标记引号吗\enquote

我发现http://comments.gmane.org/gmane.emacs.orgmode/43689正在计划这样的功能,但我不知道它是否已实现。


相关说明在 AUCTeX 中集成了 csquotes。集成是当文档加载 csquotes 时,然后分别"扩展为\enquote{}。这不是我所要求的,但可能有一些代码可能对设置 Org 模式以导出由 标记的报价感兴趣\enquote

Chr*_*ile 5

@NN 和其他人,org 8.0 中新的 org-mode 导出功能有一个名为 的列表org-export-smart-quotes-alist。您可以将以下内容添加到 init.el 中,它将把常规"双引号变成enquote{},将\'单引号变成enquote*{}

\n\n
(add-to-list \'org-export-smart-quotes-alist \n             \'("am"\n               (primary-opening   :utf-8 "\xe2\x80\x9c" :html "“" :latex "\\\\enquote{"  :texinfo "``")\n               (primary-closing   :utf-8 "\xe2\x80\x9d" :html "”" :latex "}"           :texinfo "\'\'")\n               (secondary-opening :utf-8 "\xe2\x80\x98" :html "‘" :latex "\\\\enquote*{" :texinfo "`")\n               (secondary-closing :utf-8 "\xe2\x80\x99" :html "’" :latex "}"           :texinfo "\'")\n               (apostrophe        :utf-8 "\xe2\x80\x99" :html "’")))\n
Run Code Online (Sandbox Code Playgroud)\n\n

警告:如果您希望它以您的组织文件的语言工作,请确保您已org-export-default-language设置为"am"(或您选择在上面的表单中使用的任何内容),或者将适当的#+LANGUAGE: am行放在你的组织文件。如果不这样做,组织导出器将不会调用上述内容。

\n