我正在使用以下代码
\documentclass{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsfonts} %math
\usepackage{graphicx}
\usepackage{pifont} %bouni
%--------------------
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}[2][]{%
colback=bg,
colframe=blue!75!black,
fonttitle=\bfseries,
coltitle=blue!75!black,
colbacktitle=bg,
enhanced,
attach boxed title to top left={yshift=-1.2mm, xshift=2mm},
title=#2,
#1}
\usepackage{color} %couleur
\usetheme{Warsaw}
\begin{document}
\begin{frame}{}
\begin{mybox}
[colframe=blue!75!black,coltitle=black!75!black,colbacktitle=white!90!blue,
]{\ding{43} Definition}
Let ${\bf T} = (T_1,\cdots, T_d)$ be $d$-tuple of operators in $\mathcal{B}
(\mathcal{H}).$ The joint numerical range of ${\bf T}$ is the set $JtW({\bf
T})$ of $\mathbb{C}^d$ such
that
$$JtW({\bf T})=\{(\langle T_1 x\; |\;x\rangle,\langle T_1 x\;
|\;x\rangle,\cdots,\langle T_d x
|\;x\rangle)\;:x \in \mathcal{H},\;\;\|x\|=1\}.$$
\end{mybox}
\end{frame}
\end{document}
我明白了
我想延长区块的长度。你能帮我吗?
答案1
发生这种情况是因为您的公式太长,并且不尊重边距,因此我建议将其分成两行。但是,您可以通过将选项添加到来实现所需的oversize
效果mybox
。
\documentclass{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
%-----
\usepackage{amsmath,amssymb,amsfonts} %math
\usepackage{graphicx}
\usepackage{pifont} %bouni
%--------------------
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}[2][]{%
colback=bg,
colframe=blue!75!black,
fonttitle=\bfseries,
coltitle=blue!75!black,
colbacktitle=bg,
enhanced,
attach boxed title to top left={yshift=-1.2mm, xshift=2mm},
title=#2,
#1}
\usepackage{color} %couleur
\usetheme{Warsaw}
\begin{document}
\begin{frame}{}
\begin{mybox}
[oversize, colframe=blue!75!black,coltitle=black!75!black,colbacktitle=white!90!blue,
]{\ding{43} Definition}
Let ${\bf T} = (T_1,\cdots, T_d)$ be $d$-tuple of operators in $\mathcal{B}
(\mathcal{H}).$ The joint numerical range of ${\bf T}$ is the set $JtW({\bf
T})$ of $\mathbb{C}^d$ such
that
$$JtW({\bf T})=\{(\langle T_1 x\; |\;x\rangle,\langle T_1 x\;
|\;x\rangle,\cdots,\langle T_d x
|\;x\rangle)\;:x \in \mathcal{H},\;\;\|x\|=1\}.$$
\end{mybox}
\end{frame}
\end{document}
答案2
mybox
这是另一种解决方法。您需要在定义中添加几行:width=1.05\textwidth
并left skip=-0.5cm
保留tcolorbox
长方程并将其置于框架的中心。
\documentclass{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsfonts} %math
\usepackage{graphicx}
\usepackage{pifont} %bouni
\usepackage[most]{tcolorbox}
\usepackage{color} %couleur
\usetheme{Warsaw}
\newtcolorbox{mybox}[2][]{%
width=1.05\textwidth,
left skip=-0.5cm,
colback=bg,
colframe=blue!75!black,
fonttitle=\bfseries,
coltitle=blue!75!black,
colbacktitle=bg,
enhanced,
attach boxed title to top left={yshift=-1.2mm, xshift=2mm},
title=#2,
#1}
\begin{document}
\begin{frame}{}
\begin{mybox}[%
colframe=blue!75!black,
coltitle=black!75!black,
colbacktitle=white!90!blue,
] {\ding{43} Definition}
Let ${\bf T} = (T_1,\cdots, T_d)$ be $d$-tuple of operators in $\mathcal{B} (\mathcal{H}).$ The joint numerical range of ${\bf T}$ is the set $JtW({\bf T})$ of $\mathbb{C}^d$ such that
\[
JtW({\bf T})=\{(\langle T_1 x|x\rangle,\langle T_1 x|x\rangle,\cdots,\langle T_d x|x\rangle):x \in \mathcal{H},\|x\|=1\}.
\]
\end{mybox}
\end{frame}
\end{document}