2

I am trying to do a table in latex. My problem is I cannot to a multirow for "Apprentissage" cell between the 3 cell : "phrase", "mot" and "vocabulaire"

\begin{figure}
\centering
\begin{tabular}{|c|c|c|c|c|}
 \hline
 \multicolumn{2}{|c|}{Corpus} & Français & Anglais & Allemand   \\ \hline
\multirow{3}{*}{Apprentissage} & phrases & \multicolumn{3}{c|}{600.000} \\ \hline
&   Mot & ? & ? & ? \\ \hline
& Vocabulaire & ? & ? & ? \\
\hline
\end{tabular}
\caption{Caractéristique du corpus \textsc{Europarl}}
\label{fig:typeDistribution}
\end{figure}

Any idea please?

3

Use \cline{n-m} instead of \hline.

 \begin{figure}
 \centering
 \begin{tabular}{|c|c|c|c|c|}
  \hline
  \multicolumn{2}{|c|}{Corpus} & Français & Anglais & Allemand   \\ \hline
 \multirow{3}{*}{Apprentissage} & phrases & \multicolumn{3}{c|}{600.000} \\ \cline{2-5}
 &   Mot & ? & ? & ? \\ \cline{2-5}
 & Vocabulaire & ? & ? & ? \\
 \hline
 \end{tabular}
 \caption{Caractéristique du corpus \textsc{Europarl}}
 \label{fig:typeDistribution}
 \end{figure}
2

Multirow doesn't override \hline. Instead of them, you should use \cline:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{multirow}

\begin{document}
\begin{figure}
    \centering
\begin{tabular}{|c|c|c|c|c|}
    \hline
\multicolumn{2}{|c|}{Corpus}    & Français  & Anglais   & Allemand   \\ \hline
\multirow{3}{*}{Apprentissage}  & phrases   & \multicolumn{3}{c|}{600.000}  \\ \cline{2-5}
                                & Mot & ? & ? & ?                           \\ \cline{2-5}
                                & Vocabulaire & ? & ? & ?                   \\ \hline
\end{tabular}
\caption{Caractéristique du corpus \textsc{Europarl}}
\label{fig:typeDistribution}
\end{figure}
\end{document}

enter image description here

  • 1
    Your "français" is missing the ç. :P – Alenanno May 17 '15 at 17:59
  • I see. Since I need to construct MWE myself, I didn't pay attention on French langue, i.e. adequate font coding ... I will try to correct this. – Zarko May 17 '15 at 18:13
  • 1
    I think adding \usepackage[utf8]{inputenc} should be enough! :) – Alenanno May 17 '15 at 18:15
  • Yes, it is. Anyway I also added \usepackage[T1]{fontenc}. To be MWE more complete :-). Can you me tell, how you highlight latex code in your comment. I like to do on the same way, but for now I unsuccessfully search how to do this ... – Zarko May 17 '15 at 18:17
  • You need to use back ticks, like ``. Add the word(s) in the middle. – Alenanno May 17 '15 at 18:22

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.