3

I'd like to get your help with a table where I'm using multi rows. It appears lines from rows, it's undesirable.
Also I have a weird alignment of the text in cells, title in 6th row isn't centered. I attached a figure to depict.

\documentclass{article}
\title{New}

\usepackage{array}

\usepackage{multirow}

\begin{document}
\begin{table}[H]
 \caption{Title}
 \centering
\begin{tabular}{|>{\centering\arraybackslash}m{30mm} |>{\centering\arraybackslash}m{30mm} |>{\centering\arraybackslash}m{30mm} |}
\hline
\multicolumn{3}{|c|}{\textbf{TEXT}}\\
\hline
\multicolumn{2}{|c|}{text} & \multirow{2}{*}{text}\\
\hline
\center text\newline text & \center Meses\newline text& \\
\hline
\multicolumn{2}{|c|}{TEXT} & TEXT\\
\hline
\multicolumn{2}{|c|}{Text} & \multirow{3}{*}{text text text text text text text text text text text text}\\
\hline
\multicolumn{2}{|>{\centering\arraybackslash}m{60mm}|}{\textbf{TITLE}\newline Text text text text Text text text text Text text text text Text text text text} & \\
\hline
 & \textbf{TITLE}\newline Text text text text Text text text text Text text text text Text text text text & \\
\hline
\end{tabular}

\end{table}

 \end{document}

fig

3

You should use \centering not center. Also \cline{<starting column> - <ending column>} can be used to draw fragments of lines. However, I did not fully understand what you have in mind. Some more clarity is needed if this has to be improved further:

\documentclass{article}
\usepackage{multirow,array}

\begin{document}
  \begin{table}[h]
 \caption{Title}
 \centering
\begin{tabular}{|>{\centering\arraybackslash}m{30mm} |>{\centering\arraybackslash}m{30mm} |>{\centering\arraybackslash}m{30mm} |}
\hline
\multicolumn{3}{|c|}{\textbf{TEXT}}\\
\hline
\multicolumn{2}{|c|}{text} & \multirow{3}{*}{text}\\
\cline{1-2}
 text  &  Meses & \\
  text  &  text& \\
\hline
\multicolumn{2}{|c|}{TEXT} & TEXT\\
\hline
\multicolumn{2}{|c|}{Text} & \multirow{9}{*}{\parbox{30mm}{text text text text text text text text text text text text}}\\
\cline{1-2}
\multicolumn{2}{|c|}{\textbf{TITLE}} & \\
\multicolumn{2}{|>{\centering\arraybackslash}m{60mm}|}{Text text text text Text text text text Text text text text Text text text text} & \\\cline{1-2}
 & \textbf{TITLE} & \\
 & Text text text text Text text text text Text text text text Text text text text & \\
\hline
\end{tabular}

\end{table}
\end{document}

enter image description here

3
  • I also was working on that, yes, I got it. Thanks a lot. But I have a long text in the right bottom cell, it isn't controlled with column width, please how can I fix it, I've just changed the code. – Isai Jan 1 '13 at 0:52
  • @Isai See if it is ok now. – user11232 Jan 1 '13 at 2:04
  • I forgot it, the trick, using \parbox. Thanks. – Isai Jan 1 '13 at 4:11

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.