Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
Thanks, I just upload a picture to show what I want. –  Isai Jan 1 '13 at 0:30
    
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. –  Harish Kumar Jan 1 '13 at 2:04
    
I forgot it, the trick, using \parbox. Thanks. –  Isai Jan 1 '13 at 4:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.