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 trying to create some beautoful tables with LaTex, but it's kind of hard.

How can I change the font size of only some words within a table cell?

\begin{tabularx}{\linewidth}{lX}
text:&this is a text, and I only want two or three words to be smaller than the rest in THIS table cell!\\[1ex]
\end{tabularx}

Is it possible to change, for example for the words "this is a text" the font size to small?

{\small this is a text} doesn't work.

share|improve this question
add comment

migrated from stackoverflow.com Nov 23 '12 at 12:40

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

The following shows how to use \small, or \tiny to obtain smaller text:

enter image description here

Code:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularx}

\begin{document}
\begin{tabularx}{\linewidth}{lX}
    text:&this is a text, and I only want two or three words to be 
    smaller than the rest in THIS table cell!
    {\color{blue}\small this is small text} and {\color{red}\tiny this is tiny text}\\[1ex]
\end{tabularx}
\end{document}
share|improve this answer
    
thank you very much! –  Marco7757 Nov 25 '12 at 12:32
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.