1

enter image description here

This is my new code but i have a new pb:

\begin{table}[!h]
\begin{center}
\begin{tabular}{l|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|p{0.9cm}|}
\cline{2-11}
&\multicolumn{2}{|p{2.5cm}|} {\bf 100 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 250 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 500 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 750 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 1000 Pages }\\
\cline{2-11}
&\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline
Nb Pages Publiques &\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline
Nb Pages Amis \\et leurs Amis &\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline
Text&\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline

\end{tabular}
\end{center}

\bf{\caption{Caractéristiques du Réseau 1}}
\end{table}

When I put Nb pages Amis\\ et leurs Amis a line empty is inserted and I want to eliminate this please

David Carlisle
  • 757,742
boutheina
  • 779

2 Answers2

2

Perhaps something like this?

enter image description here

\documentclass[landscape]{scrartcl}
\usepackage{geometry}
\begin{document}
\begin{table}[!h]
\begin{center}
\begin{tabular}{p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|}
\cline{2-11}
&\multicolumn{2}{|p{2.5cm}|} {\bf 100 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 250 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 500 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 750 Pages }& \multicolumn{2}{|p{2.5cm}|} {\bf 1000 Pages }\\
\cline{2-11}
&\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline
Text&\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline
Text&\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline
Text&\bf R1& \bf R2& \bf R3& \bf R4& \bf R5& \bf R6& \bf R7& \bf R8& \bf R9& \bf R10\\
\hline

\end{tabular}
\end{center}

\bf{\caption{Caractéristiques du Réseau 1}}
\end{table}

\end{document}
David Carlisle
  • 757,742
2

To center text vertically in the spanning top left corner use multirow.

\usepackage{multirow}

Saves some work that you are not using both multirow and multicolumn in on cell. To reproduce the table you have outlined you could use this sample code. I changed the sizes somewhat to make it fit in my sample document, so you would have to adapt it a bit for your use.

multirow: the first argument is how many rows to span, the second for specifying the width, * for autoadjust to content length, and the third is the content of the cell.

cline: the argument is from which column to which column the line should be drawn.

http://en.wikibooks.org/wiki/LaTeX/Tables#Spanning

\begin{table}[!h]
\centering
\begin{tabular}{|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|p{0.65cm}|}\hline
    \multirow{2}{*}{ct} & \multicolumn{2}{|c|}{ct} & \multicolumn{2}{|c|}{ct} & \multicolumn{2}{|c|}{ct} & \multicolumn{2}{|c|}{ct}& \multicolumn{2}{|c|}{ct}     \\ \cline{2-11}
    & sub& sub& sub& sub& sub& sub& sub& sub& sub& sub\\ \hline
    row & fill& fill& fill& fill& fill& fill& fill& fill& fill& fill\\\hline
    row & fill& fill& fill& fill& fill& fill& fill& fill& fill& fill\\\hline
    row & fill& fill& fill& fill& fill& fill& fill& fill& fill& fill\\\hline
\end{tabular}
\end{table}
  • the answer of user14316 is right but the same pb when I put the text in the place of row it is disorganized I want to put Nbre Pages Publique Nbre pages Amis et leurs Amis Nbre Pages Amis Seulement – boutheina May 07 '12 at 17:06
  • That might be because I specified the length of the column, you would maybe want to change the column specifier to l or c for it to autoadjust. In that sample a long line will be broken into smaller ones. – cybrhuman May 08 '12 at 16:39