According to the table code below, Could anyone please help me to:
- center vertically and horizontally
TextB1
,TextAB
,TextC0
,TextC1
,TextC2
,TextC17
andTextC18
- Draw vertical line along the right side of the cell containg
TextC0
. i.e. drawing a line along the left side of the cells containingTextC1
...until...TextC6
. The|
can't do this with the\multirow
command.
I'll really be grateful if you help me on that.
\begin{table}[h]
\footnotesize
\centering
\renewcommand{\arraystretch}{1.5}
\setlength{\arrayrulewidth}{1.5pt}
\def\tabularxcolumn#1{m{#1}}
\begin{tabularx}{\linewidth}{|>{\centering\arraybackslash}m{1.8cm} > {\centering\arraybackslash}m{1.8cm} m{1.8cm} X >{\centering\arraybackslash}m{2.5cm}|}
\hline
\multicolumn{2}{|m{3.6cm}}{\centering{\textbf{Vertically and horizontally centered Text (width = 2cm (colum1) + 2cm (column2) = 4cm)}}} & \centering{\textbf{Vertically and horizontally centered Text (width = 1.8cm)}} & \textbf{Justified and vertically centered Text (width= X)} & \textbf{Vertically and horizontally centered Text (width=2.5cm)} \tabularnewline \hline
\multicolumn{2}{|c}{TextA1} & TextA2 & LongText1 LongText1 LongText1 LongText1 LongText1 LongText1 & \multirow{5}{*}{TextAB} \\ \cline{1-4}
\multicolumn{2}{|c}{\multirow{4}{*}{TextB1}} & TextB2 & LongText2 LongText2 LongText2 LongText2 LongText2 LongText2 & \\ \cline{3-4}
& & TextB3 & LongText3 LongText3 LongText3 LongText3 LongText3 LongText3 & \\ \cline{3-4}
& & TextB4 & LongText4 LongText4 LongText4 LongText4 LongText4 LongText4 & \\ \cline{3-4}
& & TextB5 & LongText5 LongText5 LongText5 LongText5 LongText5 LongText5 & \\ \hline
\multirow{10}{*}{TextC0} & \multirow{2}{*}{TextC1} & TextC7 & LongText6 LongText6 LongText6 LongText6 LongText6 LongText6 & \multirow{2}{*}{TextC17} \\ \cline{3-4}
& & TextC8 & LongText7 LongText7 LongText7 LongText7 LongText7 LongText7 & \\ \cline{2-5}
& \multirow{4}{*}{TextC2} & TextC9 & LongText8 LongText8 LongText8 LongText8 LongText8 LongText8 & \multirow{4}{*}{TextC18} \\ \cline{3-4}
& & TextC10 & LongText9 LongText9 LongText9 LongText9 LongText9 LongText9 & \\ \cline{3-4}
& & TextC11 & LongText10 LongText10 LongText10 LongText10 LongText10 LongText10 & \\ \cline{3-4}
& & TextC12 & LongText11 LongText11 LongText11 LongText11 LongText11 LongText11 & \\ \cline{2-5}
& TextC3 & TextC13 & LongText11 LongText11 LongText11 LongText11 LongText11 LongText11 & TextC19 \\ \cline{2-5}
& TextC4 & TextC14 & LongText12 LongText12 LongText12 LongText12 LongText12 LongText12 & TextC20 \\ \cline{2-5}
& TextC5 & TextC15 & LongText13 LongText13 LongText13 LongText13 LongText13 LongText13 & TextC21 \\ \cline{2-5}
& TextC6 & TextC16 & LongText14 LongText14 LongText14 LongText14 LongText14 LongText14 & TextC22 \\ \hline
\end{tabularx}
\end{table}
\documentclass
and ends with\end{document}
and generates a table that shows the problem. Just a fragment starting\begin{table}
makes it very hard for anyone to help you.