在图形环境中更改字体大小

在图形环境中更改字体大小

我正在写一篇类似论文的文档,我在 TikZ 中制作了草图/图形,在 gnuplot 中使用 epslatex 终端制作了图表/图形。在 gnuplot 手册中,它说如果未指定字体,它将从文档中的上下文中继承字体和大小。我不确定 TikZ 是如何做到的。

我想缩小图中文本的字体大小。我该怎么做?如果有必要,我正在使用 KOMAscrreprt类。我非常希望找到一种方法来做到这一点,这样我就不必修改 TikZ 代码或 gnuplot 生成的 tex 文件。这个问题是不是关于图片标题,但图片中的文字本身,虽然我也会改变标题的字体大小,显然:)

答案1

怎么样

\begin{figure}
  \small % or any other font-changing command
  % code for including the picture
\end{figure}

答案2

您可以使用floatrow包来改变所有图形的字体大小(同时保持表格或其他浮点数的字体大小不变):

\documentclass{article}

\usepackage{floatrow}
\floatsetup[figure]{font=footnotesize}

\begin{document}

\begin{figure}[ht]
\centering
(Text inside a figure)
\caption{A figure}
\end{figure}

\begin{table}[ht]
\centering
(Text inside a table)
\caption{A table}
\end{table}

\end{document}

在此处输入图片描述

相关内容