【发布时间】:2019-11-12 21:07:03
【问题描述】:
我有一台 Mac,刚刚安装了 LaTeX 和编辑器 Texmaker。为了使用 Arial 字体,我通过 MiKTeX 控制台安装了它。我还发现通过这样做,已安装软件包的文件位于此处:
"/Users/Mirko/Library/Application Support/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 控制台中,我已经将文件夹输入到 Directories > Settings
感谢您的每一次帮助!
谢谢和问候!
这是来自 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!
【问题讨论】:
-
你能显示你的 .log 文件吗?
-
与你的问题无关,但对于mac我宁愿使用mactex(或texlive)而不是miktex,更多的mac用户使用它,因此它的测试效果更好
-
你似乎有多个 tex 安装。 texmaker 不使用您更新的 miktex 。您可以在日志文件的第一行看到它正在使用
TeX Live 2019 -
在 arial 中设置文档的最简单方法是使用 Mac 中的字体,而不是在 Latex 中安装它。在 xelatex 或 lualatex(不是 pdflatex)中编译以下内容:
% !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} -
感谢您的支持!我会看看。摆脱旧的/其他 tex 安装没有意义吗?你知道我该怎么做吗?
标签: package latex miktex texmaker