1

I noticed that the tabularx environment affects my titlepage's layout. My titlepage looks as intended when using

\documentclass[12pt]{scrartcl}
\usepackage{ltablex}
\begin{document}
\begin{titlepage}
    \vspace*{5cm}{\fontsize{21}{21}\selectfont\bfseries Title\par}
    \vspace*{5mm}{\fontsize{17}{17}\selectfont\bfseries Subtitle\par\vspace{5mm}}
    Foo
    \hrule height0pt depth0pt width1pc
    \vspace*{\fill}
    \begin{tabular}{l}
    \end{tabular}
    %\begin{tabularx}{\linewidth}{l}
    %\end{tabularx}
    Bar
    \end{titlepage}
\end{document}

but when I use the tabularx environment instead of the tabular, the vertical filling space is not inserted and the text "Bar" is put directly below "Foo".

Good: enter image description here Bad: enter image description here

Before starting to play with minipages, I ask myself what happened here and if there might be a simple way to change this behaviour.

1
  • 1
    This question with a similar issue with longtable is related. ltablex redefines tabularx in order to make it similar to longtable. A very bad idea, in my opinion. (I mean redefining tabularx instead of providing a new environment with a different name.)
    – campa
    Commented Aug 27, 2018 at 13:02

1 Answer 1

1

Use \vfill and nest tabularx in a minipage:

\documentclass[12pt]{scrartcl}
\usepackage{ltablex}

\begin{document}

\begin{titlepage}
    \vspace*{5cm}{\fontsize{21}{21}\selectfont\bfseries Title\par}
    \vspace*{5mm}{\fontsize{17}{17}\selectfont\bfseries Subtitle\par\vspace{5mm}}
    Foo
    \hrule height0pt depth0pt width1pc
\vfill
\begin{minipage}{\linewidth}
\begin{tabularx}{\linewidth}{X}
\end{tabularx}
\end{minipage}
    Bar
    \end{titlepage}

\end{document} 

enter image description here

You must log in to answer this question.

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