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

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 7 '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 8 '12 at 16:39
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}
  • Malmedal: thank you for your answer but I would like to replace the title of the lines that you put R1 R2 R3 with a text but when I put that it is disorganized – boutheina May 7 '12 at 16:41
  • Perhaps what you actually want is 11 columns? The first column should be extra wide? – Håkon Malmedal May 7 '12 at 16:48
  • yes this is right – boutheina May 7 '12 at 16:49
  • 1
    Replace the first p{1.3cm} with l. – Håkon Malmedal May 7 '12 at 17:26
  • 1
    Add ten ampersands (&) before the double backslash. – Håkon Malmedal May 7 '12 at 18:07

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.