我在文档中使用了mathspec
和两个不同的数学符号。我按照这个使用了unicode-math
如何设置表格主体数学部分的不同字体。但使用时$...$
不会显示符号。我的 MWE 是:
\documentclass[a4paper,10pt]{article}
\usepackage{tabularx,lipsum}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\usepackage[no-math]{mathspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text]{Times}
\setmathsfont{Times}
\usepackage{makecell}
\usepackage{unicode-math}
\setmathfont[version=table]{Helvetica}
\newfontfamily\tablefont{Helvetica}
\usepackage{etoolbox}
\AtBeginEnvironment{table}{\setmainfont[Color=black, Numbers={Proportional,OldStyle}]{HelveticaNeueLTStd-Cn}}%
\AtBeginEnvironment{tabular}{\mathversion{table}\tablefont\fontsize{9}{11}\selectfont\renewcommand{\theadfont}{\bfseries}}%
\begin{document}
\title{Geometry}
\maketitle
From the Egyptian pyramids to modern architecture, points, lines and angles
are everywhere. $a^\circ$ Geometry is a $\alpha + \beta$ very visual element of mathematics where the
designs of buildings and the orbits of planets can be studied using basic
objects like points, lines and circles.
\begin{table}[htb!]
\centering
\begin{tabular}{L{2cm}|L{10cm}}
\hline
\thead{Variabili} & \thead{Descrizione} \\
\hline
\thead{$\alpha + \beta$} & \thead{$a+b$}\\
\hline
gdp\_us & GDP USA trimestrale nominale (dal Q1 1947 al Q4 2013), fonte: FRED2\\
\hline
\end{tabular}
\end{table}
Thales (624--546~BCE) is known to be the founder of Greek geometry. He was
an astronomer and $a^\circ$ philosopher, and $\alpha + \beta$ records show he was the first person to
use mathematical geometry to calculate the height of an Egyptian pyramid
using the Sun's rays and to accurately predict the timing of a solar
eclipse.
\end{document}