1

I have using mathspec and unicode-math for the purpose of two different math symbols in my documents. I have used as per this how do set table body math parts in different font. But when using $...$ the symbols are not displayed. My MWE is:

\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} 
Balaji
  • 2,282
  • As I said in the other question, you have to use fonts with math tables, like XITS Math. Helvetica and Times do not have such tables. Also, load either mathspec or unicode-math, but not both. – karlkoeller Feb 01 '15 at 10:30
  • @karlkoeller: The above MWE is not working. Could you please advise how do run successfully. I will use mathspec or unicode-math. But my document required two different math setup. how do achieve this? – Balaji Feb 01 '15 at 10:39
  • as @karlkoeller says \setmathsfont{Times} is wrong, you have to use a unicode math font (stix is designed to match a document using Times as body font) – David Carlisle Feb 01 '15 at 10:45
  • @David: Actually i have using main font is Times LT Std. For the MWE only i have used times, because that font is not a free-font. Could you please advise how do use 2 different math fonts in my documents. – Balaji Feb 01 '15 at 10:48
  • It doesn't matter which Times you have, you can only use the math fonts listed in the unicode math documentation. (You can arrange for other fonts to be used for specific math alphabet commands \something{abc} but the main math symbol font has to be from a font designed for that use. – David Carlisle Feb 01 '15 at 10:56
  • XITS Math or TeX Gyre Termes are amongst the maths fonts that are Times like. – Andrew Swann Feb 01 '15 at 19:58
  • There is no sans serif math font that can be used with unicode-math. So you're bound to mathspec, if you really want sans serif for tables (which I find bad). Surely you can't use unicode-math and mathspec together. The alternative is using traditional math fonts. – egreg Feb 01 '15 at 20:56

0 Answers0