1

I was trying to put two enumerate environments side-to-side, so I have used paracol. This code:

\begin{paracol}{2}
            
    \begin{minipage}{\columnwidth}
        $\bullet$ 1st enumerate
        \begin{enumerate}
            \item $\xi+\xi=0$
            \item $\xi + (1+\xi)=1$
            \item $(1+\xi)+1=\xi$
            \item $(1+\xi)+(1+\xi)=0$
        \end{enumerate} 
    \end{minipage}
    \switchcolumn
            
    \begin{minipage}{\columnwidth}
        $\bullet$ 2nd enumerate
        \begin{enumerate}
            \item $\xi\cdot\xi=\xi^2=\xi+1$
            \item $\xi\cdot(1+\xi)=\xi+\xi^2=1$
            \item $(1+\xi)(1+\xi)=1+\xi^2=\xi$
        \end{enumerate} 
    \end{minipage}
    \switchcolumn*
            
\end{paracol}

works fine. But when I try to put it in a certain tcolorbox I get the error "Not in outer par mode"

\documentclass{article}

\usepackage{paracol}

\usepackage{vmargin}
\setmargins{2.5cm}           
{1.3cm}                      
{15.6cm}                     
{23.42cm}                    
{10pt}                       
{1cm}                        
{0pt}                        
{2cm}   

\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}

\tcbset{
    mystyle/.style={fonttitle=\bfseries, fontupper=\normalsize\slshape,theorem style=standard,enhanced,frame hidden,boxrule=0pt,left=0.2cm,right=0.2cm, top=0.2cm,toptitle=0.1cm+1pt,bottomtitle=-0.1cm+0.5em,bottomrule=1pt}
}


\newtcbtheorem[]{ejem}{EJEMPLO}{
    fonttitle=\bfseries, fontupper=\normalsize,
    theorem style=standard,
    enhanced,frame hidden,
    boxrule=0pt,
    left=0.2cm,right=0.2cm,top=0.2cm, toptitle=0.1cm+1pt,bottomtitle=-0.1cm+0.5em,
    bottomrule=1pt,
    colback=white,coltitle=red!75!black,
    title style=white,
    titlerule=1pt, titlerule style=red!75!black,
    borderline south={1pt}{0pt}{red!75!black}
}{ejem}


\begin{document}

\begin{ejem}{}{}
\begin{enumerate}
        
    \item Case 1 \\ blablablabla
    \item Case 2 \\ Look these tables
    \begin{paracol}{2}
            
        \begin{minipage}{\columnwidth}
            $\bullet$ 1st enumerate
            \begin{enumerate}
                \item $\xi+\xi=0$
                \item $\xi + (1+\xi)=1$
                \item $(1+\xi)+1=\xi$
                \item $(1+\xi)+(1+\xi)=0$
            \end{enumerate} 
        \end{minipage}
        \switchcolumn
            
        \begin{minipage}{\columnwidth}
            $\bullet$ 2nd enumerate
            \begin{enumerate}
                \item $\xi\cdot\xi=\xi^2=\xi+1$
                \item $\xi\cdot(1+\xi)=\xi+\xi^2=1$
                \item $(1+\xi)(1+\xi)=1+\xi^2=\xi$
            \end{enumerate} 
        \end{minipage}
        \switchcolumn*
            
    \end{paracol}
        
\end{enumerate}
\end{ejem}

\end{document} 
1
  • 1
    You don't need paracol to place two minipages side by side.
    – leandriis
    Oct 28, 2020 at 9:58

1 Answer 1

0

Thanks to leandriis comment:

\begin{minipage}[t]{.5\textwidth}
    $\bullet$ 1st enumerate
    \begin{enumerate}
        \item $\xi+\xi=0$
        \item $\xi + (1+\xi)=1$
        \item $(1+\xi)+1=\xi$
        \item $(1+\xi)+(1+\xi)=0$
    \end{enumerate} 
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
    $\bullet$ 2nd enumerate
    \begin{enumerate}
        \item $\xi\cdot\xi=\xi^2=\xi+1$
        \item $\xi\cdot(1+\xi)=\xi+\xi^2=1$
        \item $(1+\xi)(1+\xi)=1+\xi^2=\xi$
    \end{enumerate} 
\end{minipage}

Thanks to campa comment, titles are aligned now¡

4
  • \begin{minipage}[t]{...}
    – campa
    Oct 28, 2020 at 10:18
  • From you remark at the end of the post I guess that you want to top align the minipages. Is that correct? If so, you can use the optional argument as follows: \begin{minipage}[t]{...}.
    – leandriis
    Oct 28, 2020 at 10:20
  • As final comment note that using \linewidth might be in general safer than \textwidth. For example \parbox does not reset \textwidth. Not an issue for this particular case, but, as I said, in general...
    – campa
    Oct 28, 2020 at 10:32
  • Thank you so much for that final comment, so instructive ^^
    – Blooment
    Oct 28, 2020 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .