1

I want to make a table in LaTeX and I wrote the following program:

\documentclass[]{article}
\usepackage{graphicx}
\usepackage[usenames, dvipsnames]{color}
\usepackage{multirow}



\begin{document}
\begin{tabular}{|c|c|c||c|c|c|c}
\cline{2-5}
\multicolumn{1}{c|}{\multirow{1}{*}{}}& $\gamma_n$ & $\rho_{00}^\infty$  +     $\eta_{\infty}$ & $\rho_{00}^\infty$  + $\eta_{\infty}$ & $\gamma_n$ &     \multicolumn{1}{|c}{\multirow{1}{*}{}}\\
\hline
\multirow{5}{*}{\includegraphics[height=20mm]{fnodiss.eps}}& 0.01 & 0.2&     0.01 & 0.2 & \multicolumn{1}{c|}{\multirow{5}{*}{\includegraphics[height=20mm]{fnodiss.eps}}}   \\
\cline{2-5}‬ 
& 0.01 & 0.2 & 0.01 & 0.2   \\
\cline{2-5}‬
 & 0.01 & 0.2& 0.01 & 0.2  \\
\cline{2-5}‬
& 0.01 & 0.2& 0.01 & 0.2  \\
\cline{2-5}‬
& \textcolor{red}{0.9399} & 0.2 & 0.01 & 0.2 \\
\hline
\multirow{5}{*}{\includegraphics[height=20mm]{fnodiss.eps}}& 0.01 & 0.2 & 0.01 & 0.2  &\multicolumn{1}{c|}{\multirow{5}{*}{33O}}  \\
\cline{2-5}‬ 
& 0.01 & 0.2& 0.01 & 0.2  \\
\cline{2-5}‬
& 0.01 & 0.2& 0.01 & 0.2  \\
\cline{2-5}‬
& 0.01 & 0.2& 0.01 & 0.2  \\
\cline{2-5}‬
& 0.01 & 0.2 & 0.01 & 0.2 \\
\hline
\multirow{5}{*}{\includegraphics[height=20mm]{fnodiss.eps}}& 0.01 & 0.2 &     0.01 & 0.2  &\multirow{5}{*}{\includegraphics[height=20mm]{fnodiss.eps}}      \\
\cline{2-5}‬ 
& 0.01 & 0.2 & 0.01 & 0.2 \\
\cline{2-5}‬
& 0.01 & 0.2 & 0.01 & 0.2 \\
\cline{2-5}‬
& 0.01 & 0.2 & 0.01 & 0.2 \\
\cline{2-5}‬
& 0.01 & 0.2 & 0.01 & 0.2 \\
\hline
\end{tabular}
\end{document}

and it works good except the last column is not perfect, mean the last vertical line is not complete.

Please help me.

2

You forgot ampersands at the end of some rows. I took the opportunity to improve your table, with the hhline package, and made some corrections and simplifications to the code:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[usenames, dvipsnames]{xcolor}
\usepackage{array, multirow, hhline}
\newcommand\myhline{\hhline{~|--||--~}}

\begin{document}

\centering
\setlength\extrarowheight{2pt}
\begin{tabular}{|c|c|c||c|c|c|c|}
\cline{2-5}
\multicolumn{1}{c|}{}& $γ_n$ & $ρ_{00}^∞$ + $η_{∞}$ & $ρ_{00}^∞$ + $η_{∞}$ & $γ_n$ & \multicolumn{1}{c}{} \\[2pt]
\hhline{---||---}
\multirow{5}{*}[-0.6ex]{\includegraphics[height=20mm, width=35mm]{fnodiss.eps}}& 0.01 & 0.2& 0.01 & 0.2 & \multicolumn{1}{c|}{\multirow{5}{*}[-0.6ex]{\includegraphics[height=20mm, width=35mm]{fnodiss.eps}}} \\
\myhline%
& 0.01 & 0.2 & 0.01 & 0.2 & \\
\myhline
‬ & 0.01 & 0.2& 0.01 & 0.2 & \\
\myhline
& 0.01 & 0.2& 0.01 & 0.2 & \\
\myhline
& \textcolor{red}{0.9399} & 0.2 & 0.01 & 0.2 & \\
\hhline{---||---}
\multirow{5}{*}[-0.6ex]{\includegraphics[height=20mm, width=35mm]{fnodiss.eps}}& 0.01 & 0.2 & 0.01 & 0.2 &\multicolumn{1}{c|}{\multirow{5}{*}{33O}} \\
\myhline
& 0.01 & 0.2& 0.01 & 0.2 & \\
\myhline
& 0.01 & 0.2& 0.01 & 0.2 & \\
\myhline
& 0.01 & 0.2& 0.01 & 0.2 & \\
\myhline
& 0.01 & 0.2 & 0.01 & 0.2 & \\
\hhline{---||---}
\multirow{5}{*}[-0.6ex]{\includegraphics[height=20mm, width=35mm]{fnodiss.eps}}& 0.01 & 0.2 & 0.01 & 0.2 &\multirow{5}{*}[-0.6ex]{\includegraphics[height=20mm, width=35mm]{fnodiss.eps}} \\
\myhline
& 0.01 & 0.2 & 0.01 & 0.2 & \\
\myhline
& 0.01 & 0.2 & 0.01 & 0.2 & \\
\myhline
& 0.01 & 0.2 & 0.01 & 0.2 & \\
\myhline
& 0.01 & 0.2 & 0.01 & 0.2 & \\
\hline
\end{tabular}

\end{document} 

enter image description here

1

I little rearrange your example:

\documentclass[]{article}
\usepackage{graphicx}
\usepackage[usenames, dvipsnames]{color}
\usepackage{multirow}

\usepackage[active,floats,tightpage]{preview}
\setlength\PreviewBorder{1em}


\begin{document}
    \begin{table}
\begin{tabular}{|c|c|c||c|c|c|c|}
\cline{2-5}
\multicolumn{1}{c|}{\multirow{1}{*}{}}
    &   $\gamma_n$ & $\rho_{00}^\infty$  +  $\eta_{\infty}$
        &   $\rho_{00}^\infty$  + $\eta_{\infty}$
            &   $\gamma_n$
                &   \multicolumn{1}{c}{}    \\
\hline
\multirow{5}{*}{\includegraphics[height=20mm]{example-image}}
    &   0.01
        & 0.2
            &   0.01
                &   0.2
                    &                   \\
\cline{2-5}‬
    & 0.01  & 0.2   & 0.01 & 0.2    &   \\
\cline{2-5}‬
    & 0.01  & 0.2   & 0.01 & 0.2    &   \\
\cline{2-5}‬
    & 0.01  & 0.2   & 0.01 & 0.2    &   \\
\cline{2-5}‬
    & \textcolor{red}{0.9399} 
            & 0.2   & 0.01 & 0.2    &
                        \multirow{-5}{*}{\includegraphics[height=20mm]{example-image}}   \\
\hline
\end{tabular}
    \end{table}
\end{document}

and last line is appear: enter image description here

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.