这里我有一个 MWE,显示数学模式下文本的字体大小不受我使用更改默认大小的影响,\DeclareMathSizes
但在我的之外时会更改tcolorbox
。我该怎么做才能解决这个问题?
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\newtcboxfit{\myboxSlideBody}{
fit basedim=14pt,
% standard jigsaw,
% opacityback=0,
% opacityframe=0,
colframe=green,
height=5.9cm,
width=10cm,
valign=top,
halign=left,
right=0pt,
left=0pt,
top=0pt,
bottom=0pt
}
\newcommand{\framebody}[1]{
\vskip-0.25cm
\hspace*{-0.56cm}
\begin{minipage}{1.1\textwidth}
\myboxSlideBody{#1}\par%
\end{minipage}
}
\makeatletter
\DeclareMathSizes{\f@size}{18}{14}{12}
\makeatother
\begin{document}
\begin{frame}{Frame Title}
$\vec{G} = \left\langle x,y,z\right\rangle$
\vskip0.5cm
\framebody{
$\vec{G} = \left\langle x,y,z\right\rangle$
}
\end{frame}
\end{document}
答案1
在序言中\f@size
,10.95
您为该文本大小声明了数学字体,但是\f@size
在14
您的框架中,因此获得标准设置。
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\newtcboxfit{\myboxSlideBody}{
fit basedim=14pt,
% standard jigsaw,
% opacityback=0,
% opacityframe=0,
colframe=green,
height=5.9cm,
width=10cm,
valign=top,
halign=left,
right=0pt,
left=0pt,
top=0pt,
bottom=0pt
}
\newcommand{\framebody}[1]{
\vskip-0.25cm
\hspace*{-0.56cm}
\begin{minipage}{1.1\textwidth}
\myboxSlideBody{#1}\par%
\end{minipage}
}
\makeatletter
\DeclareMathSizes{\f@size}{18}{14}{12}
%\makeatother
\def\qqq{\show\f@size}
\qqq
\begin{document}
\begin{frame}{Frame Title}
\qqq
$\vec{G} = \left\langle x,y,z\right\rangle$
\vskip0.5cm
\framebody{\qqq
$\vec{G} = \left\langle x,y,z\right\rangle$
}
\end{frame}
\end{document}
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\newtcboxfit{\myboxSlideBody}{
fit basedim=14pt,
% standard jigsaw,
% opacityback=0,
% opacityframe=0,
colframe=green,
height=5.9cm,
width=10cm,
valign=top,
halign=left,
right=0pt,
left=0pt,
top=0pt,
bottom=0pt
}
\newcommand{\framebody}[1]{
\vskip-0.25cm
\hspace*{-0.56cm}
\begin{minipage}{1.1\textwidth}
\myboxSlideBody{#1}\par%
\end{minipage}
}
\makeatletter
\DeclareMathSizes{10.95}{18}{14}{12}
\DeclareMathSizes{14}{18}{14}{12}
\makeatother
\begin{document}
\begin{frame}{Frame Title}
$\vec{G} = \left\langle x,y,z\right\rangle$
\vskip0.5cm
\framebody{
$\vec{G} = \left\langle x,y,z\right\rangle$
}
\end{frame}
\end{document}