Graphics, Figures & TablesScale longtable to text widh

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Kam49
Posts: 1
Joined: Fri Dec 04, 2020 2:15 pm

Scale longtable to text widh

Post by Kam49 »

Hello guys,
I'm writing my graduation thesis and I want to draw a table in latex. The matter is that my table is so long so I want it to be in many pages. Therefore I use longtable. I got a problem in my code when I use
\resizebox{\textwidth}{!}{
Here is my code :

Code: Select all

\renewcommand{\arraystretch}{1.5}
	\resizebox{\textwidth}{!}{%
	\begin{longtable}{|l|l|l|l|l|l|l|l|l|}
		\caption{Processus de gestion des concours}
		\label{tab : Processus de gestion des concours}\\
		\hline
		\multicolumn{9}{|l|}{\begin{tabular}[c]{@{}l@{}}Sommaires des étapes\\ 1. Préparatif des Concours ;\\ 2. Organisation des Concours.\end{tabular}} \\ \hline
		\endfirsthead
		%
		\endhead
		%
		\multirow{2}{*}{N\degres} &
		\multirow{2}{*}{Etapes} &
		\multirow{2}{*}{Acteur} &
		\multirow{2}{*}{Période} &
		\multirow{2}{*}{\begin{tabular}[c]{@{}l@{}}Support/fait \\ générateur de la tâche\end{tabular}} &
		\multirow{2}{*}{Tâche à exécuter} &
		\multirow{2}{*}{\begin{tabular}[c]{@{}l@{}}Formulaire \\ de support\end{tabular}} &
		\multicolumn{2}{l|}{Etape} \\ \cline{8-9} 
		&
		&
		&
		&
		&
		&
		&
		Pré &
		Post \\ \hline
		&
		\multicolumn{5}{l|}{Sous phase 1 : Préparatif des Concours} &
		&
		&
		\\ \hline
		E1 &
		\begin{tabular}[c]{@{}l@{}}Ouverture \\ et modalité\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Institution de \\ formation et \\ ONECS\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Un mois avant\\ le test\end{tabular} &
		Modalité du concours &
		\begin{tabular}[c]{@{}l@{}}Les modalités des concours\\ sont fixées par arrêtés du \\ MESRI sur proposition du DG\\ De l'ONECS et celui de \\ l'Institution demandeur\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		Début &
		E2 \\ \hline
		E2 &
		Fixation des filières &
		\begin{tabular}[c]{@{}l@{}}Institution de \\ formation et \\ ONECS\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Un mois avant\\ le test\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}les filières sont fixées en\\ tenant compte de statut\\ de l'institution\\ demandeur\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Réunir tous les avis relatifs aux filières\\ existant et à la création des nouvelles\\ filières ;\\ Statuer sur les filières à retenir pour l'année\\ Faire sortir un arrêté MESRI fixant les\\ filières pour l'année en cours\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté fixant\\ les séries de\\ l'année\end{tabular} &
		E1 &
		E3 \\ \hline
		E3 &
		\begin{tabular}[c]{@{}l@{}}Fixation de la liste\\ des matières de\\ chaque filière, de\\ leurs durées et\\ coefficients pour\\ chacune des\\ sessions\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Institution de\\ formation et\\ ONECS\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}un mois avant\\ le test\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}la création de nouvelle\\ filière et les listes de\\ matière doit ressortir sur\\ dans l'arrêté portant\\ modalité dudit concours\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Avant le test, les matières sont fixées par un\\ arrêté du MESRI sur proposition du DG de\\ l'ONECS et de l'institution demandeur en\\ tenant en compte le statut dudit institution.\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E2 &
		E4 \\ \hline
		E4 &
		\begin{tabular}[c]{@{}l@{}}Fixation des\\ conditions\\ d’inscriptions\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Institution de\\ formation et\\ ONECS\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}deux mois\\ avant l'examen\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Les conditions des\\ inscriptions doit ressortir\\ dans l'arrêté portant\\ modalité dudit concours\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Les candidats sont inscrits selon la série du\\ bac et la filière demandée\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté fixant\\ MESRI\end{tabular} &
		E3 &
		E5 \\ \hline
		E5 &
		\begin{tabular}[c]{@{}l@{}}Fixation des\\ centres d’examens\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Institution de\\ formation et\\ ONECS\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}deux mois\\ avant l'examen\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Voir les conditions de\\ création des centres\end{tabular} &
		tenir en compte la distance et les effectifs. &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E4 &
		E6 \\ \hline
		E6 &
		\begin{tabular}[c]{@{}l@{}}Inscription des\\ candidats\end{tabular} &
		ONECS &
		\begin{tabular}[c]{@{}l@{}}deux mois\\ avant l'examen\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Identification des\\ candidats par filière\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}informations démographiques et\\ académique\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Circulaire du\\ DG ONECS\end{tabular} &
		E5 &
		E7 \\ \hline
		E7 &
		Proposition des sujets &
		DEC &
		\begin{tabular}[c]{@{}l@{}}un mois avant\\ le test\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Les sujets sont choisis\\ parmi les sujets de niveau\\ de terminal\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}les sujets sont choisis parmi les sujets de\\ classe de terminal pour les externes et\\ supérieur ou professionnel pour les internes\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Circulaire du\\ DG ONECS\end{tabular} &
		E6 &
		Fin \\ \hline
		&
		\multicolumn{5}{l|}{Sous Phase 2. Organisation des Concours} &
		&
		&
		\\ \hline
		E1 &
		\begin{tabular}[c]{@{}l@{}}Mise en place du\\ jury de\\ baccalauréat ;\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}proposition\\ ONECS\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}un mois avant\\ le test\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Proposition du DG de\\ l'ONECS\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Pour être Président du jury, il faut être un\\ enseignant de grade A, avoir une bonne\\ moralité ; appartenir à un établissement\\ d'enseignement supérieur public.\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ conjointe\end{tabular} &
		Debut &
		E2 \\ \hline
		E2 &
		Choix des sujets ; &
		\begin{tabular}[c]{@{}l@{}}Président du\\ jury et DEC\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}un mois avant\\ l'examen\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}une équipe très restreinte\\ dirigé par le Président du\\ jury\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}tous les sujets proposés seront mises à la\\ disposition du Président du jury et son\\ équipe restreinte\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E1 &
		E3 \\ \hline
		E3 &
		\begin{tabular}[c]{@{}l@{}}Saisie et tirage des\\ sujets ;\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}président du\\ jury et DEC\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}un mois avant\\ l'examen\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}une équipe très restreinte\\ dirigé par le Président du\\ jury\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}une fois les sujets choisies, l'équipe\\ restreinte saisie, fait la mise en forme et\\ procède au tirage.\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E2 &
		E4 \\ \hline
		E4 &
		\begin{tabular}[c]{@{}l@{}}Acheminement des\\ Présidents des\\ Centres ;\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}président du\\ jury et DEC\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}48 heures avant\\ le démarrage\\ du test\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}sur convocation du\\ DEC/PJ\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}les présidents des centres sont acheminés\\ dans leur centre respectif 2 jour avant le\\ démarrage du test\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E3 &
		E5 \\ \hline
		E5 &
		\begin{tabular}[c]{@{}l@{}}Déroulement des\\ épreuves ;\end{tabular} &
		Jury &
		\begin{tabular}[c]{@{}l@{}}selon la date\\ fixée\end{tabular} &
		respect du calendrier &
		\begin{tabular}[c]{@{}l@{}}le déroulement se fait au même moment\\ sur toute l'étendue du territoire en\\ respectant le calendrier\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E4 &
		E6 \\ \hline
		E6 &
		Corrections &
		Les correcteurs &
		\begin{tabular}[c]{@{}l@{}}au plus 48h après\\ les épreuves\\ écrites\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Corrigé les épreuves\\ avant la correction des\\ copies\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Les correcteurs son choisi parmi les\\ enseignants de la discipline qui enseignent\\ dans les établissements secondaires pour les\\ externes et du supérieur pour les internes.\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Décision du\\ DG ONECS\end{tabular} &
		E5 &
		E7 \\ \hline
		E7 &
		\begin{tabular}[c]{@{}l@{}}Travaux du\\ secrétariat\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}les membres\\ du jury et\\ secrétariat\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}pendant et\\ après la\\ correction\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Le secrétariat prépare et\\ traite les copies\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Le secrétariat prépare les copies avant de\\ soumettre pour la correction et le\\ traitement après la correction\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E6 &
		E8 \\ \hline
		E8 &
		Délibération &
		\begin{tabular}[c]{@{}l@{}}les membres\\ du jury\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}après les\\ travaux du\\ secrétariat\end{tabular} &
		Le Jury délibère &
		\begin{tabular}[c]{@{}l@{}}Après le travail du secrétariat, le jury se\\ réunit sur convocation de son Président et\\ procède à la délibération\end{tabular} &
		\begin{tabular}[c]{@{}l@{}}Arrêté\\ MESRI\end{tabular} &
		E7 &
		Fin \\ \hline
	\end{longtable}}
In my code, i have used also this packages : multirow, graphicx and longtable.

I know that the use of resize is not good so if someone can help to use it normally, it'll help me. Thanks for helping

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Scale longtable to text widh

Post by kaiserkarl13 »

I don't know off the top of my head how to do this with longtable, but supertabular has a supertabular* environment that allows you to adjust the column widths the same way tabular* does.
Post Reply