我想在我的 Beamer 演示文稿中插入一个漂亮的表格,方法是使用漂亮的表格样本。但我的方程式并不适合表格中的一行。
\documentclass[leqno,mathserif,hyperref={pdfpagemode=FullScreen},
xcolor={dvipsnames,svgnames,table}]{beamer}
%\usepackage{concrete}
\usetheme{Warsaw}
\setbeamercovered{transparent}
\usepackage{amsthm}
\usepackage{amsmath,amssymb}% pour les maths
\usepackage{setspace}
\usepackage{eulervm}
\usefonttheme[onlymath]{serif}
\newcommand{\E}{\mathrm{E}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand{\Expect}{{\rm I\kern-.3em E}}
\DeclareMathOperator{\Tr}{Tr}
\newcommand*{\everymodeprime}{\ensuremath{\prime}}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tcolorbox}
\usepackage{tabularx}
\usepackage{array}
\usepackage{colortbl}
\tcbuselibrary{skins}
\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}
\tcbset{tab1/.style={fonttitle=\bfseries\large,fontupper=\normalsize\sffamily,
colback=yellow!10!white,colframe=red!75!black,colbacktitle=Salmon!40!white,
coltitle=black,center title,freelance,frame code={
\foreach \n in {north east,north west,south east,south west}
{\path [fill=red!75!black] (interior.\n) circle (3mm); };},}}
\tcbset{tab2/.style={enhanced,fonttitle=\bfseries,fontupper=\normalsize\sffamily,
colback=yellow!10!white,colframe=red!50!black,colbacktitle=Salmon!40!white,
coltitle=black,center title}}
\begin{document}
\begin{frame}
\begin{tcolorbox}[tab2,tabularx={X},title=Very Long Développements text ,boxrule=0.9pt]
Processus of something : $X_t=\mathds{1}_{\{X> t\}},\ t\in I$\\\hline\hline
theory of something : ${K(s,t)=\Cov(X_{s},X_{t})=\sum_{n\geq 1}\lambda_{n}\psi_{n}(t)\psi_{n}(s)}$ \\\hline
theory of something : $K(s,t)=\Cov(X_{s},X_{t})=\sum_{n\geq 1}\lambda_{n}\psi_{n}(t)\psi_{n}(s)$ \\\hline
4 \\\hline\hline
5 \\\hline
6 \\\hline
7 \\\hline
8 \\\hline
\end{tcolorbox}
\end{frame}
\end{document}
\end{frame}
答案1
可能只需稍微减小字体大小就足够了tcolorbox
,例如通过使用fontupper=\small
。
\documentclass[leqno,hyperref={pdfpagemode=FullScreen},
xcolor={dvipsnames,svgnames,table}]{beamer}
\usetheme{Warsaw}
\usefonttheme[onlymath]{serif}
\setbeamercovered{transparent}
\usepackage{amsthm}
\usepackage{amsmath,amssymb}% pour les maths
\usepackage{setspace}
\usepackage{eulervm}
\usefonttheme[onlymath]{serif}
\newcommand{\E}{\mathrm{E}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand{\Expect}{{\rm I\kern-.3em E}}
\DeclareMathOperator{\Tr}{Tr}
\newcommand*{\everymodeprime}{\ensuremath{\prime}}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel}
%\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tcolorbox}
\usepackage{tabularx}
\usepackage{array}
\usepackage{colortbl}
\tcbuselibrary{skins}
\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}
\tcbset{tab1/.style={fonttitle=\bfseries\large,fontupper=\normalsize\sffamily,
colback=yellow!10!white,colframe=red!75!black,colbacktitle=Salmon!40!white,
coltitle=black,center title,freelance,frame code={
\foreach \n in {north east,north west,south east,south west}
{\path [fill=red!75!black] (interior.\n) circle (3mm); };},}}
\tcbset{tab2/.style={enhanced,fonttitle=\bfseries,fontupper=\normalsize\sffamily,
colback=yellow!10!white,colframe=red!50!black,colbacktitle=Salmon!40!white,
coltitle=black,center title}}
\begin{document}
\begin{frame}
\begin{tcolorbox}[tab2,tabularx={X},title=Very Long Développements text ,boxrule=0.9pt, fontupper=\small]
Processus of something : $X_t={1}_{\{X> t\}},\ t\in I$\\\hline\hline
theory of something : ${K(s,t)=\Cov(X_{s},X_{t})=\sum_{n\geq 1}\lambda_{n}\psi_{n}(t)\psi_{n}(s)}$ \\\hline
theory of something : $K(s,t)=\Cov(X_{s},X_{t})=\sum_{n\geq 1}\lambda_{n}\psi_{n}(t)\psi_{n}(s)$ \\\hline
4 \\\hline\hline
5 \\\hline
6 \\\hline
7 \\\hline
8 \\\hline
\end{tcolorbox}
\end{frame}
\end{document}
\end{frame}