我正在尝试在设置有 Helvetica 字体和 lmodern 的文档中插入数学运算符号(如求和、积分等),但是它无法编译它们。我没有看到任何不兼容问题,而且我不知道是否需要额外的软件包,显然,所有与 mathtype 相关的软件包都已包含在内。我提供了 mwe:
\documentclass[10.5pt, a4paper]{article}
\usepackage[left=2cm, right=2cm, top=1.75cm, bottom=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{anyfontsize}
\usepackage{avant}
\usepackage{tikz}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{tcolorbox}
\newtcolorbox{cuadro}[1]
{colback=lavender!white,colframe=dukeblue!black,fonttitle=\bfseries,title=#1}
\usepackage{colortbl}
\usepackage{xcolor, soul}
\usepackage{eurosym}
\usepackage{booktabs}
\usepackage{calc}
\newcommand\EUR[1]{\mbox{#1\,\texteuro}}
\usepackage{mathastext}
\usepackage{newtxsf}
\usepackage{
lmodern,
sansmath,
babel,
helvet,
amsmath,
eurosym
}
\renewcommand{\familydefault}{\sfdefault}
\everymath={\sf}
\usepackage[helvet]{sfmath}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{eurosym}
\usepackage[margin=0.5cm, hmargin=1.5cm,vmargin=1cm]{geometry}
\usepackage{pgfplots}
\usetikzlibrary{trees}
\usepackage[normalem]{ulem}
\definecolor{babyblueeyes}{rgb}{0.63, 0.79, 0.95}
\definecolor{bluebell}{rgb}{0.64, 0.64, 0.82}
\definecolor{lavenderblue}{rgb}{0.8, 0.8, 1.0}
\definecolor{lightmauve}{rgb}{0.86, 0.82, 1.0}
\definecolor{battleshipgrey}{rgb}{0.52, 0.52, 0.51}
\definecolor{dukeblue}{rgb}{0.0, 0.0, 0.61}
\definecolor{lavender}{rgb}{0.9, 0.9, 0.98}
\definecolor{arrowcolor}{RGB}{201,216,232}% color for the arrow filling
\definecolor{circlecolor}{RGB}{79,129,189}% color for the inner circles filling
\colorlet{textcolor}{white}% color for the text inside the circles
\colorlet{bordercolor}{white}% color for the outer border of circles
\usepackage{colortbl}
\usepackage{etoolbox}
\usepackage{longtable}
\usepackage{paralist}
\usepackage[table]{xcolor}
\usepackage{enumitem}
\usetikzlibrary{chains,shapes.arrows,fit} % Timeline
%%%%%%%%%%%%%%%%%%%%%%%% NEW PACKAGES %%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{eso-pic}
%\geometry{left=2cm}%, textwidth=150mm}
%%%%%%%%%% COLORED BOXES %%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\mybox}[1]{%
\begin{tikzpicture}
\node[draw,rectangle,rounded corners=3pt,line width =1pt,text width=5cm,minimum
width=5cm,minimum height=1.5cm]{#1};
\end{tikzpicture}
}
\newcommand{\myboxx}[1]{%
\begin{tikzpicture}
\node[draw,rectangle,rounded corners=3pt,line width =1pt,text width=2cm,minimum
width=2cm,minimum height=1.5cm]{#1};
\end{tikzpicture}
}
\newcommand{\myboxxx}[1]{%
\begin{tikzpicture}
\node[draw,rectangle,rounded corners=3pt,line width =1pt,text width=2cm,minimum
width=2cm,minimum height=0.5cm]{#1};
\end{tikzpicture}
}
\newcommand{\cuadro}[1]{%
\setbox0=\hbox{#1}%
\setlength{\@tempdima}{\dimexpr\wd0+13pt}%
\begin{tcolorbox}[colframe=dukeblue,boxrule=0.25pt,arc=4pt,
left=6pt,right=6pt,top=6pt,bottom=6pt,boxsep=0pt,width=0.25pt]
#1
\end{tcolorbox}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\textbf{\ul{Problem 1:}} We wanted to study the impact of rainy days on the number
of visits to the zoo. For this purpose, the following variables were observed for
the last ten months, where \textit{Y}, is the number of annual visits, in
thousands, and \textit{X} is the number of rainy days per month.
\begin{center}
\begin{array}{|c|cccccccccc|} \hline
\text{Month} & 1 & 2& 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
\text{Rain days} & 5 & 9 & 14 & 18 & 16 & 20 & 21 & 22 & 19 & 23 \\ \hline
\text{Visits} & 107 & 105 & 100 & 101 & 95 & 89 & 88 & 86 & 84 & 81 \\ \hline
\end{array}
\end{center}
In addition, the following auxiliary data are provided for the calculations:
\boxed{$\sum x_{i}=167$} \hskip \boxed{$\sum y_{i}=936$} \hskip \boxed{$\sum
x_{i}^{2}=3097$} \hskip \boxed{$\sum y_{i}^{2}=88378$}\hskip \boxed{$\sum
x_{i}y_{j}=15197}$
CALCULATE:
\begin{compactitem}
\item[(a)] Calculate the linear correlation coefficient and interpret the result.
\item[(b)] Obtain the least square regression line that explains the number of
monthly visits as a function of the number of rainy days as a function of the number
of rainy days.
\item[(c)] What is the expected number of visits for the next month if the
Meteorological Institute reports 15 days of rainy days? How reliable is this
prediction?}
\end{compactitem}
\end{document}