Graphics, Figures & TablesUsing »p« Column Type in Table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kruftin
Posts: 7
Joined: Tue Apr 17, 2012 6:16 am

Using »p« Column Type in Table

Post by kruftin »

Dear users help me please. How i can apply bold face font and align in column of table? E. g. if I use \begin{tabular}{|p{.3\linewidth}|p{.3\linewidth}|p{.3\linewidth}|}

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Using »p« Column Type in Table

Post by Stefan Kottwitz »

Hi,

use the array package and the >{\command} feature of array, for executing commands before a column. For example:

Code: Select all

\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{|>{\centering\bfseries}p{.3\linewidth}|p{.3\linewidth}|p{.3\linewidth}|}
text & text
\end{tabular}
\end{document}
Stefan
LaTeX.org admin
kruftin
Posts: 7
Joined: Tue Apr 17, 2012 6:16 am

Re: Using »p« Column Type in Table

Post by kruftin »

But if i want apply command for row, how it's make? For string in all table?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Using »p« Column Type in Table

Post by localghost »

kruftin wrote:But if i want apply command for row, how it's make? For string in all table?
TeX Frequently Asked Questions – How to change a whole row of a table


Thorsten
Post Reply