Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing an small table with 6 rows and 4 columns. Last column is a description, so the text is in some rows wider than the wide of the page. So I need it to be written en more than one line of text.

How can I do this?

My code until now is the following:

\begin{table}[t]
\centering
\begin{tabular}{|c |c |c| c|}
\hline
Nº pin & Nombre & E/S & Descripción\\
\hline
1 & RXD 2 & E & Entrada del puerto UART asíncrono. Tiene una resistencia interna del pull high de 75 k$\Omega$ \\
\hline
2 & TXD & S & Salida del puerto UART asíncrono\\
\hline
3 & GND & - & Masa\\
\hline
4 & VDD & E & Alimentación principal\\
\hline
5 & VDD\_B & E & Alimentación de respaldo\\
\hline
6 & PPS & S & Salida de un pulso por segundo\\
\hline
\end{tabular}
\caption{Descripción de los pines del módulo GPS UP501}
\label{gpspintable}
\end{table}
share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

You can use the p{<length>} column type for columns of type "paragraph": I took the liberty to make some modifications to your table (of couse, those are only suggestions): I suppressed the vertical rules and used the features provided by the booktabs package:

\documentclass{article}
\usepackage{booktabs}

\begin{document}

\begin{table}
\centering
\begin{tabular}{@{}cccp{8cm}@{}}
\toprule
Nº pin & Nombre & E/S & Descripci\'on \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(l){4-4}
1 & RXD 2 & E & Entrada del puerto UART asíncrono. Tiene una resistencia interna del pull high de 75 k$\Omega$ \\
2 & TXD & S & Salida del puerto UART asíncrono\\
3 & GND & - & Masa\\
4 & VDD & E & Alimentación principal\\
5 & VDD\_B & E & Alimentación de respaldo\\
6 & PPS & S & Salida de un pulso por segundo\\
\bottomrule
\end{tabular}
\caption{Descripción de los pines del módulo GPS UP501}
\label{gpspintable}
\end{table}

\end{document}

enter image description here

share|improve this answer
    
Thanks! I like how it looks, and of course this solves my problem :) –  Roman Rdgz Nov 30 '11 at 0:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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