这个问题似乎基本上是 dvips 问题,但我在尝试在 asymptote 中使用 truetype 字体时遇到了这个问题。以下是带有 tex 前导命令的 asymptote 文件,这些命令使我能够在 pdflatex 中使用 true type 字体。
settings.outformat="eps";
texpreamble("\usepackage[T1]{fontenc}");
texpreamble("\renewcommand{\familydefault}{arial}");
texpreamble("\usepackage{mathastext}");
texpreamble("\DeclareMathAlphabet{\mathrm}{T1}{arial}{m}{n}");
import graph; size(9cm,0cm);
import patterns;
add("myhatch",hatch(1.5mm,(1,1)));
add("myhatch1",hatch(1.5mm,(1,0)));
add("myhatch2",hatch(1.5mm,(1,3)));
real labelscalefactor = 0.5; /* changes label-to-point distance */
pen dps = linewidth(0.7) + fontsize(10); defaultpen(dps); /* default pen style */
pen dotstyle = black; /* point style */
real xmin = -2.954424000000014, xmax = 10.5, ymin = -4.18462, ymax = 9.84868; /* image dimensions */
Label laxis; laxis.p = fontsize(10);
string blank(real x) {return "";}
xaxis(xmin, xmax, Ticks(laxis, blank, Step = 2, Size = 2),EndArrow(6), above = true);
yaxis(ymin, ymax, Ticks(laxis, blank, Step = 2, Size = 2),EndArrow(6), above = true); /* draws axes; NoZero hides '0' label */
/* draw figures */
real f1 (real x) {return sqrt(4*2*x);}
draw(graph(f1,0.0,xmax), linewidth(1) + black);
real f2 (real x) {return -sqrt(4*2*x);}
draw(graph(f2,0.0,xmax), linewidth(1) + black);
real f3 (real x) {return x^(2)/(4*2);}
draw(graph(f3,xmin,xmax), linewidth(1) + black);
fill(graph(f1,0,8)..graph(f3,8,0)..cycle,pattern("myhatch1"));
/* dots and labels */
dot((8,8),linewidth(4pt) + dotstyle);
label("$A$", (8,8), 2NW * labelscalefactor);
label("$0$",(0,0),SW);
label("$4ay=x^2$",(8.5,9.2),W);
label("$y^2=4ax$",(8.2,7.9),E);
clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle);
/* end of picture */
当我尝试使用 asymptote 编译文件时,收到以下错误消息:
dvips: ! 找不到头文件:arial.ttf /opt/texlive/2018/texmf-dist/asymptote/plain_shipout.asy: 87.10: 运行时:shipout 失败
我创建了以下乳胶文件作为 MWE。
\documentclass{article}
\usepackage[T1]{fontenc}
\renewcommand{\familydefault}{arial}
\usepackage{mathastext}
\DeclareMathAlphabet{\mathrm}{T1}{arial}{m}{n}
\begin{document}
This is a minimal working example for arial. Here is some maths. $\cos^2\theta+\sin^2\theta=1$.
\end{document}
如果我使用 pdflatex,编译会正确。如果我采用 dvi->ps 路线,则会收到以下 dvips 错误消息。
进程已启动:dvips -o "arial-mew-other".ps "arial-mew-other".dvi
这是 dvips(k) 5.998 版权所有 2018 Radical Eye Software (www.radicaleye.com)
' TeX 输出 2019.06.17:1242 ' -> arial-mew-other.ps
/usr/local/bin/dvips: ! 找不到头文件:arial.ttf
进程因错误而退出
命令
kpsewhich-所有winfonts.map
产生以下输出:
/opt/texlive/texmf-local/fonts/map/dvips/winfonts/winfonts.map /opt/texlive/texmf-local/fonts/map/pdftex/winfonts/winfonts.map /opt/texlive/2018/texmf-dist/fonts/map/pdftex/winfonts/winfonts.map
可能存在什么问题?