我正在尝试用 LaTex 创建一些漂亮的表格,但这有点难。
如何更改字体大小一些表格单元格内有单词?
\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}
是否可以将字体大小(例如“这是一个文本”)改为小?
{\small this is a text}
不起作用。
答案1
下面展示了如何使用\small
或\tiny
来获取较小的文本:
代码:
\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}