boxie 宏包和newtxtext 宏包冲突?

2019-12-15 21:04发布

``` \documentclass[twoside, openright]{report} \usepackage[ UTF8, scheme = plain, fontset = wind...

``` \documentclass[twoside, openright]{report} \usepackage[ UTF8, scheme = plain, fontset = windows, heading = false, zihao = -4, sub4section, ]{ctex} \usepackage{boxie} \usepackage{newtxtext} \begin{document} \begin{langCVOne}[python][ccode01][Python]{Python(langCVOne环境)} # -*- coding: UTF-8 -*- # Filename : helloworld.py # 该实例输出 Hello World! print('Hello World!') \end{langCVOne} \end{document} ``` 报错`LaTeX Error: Option clash for package textcomp.` 如果调换`\usepackage{boxie}`和`\usepackage{newtxtext}`的顺序不会出现问题,但如果把要插入的代码通过文件的方式引用 ``` \documentclass[twoside, openright]{report} \usepackage[ UTF8, scheme = plain, fontset = windows, heading = false, zihao = -4, sub4section, ]{ctex} \usepackage{newtxtext} \usepackage{boxie} \begin{document} \langCVfile[python][lst:main.py][python]{main.py}{lst/main.py} \end{document} ``` 就会出现`Cannot use \XeTeXglyph with t1xtt; not a native platform font.` 更奇怪的是,如果把代码文件中的中文去掉,又可以正常编译,得到正确的输出。 现在暂时的应付方案是删掉了代码文件中的中文,但是有大佬可以给予帮助,给出不用删代码文件中的中文的解决方案吗,谢谢! `boxie` 见 https://www.latexstudio.net/archives/51475.html