相同字体冲突

2020-03-06 23:57发布

这是一份大模板中提取的MWE,使用xelatex编译。存在问题是英文段落无法两端对齐,tex的断词功能也失效了。 经试验,注释掉第3,4,5,8,9,12行中任意一行均可解决问题,第4,5行其中一个...

这是一份大模板中提取的MWE,使用xelatex编译。存在问题是英文段落无法两端对齐,tex的断词功能也失效了。 经试验,注释掉第3,4,5,8,9,12行中任意一行均可解决问题,第4,5行其中一个改为另一种字体也能解决问题。但是我想正文字体和代码字体同时使用罗马字体,那么该如何解决该冲突呢? 另外,这种情况的成因是什么? 附:大模板中的原始设置是`\setmonofont{Courier New}`,其他均相同。我仅仅是根据实际需要改为`\setmonofont{Times New Roman}`。 ```tex \documentclass{book} \usepackage{xeCJK} \defaultfontfeatures{Mapping=tex-text} \setmainfont{Times New Roman} \setmonofont{Times New Roman} \newcommand{\xiaosi}{ \fontsize{12bp}{\baselineskip} \selectfont } \begin{document} \xiaosi In the second and third chapters, this article studies six common management systems, summarizes their similarities and differences in functions, and extracts the two basic roles and three basic functions that a generic management system should have-tourists and customers. Roles, account management functions, data-driven functions, and instruction-driven functions. Among them, the account is the basic base point built into the system; data is the mainstay of information exchange; instructions are the vital source of website operation. Finally, we challenged the uniqueness of the system administrator role subordinate to the customer role. \end{document} ``` ![](https://pics.latexstudio.net/data/images/202003/ebc9f48c3107579.png)