3

I'm trying to make a large table with latex, but I have a problem with text inside it, it depasses, the page.

here the code :

 \begin{table*} \centering
 \begin{tabular*}{\textwidth}{@{\extracolsep{\stretch{2}}}*{2}{l}@{}}  
 \toprule
 Source & La commission de contrôle procède à une véritable évaluation  des   conséqu-   \\  & ences sur l'investissement public.\\
 \hline
     Cible & The control commitee carries out a true evaluation of the  impact on public  \\  & investment. \\ \hline  Référence  & The
 control commitee carries out a true evaluation of the impact on gove- 
 \\ & rnment investment. \\ \hline

 %\textsc{Trig-seq}${_{m-n}}_{sel}$ & it must take into account the
 fact that insurance companies \textbf{need} \\ & \textbf{of of} some
 time.  \\ \hline ${Trig_{m-n}}_{(k)} + ML$    &  The control commitee
 carries out a true assessment of the impact on pu- \\  & blic
 investment \\ \hline  ${Trig_{m-n}}_{(k)}$ &  The control commitee
 process to a true assessment of the impact on pu- \\  & blic
 investment \\ \hline   ${Trig_{m-n}}_{(sel)} + ML$  & The control
 commitee procède to a true evaluation of the conséquences on   \\ &
 public investment.  \\ \hline         ${Trig_{m-n}}_{(sel)}$  & The
 control commitee procède to a correct evaluation of the conséquences  
 \\ & on government investment.  \\ \hline                     \toprule
 \end{tabular*}  \caption{Exemple de traductions d'une phrase issue du
 corpus \textsc{Europarl} avec les différents modèles de
 traduction\label{exemple}} \end{table*}

Here attached the image of the resulting tableenter image description here

Any idea to help me please?

Cheers

1
  • Welcome to SE! Please, can you remove > on beginning lines of your code? – Zarko Feb 6 '16 at 19:32
1

Use a tabularx:

\documentclass[a4paper,french]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[showframe]{geometry} 
\usepackage{babel} 
\usepackage{tabularx,booktabs}
\begin{document}

\begin{table}[!htb]
\begin{tabularx}{\textwidth}{@{}l X @{}}  \toprule
Source & La commission de contrôle procède à une véritable évaluation  des   
conséquences sur l'investissement public.\\\hline
Cible & The control commitee carries out a true evaluation of the  impact on public 
investment. \\ \hline  
Référence  & The control commitee carries out a true evaluation of the impact on 
government investment. \\ \hline

\textsc{Trig-seq}${_{m-n}}_{sel}$ & it must take into account the
fact that insurance companies \textbf{need} \textbf{of of} some time.  \\ \hline 
${Trig_{m-n}}_{(k)} + ML$    &  The control commitee
carries out a true assessment of the impact on public investment \\ \hline  
${Trig_{m-n}}_{(k)}$ &  The control commitee
process to a true assessment of the impact on public investment \\ \hline   
${Trig_{m-n}}_{(sel)} + ML$  & The control commitee procède to a true evaluation of 
the conséquences on public investment.  \\ \hline         
${Trig_{m-n}}_{(sel)}$  & The control commitee procède to a correct evaluation 
of the conséquences  on government investment.  \\ \bottomrule
\end{tabularx}  
\caption{Exemple de traductions d'une phrase issue du
  corpus \textsc{Europarl} avec les différents modèles detraduction\label{exemple}} 
\end{table}

\end{document}

enter image description here

1

For automatic lines break you need to use adequate column type. For example p{<width>} or X, if you use tabularx environment (which I prefer):

\documentclass{article}
    \usepackage{booktabs,tabularx}
    \usepackage[utf8]{inputenc}

    \usepackage[showframe]{geometry}


\begin{document}
    \begin{table}
    \begin{tabularx}{\textwidth}{lX}
    \toprule
Source      &   La commission de contrôle procède à une véritable 
                évaluation des conséqu ences sur l'investissement public.\\
    \hline
Cible       &   The control commitee carries out a true evaluation of the  
            impact on public   investment. \\
    \hline  
Référence   &   The control commitee carries out a true evaluation 
                of the impact on government investment. \\ 
    \hline
    \end{tabularx}  
\caption{Exemple de traductions d'une phrase issue du corpus \textsc{Europarl} avec les différents modèles de traduction} 
    \label{exemple}
    \end{table}
\end{document}

This gives:

enter image description here

0

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.