1

I want to draw a table with 3 columns and many rows which has many picture on it! Pictures have fixed height and width, and in every row I have a formula with two pictures. I want to break the table at the end of the page and used below code but it has some errors. I appreciate your hints and some better ways for doing this.

\begin{tabular}{|c|c|c|}
\hline 
\parbox[t]{0.3\textwidth}
{\vspace{-3cm}
\left 
\begin{eqnarray}
F=z-\frac{1}{2}z^2\\
h=z\\
g=\frac{1}{2}z^2\\
f=z+\frac{1}{2}\overline{z}^2
\end{eqnarray}
\right.
}
&\parbox[b]{0.3\textwidth}{\includegraphics[width=\linewidth]{Fig10_1.png}}
&\parbox[t]{0.3\textwidth}{\includegraphics[width=\linewidth]{Fig10_2.png}}
\\\hline 
\end{tabular}\\

Thanks.

3
  • You need to put some deliminator after \left and \left and \right require math mode; you cannot use eqnarray in this table (unless you put it into a minipage), and you should anyway switch to align; and if you really want help, provide an MWE, please.
    – user121799
    Jan 22, 2018 at 20:10
  • @marmot Thanks. What deliminator may I use?
    – Nosrati
    Jan 22, 2018 at 20:16
  • Brackets or . ... but please try an MWE.
    – user121799
    Jan 22, 2018 at 20:18

1 Answer 1

1

as example of mwe (which also solve your problem, i hope):

  • it start with \documentclass{...}
  • continue with preamble, where are loaded only to problem related package
  • body of document star by \begin{document} followed with your table and ending with \end{document}

please, always provide minimal working example (mwe). by it you help us to help you. it is not fun write from scratch missing code, actually without it waste our spare time i which we may be able to help someone other :-)

\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{amsmath}

\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}

\begin{tabularx}{\linewidth}{|C|C|C|}
    \hline
$
\begin{cases}
  F=z-\frac{1}{2}z^2,   &   \\
  g=\frac{1}{2}z^2,     &   \\
  f=z+\frac{1}{2}\overline{z}^2&
\end{cases}
$
    &   \includegraphics[width=\linewidth,valign=c,margin=0pt 3pt 0pt 3pt]{example-image-a}
        &   \includegraphics[width=\linewidth,valign=c]{example-image-b}    \\
    \hline
\end{tabularx}
\end{document}

enter image description here

from above code follows:

  • for table environment is handy to use tabularx environment
  • for horizontal centering of cell content is define new column type C
  • for vertical centering is used macrovalignfrom packageadjustbox(this package also call packagegraphicx, from where are used demo imagesexample-image-aandexample-image-b`
  • for math is used cases environment from amsmath (simpler than your construct)

your problem:

partial is solved by above mwe, however for multi page long table i suggest to use ltablex package, which merge features of longtable and tabularx. in this case it shold be changed to:

\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{amsmath}

\usepackage{ltablex} % new package
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}

\begin{tabularx}{\linewidth}{|>{$}C<{$}|C|C|} %  for shorter code in first column, which now is in math mode
    \hline
\begin{cases}
  F=z-\frac{1}{2}z^2,   &   \\
  g=\frac{1}{2}z^2,     &   \\
  f=z+\frac{1}{2}\overline{z}^2&
\end{cases}
    &   \includegraphics[width=\linewidth,valign=c,margin=0pt 3pt 0pt 3pt]{example-image-a}
        &   \includegraphics[width=\linewidth,valign=c]{example-image-b}    \\
    \hline
\end{tabularx}
\end{document}
0

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.