% vim: ts=2 sw=2
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent

\usepackage{amsmath}
%\usepackage[lite]{mtpro2}

\usepackage{booktabs}                           % professional rules for table layout

\usepackage{ifluatex,ifxetex}

\ifluatex
  \usepackage{fontspec}
  %\setmainfont[Mapping=tex-text,Ligatures=Common]{TeXGyreHeros}
  %\setmainfont[Mapping=tex-text,Ligatures=Common]{Arno Pro}
  \setmainfont[Mapping=tex-text,Ligatures=Common]{Futura Std}
\else
  \ifxetex
    \usepackage{fontspec}
    %\setmainfont[Mapping=tex-text,Ligatures=Common,Numbers=Lining]{Arno Pro}
    \setmainfont[Mapping=tex-text,Ligatures=Common]{Futura Std}
  \else
    \renewcommand{\rmdefault}{ugm}
    \usepackage{euler}
  \fi
\fi

\begin{document}

Testing Math font: I want to use the main text font for every glyph it
defines:
\begin{enumerate}
  \item numbers
  \item Roman glyphs (normal, italic and bold)
  \item Greek glyphs (upright, slanted, bold)
\end{enumerate}
I guess each should be optional.

Tests:\par
{\centering
  \begin{tabular}{c c c c c}
    \toprule
    Command & Math & Text & XeLaTeX? & LuaLaTeX?\\
    \midrule
    \verb|$\mathrm{Res}$| & $\mathrm{Res}$ & Res & OK & OK\\
    \verb|$\mathbf{Tes}$| & $\mathbf{Tes}$ & \textbf{Tes} & OK & OK\\
    \verb|$\mathit{Zut}$| & $\mathit{Zut}$ & \textit{Zut} & OK & OK\\
    \verb|$\max$| & $\max$ & max & OK & OK\\
    \verb|$G$| & $G$ & \textit{G} & NO & NO\\
    \verb|$\boldmath{T}$| & $\boldmath{T}$ & \textbf{\textit{T}} & NO & NO\\
    \verb|$\xi$| & $\xi$ & ξ & NO & NO\\
    \bottomrule
  \end{tabular}
}


Demos:

\textbf{Theorem 1 (Residue Theorem)} Let $f$ be analytic in the region
$G$ except for the isolated singularities $a_1$, $a_2$, \ldots, $a_m$.
If $\gamma$ is a closed rectifiable curve in $G$ which does not pass
through any of the points $a_k$ and if $\gamma\approx 0$ in $G$, then
\[\frac{1}{2\pi i}\int_\gamma f=\sum_{k=1}^m n(\gamma;a_k)\mathrm{Res}(f;a_k).\]

\textbf{Theorem 2 (Maximum Modulus)} Let $G$ be a bounded open set in
%$\mathbb{C}$
and suppose that $f$ is a continuous function on $\bar G$
which is analytic in $G$. Then
\[\max \{|f(z)| : z\in G\}=\max\{|f(z)| : z\in \partial\, G\}.\]

\textbf{Theorem 3 (Jacobi's Identity)} Define the ``theta function''  $\vartheta$ by
\[\vartheta(t)=\sqrt{\sum_{n=-\infty}^\infty \exp(-\pi n^2 t)},\qquad t>0.\]
 Then
\[\vartheta(t)=t^{-1/2}\vartheta(1/t).\]

\end{document}