[Tex/LaTex] Math in Trebuchet MS

fontsfontspecmathspecxetex

How can I write equations in Trebuchet MS? Ideally, I'd like to have the following results:

  • All symbols that are available in Trebuchet MS are written in Trebuchet MS. That includes, e.g., Latin and Greek letters and basic math symbols such as plus, minus, parentheses, commas, etc.

  • Symbols that are not available in Trebuchet MS are taken from a font that looks sufficiently good when mixed with Trebuchet MS.

I'd like to use LaTeXiT to typeset equations that I would use in presentation slides that use the Trebuchet MS. I have tried several solutions, but none of them are completely satisfactory.

Solution 1: I tried XeLaTeX and the following preamble:

\usepackage{mathspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setallmainfonts{Trebuchet MS}

Latin and Greek letters look exactly as I'd like them to look. However, all symbols look completely out of place.

Solution 2: Next I tried to use some kind of "close replacement":

\usepackage{arevmath}

At least all math symbols are now in a sans-serif font. However, Arev Math is too far from Trebuchet MS to fool anyone.

Solution 3: Finally, I combined solutions 1 and 2. I didn't even know if this is going to compile:

\usepackage{arevmath}
\usepackage{mathspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setallmainfonts{Trebuchet MS}

The result was surprisingly good. I think this could actually fool a casual reader. All Latin and Greek letters are taken from Trebuchet MS, and all other symbols are from arevmath. Everything is in sans serif, and the "thickness" of symbols looks correct.

However, it's still fairly easy to tell the difference between an equation that is typeset with these settings and the same equation that is typeset entirely in Trebuchet MS. Commonly used symbols such as {}, () and , look different; + is too large, etc. If I place an equation typeset in Latex next to an equation that is typeset by simply writing a piece of text in Trebuchet MS, there are some eye-catching differences.

Question: Is it possible to do something better than solution 3? I think I'm missing something obvious; for example, I'd assume that it should be fairly easy to typeset basic math symbols such as , and + in Trebuchet MS?

This time I'm not really interested in finding a "correct" solution; all that matters is that the output "looks good".

EDIT:

Following Wojtek Myszka's advice, I tried something like this (with XeLaTeX):

\usepackage{arevmath}
\usepackage{mathspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setallmainfonts{Trebuchet MS}
\makeatletter
\DeclareSymbolFont{my}{EU1}{\zf@family}{m}{n}
\makeatother
\DeclareMathSymbol{!}{\mathclose}{my}{"21}
\DeclareMathSymbol{+}{\mathbin}{my}{"2B}
\DeclareMathSymbol{:}{\mathrel}{my}{"3A}
\DeclareMathSymbol{=}{\mathrel}{my}{"3D}
\DeclareMathSymbol{?}{\mathclose}{my}{"3F}
\DeclareMathSymbol{,}{\mathpunct}{my}{44}
\DeclareMathSymbol{.}{\mathord}{my}{46}

Looks better, but how do I handle the delimiters ((), [], {}) correctly?

Best Answer

It's not an answer. It's a kind of discussion or only the hint. Using beamer I can define MS Trebuchet as a default sf font: \renewcommand{\sfdefault}{jtrr} (jtrr is my Trebuchet font) and this works in math also.