0

In my MWE I have different types of frames and in my appendix I have a table of contents on the right side of the slides. Now I have a slide which contains a table around which I want to have a greay background. Currently I have:


\documentclass{beamer}
\usetheme{Goettingen}
\usepackage{hyperref}
\usepackage{appendixnumberbeamer}
\usepackage{tcolorbox}
\usepackage{german}
\usepackage{makecell}

\renewcommand\theadalign{bc}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{\Gape[4pt]}
\renewcommand\cellgape{\Gape[4pt]}


\setbeamertemplate{itemize/enumerate body begin}{\Large}
\setbeamertemplate{itemize/enumerate subbody begin}{\large}
\hypersetup{pdfpagemode=FullScreen}

\setbeamerfont{page number in head/foot}{size=\large}
\setbeamertemplate{footline}[frame number]



\newenvironment{specialframe}
{
    \begingroup
    \advance\textwidth2cm % see beamerthemeGoettingen.sty for the number
    \hsize\textwidth
    \columnwidth\textwidth
    \begin{frame}[plain]
}
{
    \end{frame}
    \endgroup
}

\begin{document}

\setbeamertemplate{navigation symbols}{}


\title[My study]{Test text\\ Text Text Text TextvTextTextTextTextText Text Text}
\author[J. Doe]{\textbf{My name\\ \vspace{0.2cm}Test test \\Test test TEst Test Test TeTs}}
\titlegraphic{\includegraphics[width=4cm]{myLogo}}
\date{Place, 11 March 2020}

{
\setbeamercolor{page number in head/foot}{fg=structure.fg!10}
\begin{frame}[noframenumbering]
\titlepage
\end{frame}
}


\section{Introduction}
\frame[label=Einf]{
\frametitle{Test \hyperlink{details}{\beamergotobutton{Test}}}
\vspace{0.05cm}
\begin{itemize}
\item Test
\begin{itemize}
\item Test
\end{itemize}
\end{itemize}
}

\section{Test2}
\frame{
\frametitle{Test}
Test
}


\begin{specialframe}

\begin{tcolorbox}[colback=gray!20, colframe=gray!20]
\begin{tabular}{ l | c | r | c | c }

  \footnotesize $\bar{X}_T-\bar{X}_V$ & \makecell{\footnotesize Std Text \\$s_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize Std Text DE \\$SE_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize T Wert \\\footnotesize $1-\alpha=2,5\%$\\\footnotesize $df=398$}&\makecell{\footnotesize Text te \\Text\\ \footnotesize KI Test Test Test } \\
  \hline    
   -0.33 & 5 & 6& 6 & 6 \\
  7 & 8 & 9 & 6 & 6\\
  \hline  
\end{tabular}
\end{tcolorbox}

\end{specialframe}


\appendix
\setbeamercolor{page number in head/foot}{fg=structure.fg!10}
\section{End}
\frame[label=End]{
\frametitle{Test \hyperlink{details}{\beamergotobutton{Test}}}
\vspace{0.05cm}
\begin{itemize}
\item Test
\begin{itemize}
\item Test
\end{itemize}
\end{itemize}
}

\section[Sources]{references}
\begin{frame}\frametitle{Test \& Test}

\begin{thebibliography}{9}
\bibitem[Beamerpaket]{paket} \emph{Beamer Paket} \\
\text{http://latex-beamer.sourceforge.net/}

\end{thebibliography}


\end{frame}



\end{document}

The grey background of my tcolorbox should be larger, so that the last column is also fully covered.

s

But just as much as necessary. As shown with the dotted line I draw. So depending on the text inside. I tried oversize but that does not really help. I still want to have the left side as it is. With oversize I get the problem that the whole area on the left is grey and no white space/margin anymore.

1

That's what you mean.

\documentclass{beamer}
\usetheme{Goettingen}

\usepackage[skins,theorems]{tcolorbox}

\usepackage{makecell}

\newenvironment{specialframe}
{
    \begingroup
    \advance\textwidth2cm % see beamerthemeGoettingen.sty for the number
    \hsize\textwidth
    \columnwidth\textwidth
    \begin{frame}[plain]
}
{
    \end{frame}
    \endgroup
}

\begin{document}


\begin{specialframe}
\newtcbox{\ahmadi}{enhanced, left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=0mm,ignore nobreak,boxrule=0pt,arc=1pt,
colback=gray!20, colframe=gray!20}

\begin{tcolorbox}[enhanced,title=Name Table]
\resizebox{\textwidth}{!}{%
\ahmadi{%
\begin{tabular}{ l | c | r | c | c }
  \footnotesize $\bar{X}_T-\bar{X}_V$ & \makecell{\footnotesize Std Text \\$s_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize Std Text DE \\$SE_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize T Wert \\\footnotesize $1-\alpha=2,5\%$\\\footnotesize $df=398$}&\makecell{\footnotesize Text te \\Text\\ \footnotesize KI Test Test Test } \\
  \hline    
   -0.33 & 5 & 6& 6 & 6 \\
  7 & 8 & 9 & 6 & 6\\
  \hline  
\end{tabular}}}
\end{tcolorbox}

\end{specialframe}
%------------------------------------------------------
\begin{specialframe}
\newtcbox{\ahmadi}{colback=gray!20, colframe=gray!20}
\ahmadi{%
\begin{tabular}{ l | c | r | c | c }
  \footnotesize $\bar{X}_T-\bar{X}_V$ & \makecell{\footnotesize Std Text \\$s_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize Std Text DE \\$SE_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize T Wert \\\footnotesize $1-\alpha=2,5\%$\\\footnotesize $df=398$}&\makecell{\footnotesize Text te \\Text\\ \footnotesize KI Test Test Test } \\
  \hline    
   -0.33 & 5 & 6& 6 & 6 \\
  7 & 8 & 9 & 6 & 6\\
  \hline  
\end{tabular}}
%++++++++++++++++++++++++++
\newtcbox{\ahmadii}{left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=0mm,ignore nobreak,boxrule=0pt,colback=gray!20, colframe=gray!20}
\ahmadii{%
\begin{tabular}{ l | c | r | c | c }
  \footnotesize $\bar{X}_T-\bar{X}_V$ & \makecell{\footnotesize Std Text \\$s_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize Std Text DE \\$SE_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize T Wert \\\footnotesize $1-\alpha=2,5\%$\\\footnotesize $df=398$}&\makecell{\footnotesize Text te \\Text\\ \footnotesize KI Test Test Test } \\
  \hline    
   -0.33 & 5 & 6& 6 & 6 \\
  7 & 8 & 9 & 6 & 6\\
  \hline  
\end{tabular}}
\end{specialframe}

\end{document}

Output: enter image description hereenter image description here

Edit: yuor code.

\documentclass{beamer}
\usetheme{Goettingen}

\usepackage{appendixnumberbeamer}

\usepackage[skins,theorems]{tcolorbox}

\usepackage{german}
\usepackage{makecell}

\renewcommand\theadalign{bc}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{\Gape[4pt]}
\renewcommand\cellgape{\Gape[4pt]}

\setbeamertemplate{itemize/enumerate body begin}{\Large}
\setbeamertemplate{itemize/enumerate subbody begin}{\large}
\hypersetup{pdfpagemode=FullScreen}

\setbeamerfont{page number in head/foot}{size=\large}
\setbeamertemplate{footline}[frame number]



\newenvironment{specialframe}
{
    \begingroup
    \advance\textwidth2cm % see beamerthemeGoettingen.sty for the number
    \hsize\textwidth
    \columnwidth\textwidth
    \begin{frame}[plain]
}
{
    \end{frame}
    \endgroup
}

\begin{document}

\setbeamertemplate{navigation symbols}{}

\title[My study]{Test text\\ Text Text Text TextvTextTextTextTextText Text Text}
\author[J. Doe]{\textbf{My name\\ \vspace{0.2cm}Test test \\Test test TEst Test Test TeTs}}
%\titlegraphic{\includegraphics[width=4cm]{myLogo}}
\date{Place, 11 March 2020}

{
\setbeamercolor{page number in head/foot}{fg=structure.fg!10}
\begin{frame}[noframenumbering]
\titlepage
\end{frame}
}

\section{Introduction}
\frame[label=Einf]{
\frametitle{Test \hyperlink{details}{\beamergotobutton{Test}}}
\vspace{0.05cm}
\begin{itemize}
\item Test
\begin{itemize}
\item Test
\end{itemize}
\end{itemize}
}

\section{Test2}
\frame{
\frametitle{Test}
Test
}

\begin{specialframe}

\newtcbox{\ahmadi}{colback=gray!20, colframe=gray!20}
\ahmadi{%
\begin{tabular}{l|c|r|c|c}
  \footnotesize $\bar{X}_T-\bar{X}_V$ & \makecell{\footnotesize Std Text \\$s_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize Std Text DE \\$SE_{\bar{X}_T-\bar{X}_V}$}& \makecell{\footnotesize T Wert \\\footnotesize $1-\alpha=2,5\%$\\\footnotesize $df=398$}&\makecell{\footnotesize Text te \\Text\\ \footnotesize KI Test Test Test } \\
  \hline    
   -0.33 & 5 & 6& 6 & 6 \\
  7 & 8 & 9 & 6 & 6\\
  \hline  
\end{tabular}}

\end{specialframe}

\appendix
\setbeamercolor{page number in head/foot}{fg=structure.fg!10}
\section{End}
\frame[label=End]{
\frametitle{Test \hyperlink{details}{\beamergotobutton{Test}}}
\vspace{0.05cm}
\begin{itemize}
\item Test
\begin{itemize}
\item Test
\end{itemize}
\end{itemize}
}

\section[Sources]{references}
\begin{frame}\frametitle{Test \& Test}

\begin{thebibliography}{9}
\bibitem[Beamerpaket]{paket} \emph{Beamer Paket} \\
\text{http://latex-beamer.sourceforge.net/}

\end{thebibliography}

\end{frame}

\end{document}

Output:

enter image description here

| improve this answer | |
  • Thanks for your answer, but I get an error: "! Undefined control sequence." I tried to get the 2nd of your tables. – Stat Tistician Mar 9 at 14:43
  • So the second one from your tables is what I need. – Stat Tistician Mar 9 at 14:52
  • The above code is not error. test in Texlive 2019 – M.Ahmadi Mar 9 at 14:54
  • But it doesn't work? – Stat Tistician Mar 9 at 18:12
  • See edite.Did you process multiple versions? – M.Ahmadi Mar 9 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.