1

I don't understand with when using ltablex tabularx do not spread the width pass in argument :

code without ltablex :

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage{array}
%\usepackage{ltablex}
\usepackage{tabularx}

\begin{document}

\noindent
\rule{\linewidth}{6pt}
\\
\\
\noindent
\begin{tabularx}{\linewidth}{X|X|X}
  Date & Version & Description \\ \hline
  07/01/2016 & 0.1 & Init \\
  07/01/2016 & 0.2 & test \\
\end{tabularx}

\end{document}

result :

enter image description here

code with ltablex :

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage{array}
\usepackage{ltablex}
\usepackage{tabularx}

\begin{document}

\noindent
\rule{\linewidth}{6pt}
\\
\\
\noindent
\begin{tabularx}{\linewidth}{X|X|X}
  Date & Version & Description \\ \hline
  07/01/2016 & 0.1 & Init \\
  07/01/2016 & 0.2 & test \\
\end{tabularx}

\end{document}

result :

enter image description here

1 Answer 1

4

ltablex redefines tabularx in lots of ways one is that, by default it turns X columns into l columns for small tables. It probably shouldn't do that but it does, it has a command to turn that off. texdoc ltablex page 1: \keepXColumns

That said, while automatically changing X is probably unfortunate I would not use tabularx for a table that does not have paragraphs of text, it is designed to adjust the width for linebreaking within columns so doesn't really do anything very useful for tables with single-line data.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .