这是一个简单的问题。我想更改字体并使用baskervaldx
包:https://ctan.mirror.garr.it/mirrors/ctan/fonts/baskervaldx/doc/baskervaldx-doc.pdf。我取了第 3 页的相同代码,
\documentclass[12pt]{article}
\usepackage[italian]{babel}
\usepackage[margin=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[osf]{Baskervaldx} % tosf in text, tlf in math
\usepackage[vvarbb]{newtxmath} % math italic letters from Times
\usepackage[cal=boondoxo]{mathalfa} % mathcal from STIX, unslanted a bit
\usepackage{mathrsfs,graphicx,esint}
\usepackage{parskip}
\newcommand*{\starthfill}{\noindent\makebox[0pt]{}\hfill}
\newcommand*{\hfillend}{\hfill\makebox[0pt]{}}
\newcommand*{\esercizio}[1]{\par\bigskip
\noindent\textbf{Esercizio #1:}}
\newcommand*{\studente}[1]{\par\bigskip
\noindent\textbf{Studente/ssa: #1}}
\newcommand*{\riga}{\noindent\starthfill
\rule{5cm}{0.5pt}\hfillend\par}
\newcommand*{\problema}[1]{\par\bigskip
\noindent\textbf{Problema: #1}}
\begin{document}
\esercizio{pag. 115 n. 43}
\[\begin{split}
\cos \left(\alpha+240^{\circ \:}\right)+\sin \left(\alpha+30^{\circ \:}\right) & \\
= -\frac{1}{2}\cos \left(\alpha\right)+\frac{\sqrt{3}}{2}\sin \left(\alpha\right)+\sin \left(\alpha+30^{\circ \:}\right) & \\
= -\frac{1}{2}\cos \left(\alpha\right)+\frac{\sqrt{3}}{2}\sin \left(\alpha\right)+\sin \left(\alpha+30^{\circ \:}\right) & \\
=-\frac{1}{2}\cos \left(\alpha\right)+\frac{1}{2}\cos \left(\alpha\right)+\frac{\sqrt{3}}{2}\sin \left(\alpha\right)+\frac{\sqrt{3}}{2}\sin \left(\alpha\right) & \\
=\frac{\sqrt{3}}{2}\sin \left(\alpha\right)+\frac{\sqrt{3}}{2}\sin \left(\alpha\right) &\\
=\sqrt{3}\sin \left(\alpha\right)
\end{split}
\]
\riga
\end{document}
但我收到这个错误:
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\utente\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log
! Font T1/Baskervaldx-TOsF/m/n/12=Baskervaldx-Reg-tosf-t1 at 12.0pt not loadabl
e: Metric (TFM) file not found.
<to be read again>
relax
l.24 \begin{document}
?
可能的解决方案是什么以及为什么我会遇到这个错误?
附言:我拥有 2021 年 1 月 8 日最新更新的 MikTeX。
附录:
如果我接受 MWE
\documentclass[12pt]{article}
\usepackage[italian]{babel}
\usepackage[margin=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[osf]{Baskervaldx} % tosf in text, tlf in math
\usepackage[vvarbb]{newtxmath} % math italic letters from Times
\usepackage[cal=boondoxo]{mathalfa} % mathcal from STIX, unslanted a bit
\usepackage{mathrsfs,graphicx,esint}
\usepackage{parskip}
\begin{document}
Start $P(x)=xa^2+bc$
\end{document}
我也有同样的问题。
附录2
答案1
这是一个包装错误。我将其报告给了 miktex 问题跟踪器:
https://github.com/MiKTeX/miktex-packaging/issues/215
这个问题应该很快就会得到解决。