GeneralCan somebody help me with this long tabular?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jgaspard
Posts: 20
Joined: Tue Aug 19, 2008 4:16 pm

Can somebody help me with this long tabular?

Post by jgaspard »

Hi everybody!

I'm a novice in LaTeX and I haven't found the answers I wanted on the Internet..

Here is my problem: I'd like to have this full table on a landscape mode. perhaps should LaTeX split it? I don't know how to do all this. Maybe someone can solve this and I'd be happy to analyze his codes. Thank you very much and let your imagination flow (I guess it should take a few seconds for LaTeX pros.. :lol:)

Here's the table code:

\documentclass[12pt,a4paper]{report}
\usepackage[francais]{babel}
\usepackage[applemac]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lscape}
\pagestyle{plain}
\begin{document}

{\small
\begin{tabular}{@{}llll@{}}
\multicolumn{4}{@{}l@{}}{\textbf{Tableau 1.1.} Système catégoriel}\\
\hline
Variables & Indicateurs & Catégories & Règles de catégorisation \\
\hline
Numéro de l'item\\
\\
Groupe & & Groupe contrôle (0) \\
& & Groupe traitement (1) \\
Nom du quotidien \\
\\
Date de l'item\\
\\
Titre de l'item\\
\\
Sujet & & Economie/Finance de l'Union européenne (1)\\
& & Politique étrangère de l'Union européenne (2) \\
& & Elargissement (3)\\
& & Politique de l'Union européenne (4)\\
& & Evénements de l'Union européenne (5)\\
& & Institutions de l'Union européenne (6)\\
& & Procédures décisionnelles de l'Union européenne (7)\\
& & Comparaisons France/Union Européenne (8)\\
Visibilité & Emplacement en Une &Oui (1)\\
& & Non (0) \\
& Illustration & Aucune (0)\\
& & Photos (1)\\
& & Schéma(s)/Infographie(s) (2)\\
& & Dessin(s)/Image(s)/Caricature(s) (3)\\
& Superficie \\
Type d'article &&Brève (1)\\
&&Filet (2)\\
&&Synthèse (3)\\
&&Reportage (4)\\
&&Portrait (5)\\
&&Interview (6)\\
&&Analyse (7)\\
&&Tribune libre (8)\\
&&Editorial (9)\\
&&Billet (10)\\
Origine de l'article & & Journaliste(s) du quotidien (1)\\
&&Agence(s) de presse et journaliste(s) du quotidien (2)\\
&&Agence(s) de presse (3)\\
&&Autre (4)\\
&&Non spécifié (5)\\
Ton && Négatif (-1)\\
& & Neutre (0) \\
&& Positif (+1)\\
Acteurs & Origine des acteurs & France (1)\\
&&Autre(s) pays de l'Union européenne (2)\\
&&Hors Union européenne (3)\\
& Fonctions des acteurs \\
& Visibilité des acteurs &Président français (1)\\
&&Politiques français (2)\\
&&Personnalité des Institutions de l'Union européenne (3)\\
&&Politiques européens (4) \\
&&Paysage socio-économique européen (5)\\
&&Paysage intellectuel et scientifique européen (6)\\
&&Citoyens ordinaires européens (7) \\
\hline
\end{tabular}}


\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Can somebody help me with this long tabular?

Post by localghost »

You could try to format your table with the help of some packages that extend the capabilities of the table environment.

Code: Select all

\documentclass[12pt,a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[applemac]{inputenc}
\usepackage[francais]{babel}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[centering,includeheadfoot,margin=2cm]{geometry}
\usepackage{array,booktabs,tabularx}

\pagestyle{plain}

\begin{document}

\begin{table}[!p]
\scriptsize
\caption{Système catégoriel}\label{tab:syscat}
\begin{tabularx}{\linewidth}{@{}XXp{6.5cm}X@{}} \toprule
Variables & Indicateurs & Catégories & Règles de catégorisation \\ \midrule
Numéro de l'item \\
\\
Groupe & & Groupe contrôle (0) \\
& & Groupe traitement (1) \\
Nom du quotidien \\
\\
Date de l'item\\
\\
Titre de l'item\\
\\
Sujet & & Economie/Finance de l'Union européenne (1)\\
& & Politique étrangère de l'Union européenne (2) \\
& & Elargissement (3)\\
& & Politique de l'Union européenne (4)\\
& & Evénements de l'Union européenne (5)\\
& & Institutions de l'Union européenne (6)\\
& & Procédures décisionnelles de l'Union européenne (7)\\
& & Comparaisons France/Union Européenne (8)\\
Visibilité & Emplacement en Une &Oui (1)\\
& & Non (0) \\
& Illustration & Aucune (0)\\
& & Photos (1)\\
& & Schéma(s)/Infographie(s) (2)\\
& & Dessin(s)/Image(s)/Caricature(s) (3)\\
& Superficie \\
Type d'article &&Brève (1)\\
&&Filet (2)\\
&&Synthèse (3)\\
&&Reportage (4)\\
&&Portrait (5)\\
&&Interview (6)\\
&&Analyse (7)\\
&&Tribune libre (8)\\
&&Editorial (9)\\
&&Billet (10)\\
Origine de l'article & & Journaliste(s) du quotidien (1)\\
&&Agence(s) de presse et journaliste(s) du quotidien (2)\\
&&Agence(s) de presse (3)\\
&&Autre (4)\\
&&Non spécifié (5)\\
Ton && Négatif (-1)\\
& & Neutre (0) \\
&& Positif (+1)\\
Acteurs & Origine des acteurs & France (1)\\
&&Autre(s) pays de l'Union européenne (2)\\
&&Hors Union européenne (3)\\
& Fonctions des acteurs \\
& Visibilité des acteurs &Président français (1)\\
&&Politiques français (2)\\
&&Personnalité des Institutions de l'Union européenne (3)\\
&&Politiques européens (4) \\
&&Paysage socio-économique européen (5)\\
&&Paysage intellectuel et scientifique européen (6)\\
&&Citoyens ordinaires européens (7) \\ \bottomrule
\end{tabularx}
\end{table}

\end{document}
I used not all the possibilities offered by the packages to adjust the table. Refer to their documentations to learn more. Another solution could be the sidewaystable environment provided by the rotating package. Try out and in case of further questions, feel free to ask.

More information about the used packages and their documentations can be found on CTAN.


Best regards
Thorsten¹
jgaspard
Posts: 20
Joined: Tue Aug 19, 2008 4:16 pm

Re: Can somebody help me with this long tabular?

Post by jgaspard »

Thanks a lot!

Now, what if I wanted the same tabular on A4 paper pages?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Can somebody help me with this long tabular?

Post by localghost »

jgaspard wrote:[...] Now, what if I wanted the same tabular on A4 paper pages?
As you might see in the given code, I already used the a4paper option for the document class. And you originally did so, too. But perhaps I'm understanding something wrong in this question.
jgaspard
Posts: 20
Joined: Tue Aug 19, 2008 4:16 pm

Re: Can somebody help me with this long tabular?

Post by jgaspard »

Ok, sorry, I didn't realize it was A4 paper already. Thanks a lot! Bye
Post Reply