我有一台Mac,刚刚安装了LaTeX和编辑器Texmaker。要使用 Arial 字体,我通过MiKTeX Console进行了安装。我还发现这样做可以将已安装软件包的文件放在此处:
“ /用户/ Mirko /图书馆/应用程序支持/ MiKTeX / texmfs / install / tex / latex”
我的问题是编辑器(TeXMaker)仍然找不到Arial-Font。
这是我的代码:
\documentclass[pdftex,openany,11pt,twoside,a4dutch]{report}
\usepackage{uarial}
\usepackage{csquotes}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes} % Setzen von Anführungsstrichen
\begin{document}
This is a test.
\end{document}
这是错误:
! LaTeX Error: File `uarial.sty' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: sty)Enter file name:! Emergency stop.<read > \usepackage
但是arial文件夹和arial.sty文件在上述文件夹中。
在MikTeX控制台中,我已经将文件夹输入到目录>设置
感谢您的帮助!
谢谢和问候!
这是TexMaker的日志文件:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.10.27) 27 OCT 2019 13:34
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/report.cls
Document Class: report 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\count80
\c@chapter=\count81
\c@section=\count82
\c@subsection=\count83
\c@subsubsection=\count84
\c@paragraph=\count85
\c@subparagraph=\count86
\c@figure=\count87
\c@table=\count88
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
! LaTeX Error: File `uarial.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.5 \usepackage
{csquotes}^^M
*** (cannot \read from terminal in nonstop modes)
Here is how much of TeX's memory you used:
221 strings out of 492616
2365 string characters out of 6129480
60608 words of memory out of 5000000
4231 multiletter control sequences out of 15000+600000
3940 words of font info for 15 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
21i,0n,22p,110b,36s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
答案 0 :(得分:0)
从日志文件的第一行可以看到
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019)
texmaker没有使用安装了uarial
软件包的miktex发行版,而是使用了似乎也安装在计算机上的texlive发行版。从长远来看,最好在计算机上只有一个tex分布,以避免此类问题。对于Mac,我建议保留texlive分布并摆脱miktex,因为大多数Mac用户都使用texlive,因此与miktex for mac相比,它经过了很好的测试。
现在您可以通过修改texmaker首选项来强制texmaker使用miktex安装,但是在文档中使用Arial的更简单方法是从pdflatex切换到xelatex或lualatex并直接使用计算机上安装的arial字体>
% !TeX TS-program = xelatex
\documentclass[openany,11pt,twoside,a4dutch]{report}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\begin{document}
This is a test.
\end{document}