8

I'd like to build this table:enter image description here

As I have a very long list to itemize, I'd like to use easylist. Obviously the easylist-group causes problems in the tabularx-environment. That's what I coded so far:

\documentclass{book}

\usepackage{tabularx}
\usepackage[framemethod=tikz]{mdframed}
\usepackage[ampersand]{easylist}

\mdfdefinestyle{round}{ % rund
innertopmargin=0pt,innerbottommargin=10pt,innerleftmargin=1pt,innerrightmargin=1pt,
middlelinewidth=3pt,innerlinewidth=0.4pt,outerlinewidth=0.4pt,
linecolor=black,middlelinecolor=white,roundcorner=20pt}

\begin{document}

\begin{mdframed}[style=round]
    \begin{tabularx}{\linewidth}{XX}

        \multicolumn{1}{c}{
            \begin{tabularx}{0.45\linewidth}{|X|}
                AAAA
                \begin{easylist}[itemize]           
                    & A1
                    & A2
                    & A3
                \end{easylist}
        \end{tabularx}} 

        & 

        \multicolumn{1}{c}{
            \begin{tabularx}{0.45\linewidth}{|X|}
                BBBB
                \begin{easylist}[itemize]           
                    & B1
                    & B2
                    & B3
                \end{easylist}
            \end{tabularx}}     

    \end{tabularx}
\end{mdframed}

\end{document}

Does anyone know a workaround?

6

This is an easy job using tcolorbox and there's no need for a tabular (I added some colors just to show off):

\documentclass{book}
\usepackage{tcolorbox}
\usepackage[ampersand]{easylist}

\tcbset{
  colback=red!5!white,
  colframe=red!75!black,
}

\begin{document}

\begin{tcolorbox}[sidebyside]
AAAA
\begin{easylist}[itemize]           
  & A1
  & A2
  & A3
\end{easylist}\tcblower
BBBB
\begin{easylist}[itemize]           
  & B1
  & B2
  & B3
\end{easylist}
\end{tcolorbox}

\end{document}

enter image description here

Without the colors and with the double frame, and the middle line not touching the borders:

\documentclass{book}
\usepackage[many]{tcolorbox}
\usepackage[ampersand]{easylist}

\tcbset{
  colback=white,
  arc=10pt,
  colframe=black,
  freelance,
  frame code={
    \draw[double,rounded corners=10pt]
      (frame.south west) -- 
      (frame.north west) -- 
      (frame.north east) --
      (frame.south east) -- cycle;
  },
  segmentation code={
    \draw
      ([yshift=5pt]segmentation.south) -- ([yshift=-5pt]segmentation.north);
  },
}

\begin{document}

\begin{tcolorbox}[sidebyside]
AAAA
\begin{easylist}[itemize]           
  & A1
  & A2
  & A3
\end{easylist}\tcblower
BBBB
\begin{easylist}[itemize]           
  & B1
  & B2
  & B3
\end{easylist}
\end{tcolorbox}

\end{document}

enter image description here

In a comment a new requirement was made: to add a big plus sign in the left half and a big minus sign on the right half; this can easily be done using interior code (using appropriate shifts you can place the signs at the desired locations):

\documentclass{book}
\usepackage[many]{tcolorbox}
\usepackage[ampersand]{easylist}
\usetikzlibrary{calc}

\tcbset{
  colback=white,
  arc=10pt,
  colframe=black,
  freelance,
  frame code={
    \draw[double,rounded corners=10pt]
      (frame.south west) -- 
      (frame.north west) -- 
      (frame.north east) --
      (frame.south east) -- cycle;
  },
  segmentation code={
    \draw
      ([yshift=5pt]segmentation.south) -- ([yshift=-5pt]segmentation.north);
  },
  interior code={
  \pgfsetfillopacity{0.5}
  \pgftransparencygroup
  \coordinate (auxleft1) at ( $ (frame.north)!0.5!(frame.south) $ ); 
  \coordinate (auxleft2) at ([xshift=10pt] $ (frame.north west)!0.5!(segmentation.north) $ ); 
    \draw[line width=6pt,gray]
      ([xshift=-25pt]auxleft2|-auxleft1) --
      ([xshift=25pt]auxleft2|-auxleft1);  
    \draw[line width=6pt,gray]
      ([yshift=-25pt]auxleft2|-auxleft1) --
      ([yshift=25pt]auxleft2|-auxleft1);
  \endpgftransparencygroup
  \coordinate (auxright1) at ( $ (frame.north east)!0.5!(frame.south east) $ ); 
  \coordinate (auxright2) at ([xshift=10pt] $ (frame.north east)!0.5!(segmentation.north) $ ); 
    \draw[line width=6pt,opacity=0.5,gray]
      ([xshift=-25pt]auxright2|-auxright1) --
      ([xshift=25pt]auxright2|-auxright1);
  }
}

\begin{document}

\begin{tcolorbox}[sidebyside]
AAAA
\begin{easylist}[itemize]           
  & A1
  & A2
  & A3
\end{easylist}\tcblower
BBBB
\begin{easylist}[itemize]           
  & B1
  & B2
  & B3
\end{easylist}
\end{tcolorbox}

\end{document}

enter image description here

4
  • That's a very powerful package. I read the documentation but couldn't figure out, how to add a big "+" in the background of the left and a big "-" in the right cell of the table. Tried the watermark and mybox-commands but it didn't work.
    – Moldevort
    Apr 12 '14 at 2:16
  • @Moldevort How big? Are the + and - signs some existing images you have? Also, take into account that in this site it's preferable to have one question per post. Apr 12 '14 at 2:21
  • it should look like this: oi57.tinypic.com/2ijghvk.jpg. There are no images, just a simple plus- and minus-sign. Unfortunately you replied quicker than I could edit my original post. ^^)
    – Moldevort
    Apr 12 '14 at 2:25
  • @Moldevort please see my updated answer. Apr 12 '14 at 2:52
3

You could just use a minipage environment:

enter image description here

Notes:

  • The following mdframed parameters have been tweaked:

    innertopmargin=\baselineskip,
    innerleftmargin=10pt,
    

Code:

\documentclass{book}
\usepackage[framemethod=tikz]{mdframed}
\usepackage[ampersand]{easylist}

\mdfdefinestyle{round}{% rund
innertopmargin=\baselineskip,innerbottommargin=10pt,innerleftmargin=10pt,innerrightmargin=1pt,
middlelinewidth=3pt,innerlinewidth=0.4pt,outerlinewidth=0.4pt,
linecolor=black,middlelinecolor=white,roundcorner=20pt}

\begin{document}
\begin{mdframed}[style=round]
    \begin{minipage}{0.48\linewidth}
                AAAA
                \begin{easylist}[itemize]           
                    & A1
                    & A2
                    & A3
                \end{easylist}
    \end{minipage}% 
    \vrule\hfill%
    \begin{minipage}{0.48\linewidth}
                BBBB
                \begin{easylist}[itemize]           
                    & B1
                    & B2
                    & B3
                \end{easylist}
    \end{minipage}% 
\end{mdframed}
\end{document}

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.