![更改字体时,在文档开头插入了带有垃圾文本的额外页面](https://linux22.com/image/329308/%E6%9B%B4%E6%94%B9%E5%AD%97%E4%BD%93%E6%97%B6%EF%BC%8C%E5%9C%A8%E6%96%87%E6%A1%A3%E5%BC%80%E5%A4%B4%E6%8F%92%E5%85%A5%E4%BA%86%E5%B8%A6%E6%9C%89%E5%9E%83%E5%9C%BE%E6%96%87%E6%9C%AC%E7%9A%84%E9%A2%9D%E5%A4%96%E9%A1%B5%E9%9D%A2.png)
我是 TeXstudio 新手。如果我尝试使用以下命令更改文档的字体:
\usepackage{fontspec}
\setmainfont{Arial}
文本像正常一样更改,但在我的文档开头插入了一个额外的页面,其中包含看似随机的文本“lmrlmrlmsslmtt”。我不知道为什么会发生这种情况。如果我从文档中删除上述两行,它将恢复为默认字体,并且带有奇怪文本的额外页面将消失。无论我尝试将文本更改为哪种字体,此页面都会重新出现在我的文档开头。
请告诉我如何避免这个问题...
答案1
以下文档使用a
texlive 2016 lualatex 中的文本生成单页文档。
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\listfiles
\begin{document}
a
\end{document}
如果您得到lmrlmrlmsslmtt
(这将是代码意外排版默认的拉丁现代家族名称lmr
,, ) lmss
,lmtt
那么请在日志中发布它生成的文件列表。
它应该看起来像
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
fontspec.sty 2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX
expl3.sty 2016/05/18 v6512 L3 programming layer (loader)
expl3-code.tex 2016/05/18 v6512 L3 programming layer
l3pdfmode.def 2016/03/26 v6465 L3 Experimental driver: PDF mode
xparse.sty 2016/05/18 v6512 L3 Experimental document command parser
luaotfload.sty 2016/04/21 v2.7 OpenType layout system
fontspec-luatex.sty 2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX
fontenc.sty
eu2enc.def 2010/05/27 v0.1h Experimental Unicode font encodings
eu2lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty 2011/09/09 v0.981 provides access to latin accents and many othe
r characters in Unicode lower plane
eu2lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
graphics.sty 2016/06/02 v1.0s Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
luatex.def 2016/06/04 v0.01d Graphics/Color for luaTeX
infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO)
ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
fontspec.cfg
t3cmr.fd 2001/12/31 TIPA font definitions
supp-pdf.mkii
epstopdf-base.sty 2016/05/15 v2.6 Base part for package epstopdf
grfext.sty 2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty 2016/05/16 v1.4 Define keys (HO)
kvoptions.sty 2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty 2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty 2016/05/16 v1.4 Provides the ifluatex switch (HO)
pdftexcmds.sty 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO)
ifpdf.sty 2016/05/14 v3.1 Provides the ifpdf switch
luatex-loader.sty 2016/05/16 v0.6 Lua module loader (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
***********