如何在表格中放置第二种字体。第一种是 Utopia Regular,以 Math Design 为主要字体。第二种是 TeX Gyre Heroes,用于表格。
\documentclass{beamer}
\mode<presentation>
{
\usetheme{Madrid}
\setbeamercovered{transparent}
}
\usepackage[utf8x]{inputenc}
\usepackage[MeX]{polski}
\usepackage[utopia]{mathdesign} %main font
\usepackage{tgheros} %second font - for tables
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\usepackage{tabu}
\usecolortheme{crane}
\begin{document}
\begin{frame}
\frametitle{Wynagrodzenia}
\begin{table}
\tabulinesep =_4pt^4pt
\begin{tabu}to \textwidth{@{}cX[m]X[c]X[c]X[c]@{}}
\tabucline[1.0pt blue!40 off 0pt]{-}
\multicolumn{2}{@{}l}{procesy} & Min & Max &\\
\tabucline[0.7pt blue!40 off 0pt]{-}
& Junior & 1 700 & 2 800 & 3 200\\
\tabucline[0.2pt blue!40 off 2pt]{.}
& Senior & & ? &\\
\tabucline[0.2pt blue!40 off 2pt]{-}
& Specjalist & & ? &\\
\tabucline[0.2pt blue!40 off 2pt]{-}
& Team Leader & & ? &\\
\tabucline[1pt blue!40 off 0pt]{-}
\end{tabu}
\caption{1. Wynagrodzenia: Procesy HR}
\label{tabela1}
\end{table}
\end{frame}
\end{document}
答案1
使用etoolbox
包可以使用
\AtBeginEnvironment{table}{\renewcommand{\sfdefault}{qhv}\sffamily}{}{}
更改tgheros
所有表内的字体,且无需加载包tgheros
。