I would like ta have a command with two parameters (width and height) to create provisory dummyboxes in beamer using tcolorbox. My MWE is here:

\documentclass{beamer}
  \usetheme[width=.185\paperwidth]{Hannover} 
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage[all]{tcolorbox}
\usepackage{tikz}
  \usetikzlibrary{calc, shadows, arrows, decorations.pathmorphing, shapes}

%\newcommand{dummybox}[2]{%
%\begin{tcolorbox}[beamer,width=#1\textwidth,height=#2  \textheight,colback=cyan!10!white,colbacktitle=cyan!80!black]
%Waiting for the final picture !
%\end{tcolorbox}
%}

\title{Test file for dummybox command|}
\author{Me}
\begin{document}
\frame{\titlepage}

\begin{frame}
\frametitle{Here come the dummy box}
\begin{tcolorbox}[beamer,width=0.4\textwidth,height=0.3        \textheight,colback=cyan!10!white,colbacktitle=cyan!80!black]
Waiting for the final picture !\end{tcolorbox}

%\dummybox{0.5}{0.2}
\end{frame}
\end{document}

The tcolorbox with explicit dimension works fine, I would simply like to replace it by a command (commented lines) which does'nt work. I can't see what I missed.

closed as off-topic by Steven B. Segletes, Sebastiano, Bobyandbob, Phelype Oleinik, Stefan Pinnow Oct 11 at 11:26

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    It's \newcommand{\dummybox}[... (notice the backslash before dummybox). – Rmano Oct 11 at 10:16
  • 1
    @Rmano Thanks a lot ! So stupid I am ! Sorry for the noise. – DRi Oct 11 at 10:20
  • @Rmano maybe you can turn it into an answer, but I am not sure it is a real question – DRi Oct 11 at 10:21
  • 4
    I'm voting to close this question as off-topic because it arises from a typographical syntax error. – Steven B. Segletes Oct 11 at 10:21
  • cross-post: texnique.fr/osqa/questions/5733/… – samcarter Oct 11 at 12:23