# How to combine multiple tbox commands into one command

I have the following code,

\documentclass{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[most]{tcolorbox}

\begin{document}

\begin{tcolorbox}[enhanced, sharp corners, colback=white, colframe=black, drop shadow={black,opacity=1}]
\subsubsection{Méthode1.3}
Soit G un groupe, noté multiplicativement, et soit $a\in G$. Pour déterminer l'ordre de l'élément $a$, on peut:

\end{itemize}
\end{tcolorbox}


\end{document}

which generates something like,

However, of course it would be an overkill to type

\begin{tcolorbox}[enhanced, sharp corners, colback=white, colframe=black, drop shadow={black,opacity=1}]


every time

Therefore, I wonder if it is possible to redefine the command in some way (perhaps using \newtcolorbox), so that I do not need to type

[enhanced, sharp corners, colback=white, colframe=black, drop shadow={black,opacity=1}]

## 1 Answer

Yes, that is what \newtcolorbox is for.

Here is the output with tcolorbox and the MyBox enviroment defined via \newtcolorbox:

## Code:

\documentclass{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[most]{tcolorbox}

\pagecolor{white}

\usepackage{lipsum}

\newtcolorbox{MyBox}[1][]{%
enhanced,
sharp corners,
colback=white,
colframe=black,
drop shadow={black,opacity=1},
#1
}%

\begin{document}

\begin{tcolorbox}[
enhanced,
sharp corners,
colback=white,
colframe=black,
drop shadow={black,opacity=1},
]
\lipsum[1]
\end{tcolorbox}

\begin{MyBox}
\lipsum[1]
\end{MyBox}%

\end{document}

• Thanks. My mistake was putting those options in one of the [ ] before { } in the \newtcolorbox – Carlos - the Mongoose - Danger Dec 27 '19 at 23:56