3

\documentclass[a4paper,10pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{multirow}

\begin{document}
\begin{table}[ht!]
\caption[Structural properties of $5$ networks charging of the $5$ biological
functions and the global network]{\textbf{Structural properties of $5$ networks
charging of the $5$ biological functions and the global network}.
\textbf{Notes}: CCs is short for Connected Components, Clus.Coef. means
Clustering Coefficient}
\begin{tabular}{lrrrrrr}
\toprule
\multicolumn{1}{>{\centering}p{0.75cm}}{\textbf{Network}} &
\multicolumn{1}{>{\centering}p{0.75cm}}{\textbf{Nb. CCs}} &
\multicolumn{1}{>{\centering}p{1.0cm}}{\textbf{Nb. Nodes}} & 
\multicolumn{1}{>{\centering}p{1.50cm}}{\textbf{Nb. Clusters}} & 
\multicolumn{1}{>{\centering}p{1.25cm}}{\textbf{Density}} & 
\multicolumn{1}{>{\centering}p{1.25cm}}{\textbf{Avg. Deg.}} & 
\multicolumn{1}{>{\centering}p{1.25cm}}{\textbf{Avg. Clus. Coef.}} \\
\midrule
MNHPC   & 1 & 92 & 92 & 0.036 & 3 & 0.218 \\
Vss     & 2 & 90 & 90 & 0.037 & 2 & 0.194 \\
Vac\_s  & 2 & 90 & 90 & 0.037 & 2 & 0.205 \\
Vac\_f  & 1 & 92 & 92 & 0.036 & 3 & 0.215 \\
Vac\_g  & 1 & 83 & 83 & 0.039 & 3 & 0.215 \\
Vgl\_out    & 1 & 92 & 92 & 0.036 & 2 & 0.214 \\

\midrule
Vss     & 2 & 90 & 90 & 0.037 & 2 & 0.194 \\
Vac\_s  & 2 & 90 & 90 & 0.037 & 2 & 0.205 \\
Vac\_f  & 2 & 90 & 90 & 0.037 & 3 & 0.215 \\
Vac\_g  & 41& 3  & 3  & 0.667 & 3 & 0.215 \\
Vgl\_out    & 2 & 90 & 90 & 0.036 & 2 & 0.214 \\

\midrule
Vss     & 10& 70 & 70 & 0.048 & 2 & 0.194 \\
Vac\_s  & 8 & 74 & 74 & 0.044 & 2 & 0.205 \\
Vac\_f  & 5 & 81 & 81 & 0.040 & 3 & 0.215 \\
Vac\_g  & 5 & 81 & 81 & 0.040 & 3 & 0.215 \\
Vgl\_out    & 5 & 82 & 82 & 0.038 & 2 & 0.214 \\
\bottomrule

\end{tabular}
\label{tab:chap5-structural-properties}
\end{table}

\end{document}

I cannot debug from the piece of latex code. Do you know where is the problem?


! Argument of \@firstoftwo has an extra }.
 
                \par 
l.15 ...{>{\centering}p{0.75cm}}{\textbf{Network}}
6

You forgot to load the array package, which defines the >{…} syntax for tables. However I suggest you'd rather use the makecell package, that allows for line breaks and common formatting in cells, with the \thead and \makecell commands. To have boldface captions, use the caption package: this will save you typing twice the same caption, in boldface and in normal weight for the list of figures. Finally, I used the threeparttable package to typeset the note at the bottom of the table, and siunitx for a proper alignment of numbers in columns 2-4.

\documentclass[a4paper,10pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{booktabs, caption}
\usepackage{multirow, array, makecell}

\usepackage[flushleft]{threeparttable} \renewcommand\theadfont{\bfseries} \captionsetup{font = bf} \usepackage{siunitx} \sisetup{table-format = 2.0}

\begin{document}%

\begin{table}[ht!]
\begin{threeparttable}
\caption{Structural properties of 5 networks charging of the 5 biological functions and the global network}
\begin{tabular}{lSSSccc}
\toprule
\thead{Network} & {\thead{Nb.\\ CCs}} & {\thead{Nb.\\ Nodes}} & {\thead{Nb.\\ Clusters}} & \thead{Density} &\thead{Avg.\\ Deg.}& \thead{Avg.\\ Clus.\\ Coef.}
\\
\midrule
MNHPC & 1 & 92 & 92 & 0.036 & 3 & 0.218 \\
Vss & 2 & 90 & 90 & 0.037 & 2 & 0.194 \\
Vac\_s & 2 & 90 & 90 & 0.037 & 2 & 0.205 \\
Vac\_f & 1 & 92 & 92 & 0.036 & 3 & 0.215 \\
Vac\_g & 1 & 83 & 83 & 0.039 & 3 & 0.215 \\
Vgl\_out & 1 & 92 & 92 & 0.036 & 2 & 0.214 \\
\midrule
Vss & 2 & 90 & 90 & 0.037 & 2 & 0.194 \\
Vac\_s & 2 & 90 & 90 & 0.037 & 2 & 0.205 \\
Vac\_f & 2 & 90 & 90 & 0.037 & 3 & 0.215 \\
Vac\_g & 41& 3 & 3 & 0.667 & 3 & 0.215 \\
Vgl\_out & 2 & 90 & 90 & 0.036 & 2 & 0.214 \\
\midrule
Vss & 10& 70 & 70 & 0.048 & 2 & 0.194 \\
Vac\_s & 8 & 74 & 74 & 0.044 & 2 & 0.205 \\
Vac\_f & 5 & 81 & 81 & 0.040 & 3 & 0.215 \\
Vac\_g & 5 & 81 & 81 & 0.040 & 3 & 0.215 \\
Vgl\_out & 5 & 82 & 82 & 0.038 & 2 & 0.214 \\
\bottomrule
\end{tabular}
\label{tab:chap5-structural-properties}
\begin{tablenotes}\footnotesize
\item[$ \!\! $]\textbf{Notes}: CCs is short for Connected Components, Clus.Coef. means
Clustering Coefficient
\end{tablenotes}
\end{threeparttable}
\end{table}

\listoftables
\end{document} 

enter image description here

  • @David Carlisle: You're right, it's unfair. You answered first for the O.P.'s question, and I only added some improvements to the table – which weren't asked for. – Bernard Dec 19 '14 at 12:06
  • I'm only joking, your answer is way more complete than mine:-) – David Carlisle Dec 19 '14 at 12:15
  • Better stealing a tick than stealing a chick? :o) – Bernard Dec 19 '14 at 12:23
4

the > syntax requires the array package, add

\usepackage{array}

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.