You want to declare a sans-serif math version, similar to \mathversion{bold}
and \boldmath
. Here is a MWE declaring sans (and bold sans) math versions in LuaLaTeX/XeLaTeX:
\documentclass{article}
\usepackage[paperwidth=10cm]{geometry} % Formatting for a MWE on TeX.SX
\usepackage{unicode-math}
\usepackage{microtype}
\defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}
\setmainfont{KpRoman}
\setsansfont{KpSans}
\setmonofont{KpMono}
\setmathfont{KpMath-Regular.otf}
\setmathfont{KpMath-Bold.otf}[version=bold]
\setmathfont{KpMath-Sans.otf}[version=sans]
\setmathfont{KpMath-Sansbold.otf}[version=boldsans]
\newcommand\sansmath{\mathversion{sans}}
\newcommand\boldsansmath{\mathversion{boldsans}}
\begin{document}
\section*{\sffamily\bfseries\boldsansmath Integration on Rectangular Regions of
\(\mathbb{R}^2\)}
Let \(f\) be a continuous function on the rectangular region \(R = \{ (x, y) \mid a \leq x \leq b, c \leq y \leq d\}\). Then
\begin{align*}
&\iint_R dA f(x, y) \\
= &\int_a^b dx \int_c^d dy f(x, y) \\
= &\int_c^d dy \int_a^b dx f(x, y)
\end{align*}
\sffamily\sansmath
Moreover, this can be true when \(f\) is bounded on \(R\), \(f\) is discontinuous on only finitely many smooth curves, and the iterated integrals exist.
\end{document}
You could substitute any other OpenType Math fonts,. If you intend to use this often, you probably want to define an environment that sets \sffamily\sansmath
, or add these to the definitions of high-level commands such as \sidenote
.
For PDFLaTeX, the exact commands would depend on which legacy sans-serif math font you use, but here is a MWE to set up the fonts from sansmathfonts
in \mathversion{sans}
:
\documentclass{article}
\usepackage{amsmath}
\usepackage[paperwidth=10cm]{geometry} % Formatting for a MWE on TeX.SX
\DeclareMathVersion{sans}
\SetSymbolFont{operators}{sans}{OT1}{xcmss}{m}{n}
\SetSymbolFont{letters}{sans}{OML}{cmssm}{m}{it}
\SetSymbolFont{symbols}{sans}{OMS}{cmsssy}{m}{n}
\SetSymbolFont{largesymbols}{sans}{OMX}{cmssex}{m}{n}
\DeclareMathVersion{sansbold}
\SetSymbolFont{operators}{sansbold}{OT1}{xcmss}{bx}{n}
\SetSymbolFont{letters}{sansbold}{OML}{cmssm}{bx}{it}
\SetSymbolFont{symbols}{sansbold}{OMS}{cmsssy}{m}{n} % No bold symbols for this font.
\SetSymbolFont{largesymbols}{sansbold}{OMX}{cmssex}{m}{n} % No bold symbols for this font.
\newcommand\sansmath{\mathversion{sans}}
\newcommand\sansboldmath{\mathversion{sansbold}}
\begin{document}
\section*{\sffamily\bfseries\sansboldmath Integration on a Rectangular Region \(R\)}
Let \(f\) be a continuous function on the rectangular region \(R = \{ (x, y) \mid a \leq x \leq b, c \leq y \leq d\}\). Then
\begin{align*}
&\iint_R dA f(x, y) \\
= &\int_a^b dx \int_c^d dy f(x, y) \\
= &\int_c^d dy \int_a^b dx f(x, y)
\end{align*}
\sffamily\sansmath
Moreover, this can be true when \(f\) is bounded on \(R\), \(f\) is discontinuous on only finitely many smooth curves, and the iterated integrals exist.
\end{document}
\end{document}
so this will compile. Maybe define a sans maths 'version'? If the main place you need this is side notes, you could probably use that to automatically switch. (But thetufte
classes do things in somewhat non-standard ways and I'm not that familiar with them.) Which engine are you using?