# Equation wider than tcolorbox in twocolumn

I have a large equation I would like to fit within tcolorbox in a \twocolumn page without split it. Could you please help me to fix this?

i tired even \begin{minipage}[c]{5in} but with no luck

MWE

 \documentclass[a4paper,twocolumn]{article}

\usepackage{amsmath}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}

\tcbset{
lemmastyle/.style={enhanced, colback=white, colframe=blue!20, arc=0pt,
fonttitle=\bfseries, description color=Maroon,
colbacktitle=white, coltitle=DarkOliveGreen,
top=\tcboxedtitleheight,
boxed title style={arc=0pt},
attach boxed title to top right={yshift=-\tcboxedtitleheight/3,
xshift=-2mm}%
},
}

\newtcbtheorem{myLemma}{Exercise}{lemmastyle}{thm}

\usepackage{pifont}

\begin{document}

\begin{myLemma}{}{}
\begin{enumerate}
\item Show that
${\displaystyle D_2f(x,y) = \frac{\partial {}}{\partial{y}} \left ( \int_0^xg_1 (t,0) \ dt + \int_0^y g_2(x,s) \ ds \right)}$
\item prove that
${ \displaystyle \left(\forall x\in\mathbb{R} \right)\left(\forall y \in \mathbb{R} \right) x\neq y\, \text{and} \, x+y \neq 2 \implies x^{2}-2x \neq y^2-2y }$
\end{enumerate}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\end{document}


• One amsmath will do… What are the $15$ empty lemmas for? Nov 15 '15 at 18:15
• Just example to make towcolum, how can i fix that with amsmath thank u
– Educ
Nov 15 '15 at 18:17
• What about using align to split your equations? Nov 15 '15 at 18:21
• i don't want to split it
– Educ
Nov 15 '15 at 18:28
• if you don't want to split it, make it smaller, with \small but also most of those \left/\right should be removed (they are just taking up horizontal space you don't have) Nov 15 '15 at 18:37

Just remove the external pairs of braces. What are they here for? If you really need them, make several groups. Reduce the distance form the frame to the ledt margin of the text inside, and align the enumeration on the left margin with the enumitem package. Finally, if you reduce the font size, do it outside math mode:

    \documentclass[a4paper,twocolumn]{article}

\usepackage{amsmath,amsfonts,amssymb}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}

\tcbset{
lemmastyle/.style={enhanced, colback=white, colframe=blue!20, arc=0pt,
fonttitle=\bfseries, description color=Maroon,
colbacktitle=white, coltitle=DarkOliveGreen,
top=\tcboxedtitleheight,
boxed title style={arc=0pt},
attach boxed title to top right={yshift=-\tcboxedtitleheight/3, xshift=-2mm}%
}, left=0mm
}

\newtcbtheorem{myLemma}{Exercise}{lemmastyle}{thm}

\usepackage{enumitem}

\begin{document}

\begin{myLemma}{}{}
\begin{enumerate}[wide=0pt, leftmargin=*]
\item Show that\\\small
${\tiny \displaystyle D_2f(x,y) = \frac{\partial {}}{\partial{y}} \biggl( \int_0^xg_1 (t,0) \ dt + \int_0^y g_2(x,s) \ ds \biggr)}$
\item Prove that\\\small
$\displaystyle \left(\forall x\in\mathbb{R} \right)\left(\forall y \in \mathbb{R} \right) x\neq y\; \text{and} \; x+y \neq 2 \implies x^{2}-2x \neq y^2-2y$
\end{enumerate}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\begin{myLemma}{}{}
\end{myLemma}

\end{document}


• the equation that i provide is just an example i have lots of equation that need pairs of braces. and they are too long that i have to write it in tcolorbox
– Educ
Nov 15 '15 at 18:42
• I don't understand: the braces are here to make a group. The pair of  already make a group. Nov 15 '15 at 18:47
• please check my update
– Educ
Nov 15 '15 at 18:53
• @Educ: please take a look at my updated answer. I still don't understand why you need these braces. Nov 15 '15 at 19:36
• @Bernard after edits I deleted mine so +1, but Educ, the question just seems strange it is clear that you should split these equations over two lines, setting them small enough to fit on one line makes them unreadable. Nov 15 '15 at 20:06