更改表格内的字体大小

更改表格内的字体大小
\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}

我希望 f(x)... 有很小的字体大小,但 \tiny 不起作用

答案1

该指令\tiny是文本模式命令。要在数学模式下获得等效效果,请使用\scriptscriptstyle

另一件事:您可能应该使用tabularx环境而不是tabular环境,以便右侧列中的材料可以“包裹”在多行上。

在此处输入图片描述

\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}

相关内容