Help implementing better out-of-the-box xelatex export in Org

Hi,

Pedro Andres Aranda Gutierrez have been recently working on better LaTeX export of non-latin Org documents, including written in Chinese. As a part of this work, we are looking for suitable standard LaTeX preamble that will suit most Chinese documents. Apart from setting appropriate unicode fonts, we also need to load some packages like \usepackage[CJKspace]{xeCJK}.

Another package we often see in various online forums is \usepackage{xpinyin}, but we are not 100% sure if it is really something that is commonly needed by native Chinese Org users. Could you please share your experience?

The ongoing discussion of WIP feature branch is in Status of the all-tex-fonts feature branch The branch itself is in https://cgit.git.savannah.gnu.org/cgit/emacs/org-mode.git/log/?h=feature%2Fall-tex-fonts


你好,

Pedro Andres Aranda Gutierrez 近期在改进非拉丁语Org文档(包括中文文档)的LaTeX导出功能。为此我们需要寻找一个标准的LaTeX导言,能够适配大多数中文文档。除了设置合适的Unicode字体外,还需要加载一些包,比如\usepackage[CJKspace]{xeCJK}

另外,我们经常在各种网络论坛中看到\usepackage{xpinyin}这个包,但不确定它是否被中文用户广泛使用。能否分享您的使用经验?

关于该功能的工作进行讨论,详见:Status of the all-tex-fonts feature branch
代码分支地址是:https://cgit.git.savannah.gnu.org/cgit/emacs/org-mode.git/log/?h=feature%2Fall-tex-fonts

1 个赞

the popular universe all-in-one solution for writing Chinese with LaTeX is the CTAN: Package ctex package by

\usepackage{ctex}

or by using one of the ctexart, ctexrep, ctexbook, ctexbeamer documentclasses, which auto detects TeX engine and load appropriate support packages like xeCJK for XeTeX or luatex-ja for luaTeX.

xpinyin

no, it is for adding phonetic alphabets, which is only relevant in very specific scenarios such as preparing exam papers for elementary school

2 个赞

正好借楼问一下,用 ctex 包时,org当中的加粗转为中间文件 tex 时是 \textbf{},当 {} 是中文的时候,PDF 中展示时两侧会多于出来空白(空格),这个搜了下好像没什么好的解决办法。