General[help] how can I create a special cell like this?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
umb365
Posts: 6
Joined: Sat Jun 28, 2008 3:19 am

[help] how can I create a special cell like this?

Post by umb365 »

how can I create a special cell like this?

Hi all.
I meet a problem:
I wanna create a sheet, one of the cell shoule look like this:
------------
|Population|
|.....of.....|
|.the.city..|
------------

The words are centered and wrapped under my control.

but, when I use "tabular*" or "tabularx":

\begin{tabular*}{250pt}{|p{10ex}|}
\hline
Population of the city \\
\hline
\end{tabular*}

the cell looks like this:
------------
|Population|
|of the.....|
|city........|
------------

Question:
What can I do? Is there any other package can resolve the issues?

Thanks in the advanced.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

umb365
Posts: 6
Joined: Sat Jun 28, 2008 3:19 am

Re: [help] how can I create a special cell like this?

Post by umb365 »

dots (".") in the cell mean the blank char.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

[help] how can I create a special cell like this?

Post by gmedina »

Hi umb365,

you can use p{length} or m{length} along with the \centering command. Please refer to the documentation of the array package for further information:

Code: Select all

\documentclass{article}
\usepackage{array}

\begin{document}

\begin{tabular}{|>{\centering\arraybackslash}p{1.7cm}p{3cm}|}
  Population of\\ the city & some text \\
\end{tabular}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
umb365
Posts: 6
Joined: Sat Jun 28, 2008 3:19 am

Re: [help] how can I create a special cell like this?

Post by umb365 »

Thank you. I will read the article first.
Post Reply