3

For example:

\begin{longtable} { |L{2.75cm}|c|c|c|c| }

If the centered columns are already fixed width, is there anything I can write (where 2.75cm is written) to make the first column have a width such that the table occupies the full width of the page within its margins?

MWE with xltabular instead of longtable (doesn't compile):

\documentclass[12pt, a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{float}
\setlength{\parskip}{1em}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\graphicspath{ {images/} }
\newcommand{\degree}{\ensuremath{^\circ}}
\newcommand{\quotes}[1]{``#1''}
\setlength\parindent{0pt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{imakeidx}
\makeindex[columns=3, title=Alphabetical Index, intoc]
\usepackage[spanish,es-nodecimaldot]{babel}
\usepackage[sorting=none]{biblatex}
\addbibresource{Bibfile.bib}
\DeclareMathOperator\grad{grad}
\DeclareMathOperator\prima{'}
\DeclareMathOperator\sen{sen}
\usepackage{array}
\usepackage{tabularx}
\usepackage{lscape}
\usepackage{caption}
\captionsetup[table]{position=bottom}
\usepackage{booktabs}
\usepackage{mathptmx}
\usepackage[per-mode=symbol]{siunitx}
\usepackage{bm}
\usepackage{amsmath}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{longtable}
\interfootnotelinepenalty=10000
\usepackage[spanish]{minitoc}
\usepackage{hyperref}
\usepackage{siunitx}
\sisetup{group-digits=false}
\usepackage{mathtools, nccmath}
\usepackage[raggedright]{titlesec}
\mathchardef\mhyphen="2D
\usepackage{xltabular}

\title{Tabla 1} \author{-} \date{September 2021}

\begin{document}

\maketitle

\section{Introduction}

\begin{xltabular}{ |X|c|c|c|c| } \caption[Datos del tren de aterrizaje de aviones semejantes.]{\label{tren}} \endlastfoot \hline \multicolumn{5}{|c|}{\textbf{Tren de Aterrizaje}} \ \hline & Proyecto & \vtop{\hbox{\strut \makebox[2.5cm][c]{A319-100}\par }\hbox{\strut \makebox[2.5cm][c]{\cite{A319APM,JanesA319,A319TC,EurocontrolA319}}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{B737-700}\par }\hbox{\strut \makebox[2.5cm][c]{\cite{B737APM,JanesB737,B737TC,EurocontrolB737}}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{A220-300}\par }\hbox{\strut \makebox[2.5cm][c]{\cite{A220APM,JanesA220,A220TC,EurocontrolA220}}\par}} \ \hline Tipo & \vtop{\hbox{\strut \makebox[1cm][c]{Triciclo}\par }\hbox{\strut \makebox[1cm][c]{retráctil}\par}} & \vtop{\hbox{\strut \makebox[1cm][c]{Triciclo}\par }\hbox{\strut \makebox[1cm][c]{retráctil}\par}} & \vtop{\hbox{\strut \makebox[1cm][c]{Triciclo}\par }\hbox{\strut \makebox[1cm][c]{retráctil}\par}} & \vtop{\hbox{\strut \makebox[1cm][c]{Triciclo}\par }\hbox{\strut \makebox[1cm][c]{retráctil}\par}} \ \hline Vía\footnote{La vía $T$ del tren de aterrizaje es la distancia entre el centro de las huellas de los trenes principales. Si son más de dos, tomamos los más alejados del plano de simetría del avión.} $T$ (m) & 6.9338 & 7.59 & 5.72 & 6.73 \ \hline Batalla\footnote{La batalla $B$ del tren de aterrizaje es la distancia longitdinal entre el centro de la huella del tren auxiliar y los centros de las huellas de los trenes principales. Si hay más de dos tomamos los de mayor distancia longitudinal respecto al tren auxiliar.} $B$ (m) & 12.7734 & 11.039 & 12.6 & 14.63 \ \hline Relación $T/B$ & 0.5428 & 0.6869 & 0.4540 & 0.4600 \ \hline Relación $T/b$ & 0.1995 & 0.2226 & 0.1667 & $\sim$ 0.2093 \ \hline Relación $B/{l_f}$ & 0.3653 & 0.3262 & 0.3915 & 0.3781 \ \hline Número de neumáticos por pata\footnote{Para los datos de las patas del tren de aterrizaje, usamos el subíndice $p$ para referirnos a las patas del tren principal, y el subíndice $a$ para referirnos al tren auxiliar.} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$N_p = 2$}\par}\hbox{\strut \makebox[2.5cm][c]{$N_a = 2$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$N_p = 2$}\par}\hbox{\strut \makebox[2.5cm][c]{$N_a = 2$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$N_p = 2$}\par}\hbox{\strut \makebox[2.5cm][c]{$N_a = 2$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$N_p = 2$}\par}\hbox{\strut \makebox[2.5cm][c]{$N_a = 2$}\par}} \ \hline Denominación del neumático & \vtop{\hbox{\strut \makebox[3.25cm][c]{Pr: H42x16-19}\par}\hbox{\strut \makebox[3.25cm][c]{Aux: 25.75x6.75-14}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{Pr: 46x16-20}\par}\hbox{\strut \makebox[2.5cm][c]{Aux: 30x8.8-15}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{Pr: 43.5x16-21}\par}\hbox{\strut \makebox[2.5cm][c]{Aux: 27x7.7-15}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{Pr: 42x15-21}\par}\hbox{\strut \makebox[2.5cm][c]{Aux: 27x8.5-12}\par}} \ \hline Diámetro (m) & \vtop{\hbox{\strut \makebox[2.5cm][c]{$D_p = 1.0668$}\par}\hbox{\strut \makebox[2.5cm][c]{$D_a = 0.6541$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$D_p = 1.1784$}\par}\hbox{\strut \makebox[2.5cm][c]{$D_a = 0.762$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$D_p = 1.1049$}\par}\hbox{\strut \makebox[2.5cm][c]{$D_a = 0.6858$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$D_p = 1.0668$}\par}\hbox{\strut \makebox[2.5cm][c]{$D_a = 0.6858$}\par}} \ \hline Ancho (m) & \vtop{\hbox{\strut \makebox[2.5cm][c]{$b_p = 0.4064$}\par}\hbox{\strut \makebox[2.5cm][c]{$b_a = 0.1715$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$b_p = 0.4064$}\par}\hbox{\strut \makebox[2.5cm][c]{$b_a = 0.2235$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$b_p = 0.4064$}\par}\hbox{\strut \makebox[2.5cm][c]{$b_a = 0.1956$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$b_p = 0.381$}\par}\hbox{\strut \makebox[2.5cm][c]{$b_a = 0.2159$}\par}} \ \hline Presión de inflado (MPa) & \vtop{\hbox{\strut \makebox[2.5cm][c]{$p_p = 1.31$}\par}\hbox{\strut \makebox[2.5cm][c]{$p_a = 1.372$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$p_p = 1.19$}\par}\hbox{\strut \makebox[2.5cm][c]{$p_a = 1.14$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$p_p =$ 1.36 - 1.41}\par}\hbox{\strut \makebox[2.5cm][c]{$p_a = 1.42$}\par}} & \vtop{\hbox{\strut \makebox[2.5cm][c]{$p_p = 1.47$}\par}\hbox{\strut \makebox[2.5cm][c]{$p_a = 1$}\par}} \ \hline \end{xltabular}

\printbibliography \end{document}

1 Answers1

4

The xltabular environment takes two required arguments: the intended width, and the set of column specifications. Your code is omitting the first of the two required arguments.

Also, if you don't have \parindent0pt, don't forget to insert \noindent immediately before \begin{tabularx}{\textwidth}{...}.

Mico
  • 506,678