# Changing font size inside table [duplicate]

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage[hang,perpage,symbol*]{footmisc}
\usepackage{array}
\usepackage{enumitem}
\usepackage{scrextend}
\usepackage{url}
\title{}
\author{}
\date{}
\begin{document}
\maketitle
\begin{tabular}{>{\hskip -40pt$}c<{$\hskip -10pt}@{\ --\ \hskip 15pt }l}
test & test \\[10pt]
f(x) = O(g(x)) & $|f(x)| \leq A|g(x)|$ for some constant $A$, and all values $x>x_0$ for some $x_0$. \\[10pt]
\end{tabular}
\end{document}


I want the f(x)... to have tiny font size but \tiny does not work

## marked as duplicate by Arun Debray, Mike Renfro, Jesse, Zarko, Joseph Wright♦Jan 17 '16 at 9:53

• Can you explain what you are trying to achieve? I suspect there are better ways to do this than making the font smaller, but I'm not sure what you're trying to do. Your table >{...} specifications are really not something you should be doing. – Alan Munn Jan 17 '16 at 2:56
• And you don't show where you've tried to use \tiny (which is really a size for text fonts rather than maths). – cfr Jan 17 '16 at 3:06

The instruction \tiny is a text-mode command. To get the equivalent effect in math mode, use \scriptscriptstyle.

A separate matter: You should probably be using a tabularx environment instead of a tabular environment, so that the material in the right-hand column can "wrap" across more than one row.

\documentclass[a4paper,12pt]{article}
\usepackage{tabularx}  %for "X" column type
\usepackage{mathtools} %for "\DeclarePairedDelimiter" macro
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % absolute value "fences"
\begin{document}

\noindent
\begin{tabularx}{\textwidth}{@{} >{$}c<{$} X @{}}
\text{test} & test \\[10pt]
\scriptscriptstyle f(x) = O(g(x)) &
$\abs{f(x)} \leq A\abs{g(x)}$ for some constant $A$ and for all values $x>x_0$ for some $x_0$. \\
\end{tabularx}
\end{document}