5

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}

1 Answer 1

10

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

1
  • Thanks! I like how it looks, and of course this solves my problem :)
    – Roman Rdgz
    Commented Nov 30, 2011 at 0:03

You must log in to answer this question.

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