1

I'm working on a presentation and I would like to type a table. The problem is that I know how to do a table but not this kind of table. I would like to do a table that really looks like this one at the headlin e " Comparatif technique " without pictures( it is not presented the same way in English )

When I try to do it, when I want to fill in the block it extends to the other columns and then my table goes out of my page from the right. I would like it goes to the line so each column are not too large so that the whole table appears. Sorry for my mistakes in english.

Atmos
  • 147

3 Answers3

3

Something like the following? The code employs a tabularx environment and columns of (modified) type X, which allow automatic line-breaking.

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[a4paper,margin=2.5cm]{geometry}

\usepackage{tabularx,ragged2e}
\newcolumntype{L}{>{\RaggedRight\arraybackslash\hspace{0pt}}X}
% The '\hspace{0pt}' part is a well-known trick to get around TeX's
% inability to hyphenate the very first word of a (logical) paragraph.

\begin{document}   
\begin{table}
% 1st column: type 'l'; next 7 columns: type 'L'
\begin{tabularx}{\textwidth}{|l|*{7}{L|}}
\hline
Avion de chasse & furtivité & supercroisière & 
super-manœu-vrabilité & vol à haute altitude & 
liaisons de données tactique & fusion des données & 
Génération selon les classements \\
\hline
 & & & & & & & \\
\hline
\end{tabularx}
\end{table}
\end{document}
Mico
  • 506,678
0
\documentclass{article}
\oddsidemargin = 0.25cm
\begin{document}   
\begin{table}[h]
% 1st column: type 'l'; next 7 columns: type 'L'
\begin{tabular}{|p{1.5cm}|p{1.5cm}|p{2cm}|p{1.5cm}|p{1.5cm}|p{2cm}|p{2cm}|p{2cm}|}\hline
&&&&&&&\\
Avion de chasse & furtivité & supercroisière & 
super-manœu-vrabilité & vol à haute altitude & 
liaisons de données tactique & fusion des données & 
Génération selon les classements \\
&&&&&&&\\
\hline
 & & & & & & & \\
\hline
\end{tabular}
\end{table}
\end{document}

I have removed all packages and adjusted the table. I hope that you like it.

Vincent
  • 20,157
0
\documentclass{article}
\oddsidemargin = 0.25cm
\begin{document}   
\begin{table}[h]
% 1st column: type 'l'; next 7 columns: type 'L'
\begin{tabular}{|p{1.25cm}|p{1.5cm}|p{2cm}|p{1.25cm}|p{1.25cm}|p{1.5cm}|p{1.5cm}|p{2cm}|}\hline
&&&&&&&\\
Avion de chasse & furtivité & supercroisière & 
super-manœu-vrabilité & vol à haute altitude & 
liaisons de données tactique & fusion des données & 
Génération selon les classements \\
&&&&&&&\\
\hline
 & & & & & & & \\
\hline
\end{tabular}
\end{table}
\end{document}

I have changed the column sizes. It is reduced by 2 cm. I hope it fits the page size you have selected.

Zarko
  • 296,517
  • 1
    Your table is wider than text width. Added empty rows before and after column headers doesn't make them nicer, column headers are poorly formatted ... (my opinion). Comments before table doesn't has any relation to your table design, etc – Zarko Apr 20 '20 at 09:41