1

Trying to introduce a ratio between the X-column types of tabularx not 1:1. I now encountered the problem that my third column type p{11ex} is no longer accepted. I don't know why.

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{tabularx}

\begin{document}
\begin{tabularx}{\textwidth}{{>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}X}p{11ex}}
the quick brown fox jumped & over the lazy dog a few times to pad & out the sentence \\
\end{tabularx}
\end{document}
  • 2
    You have braces that don't belong there. Remove the brace { before the first > and the } after the second X. – egreg Jul 27 '13 at 20:56
2

Thank you! What a small error...

The solution is:

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{tabularx}

\begin{document}
\begin{tabularx}{\textwidth}{>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}Xp{11ex}}
the quick brown fox jumped & over the lazy dog a few times to pad & out the sentence \\
\end{tabularx}
\end{document}
| improve this answer | |
1

Package tabu makes setting widths of X columns much easier.

\usepackage{tabu}

and

\begin{tabu}[X[2] X X]

Will make the first column twice as large, etc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.