Graphics, Figures & Tablestabularx cells stretching vertically

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

tabularx cells stretching vertically

Post by Fibonacci »

Hello.

I'm trying to use tabularx, but have found a problem:

Code: Select all

\usepackage{tabularx}
...
\begin{tabularx}{1in}{Xl}
Ñu & Gnu
\end{tabularx}
The left cell stretches vertically to two lines' height, and its text appears on the bottom one, when it contains an uppercase accented letter. How do I prevent that?

Thanks in advance.
Last edited by Fibonacci on Tue Mar 08, 2011 10:38 pm, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tabularx cells stretching vertically

Post by localghost »

Instead of a useless code snippet you should better provide a minimal example that clearly reproduces the undesired behaviour.


Thorsten
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

tabularx cells stretching vertically

Post by Fibonacci »

Code: Select all

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{1in}{Xl}
Ñu & Gnu
\end{tabularx}
\end{document}
Also:

Code: Select all

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{1in}{Xl}
\~Nu & Gnu
\end{tabularx}
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tabularx cells stretching vertically

Post by localghost »

For a European language like Spanish you should enable the right font encoding [1].

Code: Select all

\documentclass[11pt,a4paper,spanish]{article}
\usepackage[T1]{fontenc}     % enable »Cork Encoding«
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{tabularx}

\begin{document}
  \begin{tabularx}{1in}{Xl}\hline
    Ñu & Gnu\\\hline
  \end{tabularx}
\end{document}
[1] Cork encoding — Wikipedia, the free encyclopedia
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Re: tabularx cells stretching vertically

Post by Fibonacci »

That did it, thank you.
Post Reply