改变图片标题的字体大小

改变图片标题的字体大小

我使用命令\usepackage[font=footnotesize]{caption}来更改图表标题的字体大小。如果标题只有一行,则此方法有效。但如果标题很长且超过两行,则第二行的字体大小保持不变。我该如何修复此问题?

\documentclass[11pt,letterpaper,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{graphicx} 
\usepackage[font=footnotesize]{caption}
\begin{document}
\begin{equation} \label{a}
A
\end{equation}
\begin{table}   
\centering   
\begin{tabular}{|p{0.9\linewidth}|}     
\hline A \\     \hline  
\end{tabular}   
\caption{This text here is in footnotesize as required. Now comes a reference \hyperref[a]{(\ref*{a})}}. Why is this text and the reference \hyperref[a]{(\ref*{a})} large? And why does LaTeX make the linebreak before the dot?
\end{table} 
\end{document}

答案1

您将标题内容与文档文本进行比较,即您的标题在命令后立即完成\hyperref[a]{(\ref*{a})}。点已经超出标题范围。

看:

\documentclass[11pt,letterpaper,
               colorlinks=true,linkcolor=blue,citecolor=blue,
               urlcolor=blue]{scrartcl}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[font=footnotesize]{caption}
\usepackage{hyperref}

\usepackage{lipsum}

\begin{document}
\begin{equation} \label{a}
A
\end{equation}

\begin{table}[h]
\centering
\begin{tabular}{|p{0.9\linewidth}|}
\hline A \\     \hline
\end{tabular}
\caption{This text here is in \texttt{footnotesize} as required. Now comes a reference \hyperref[a]{(\ref*{a})}% <--- here was end of caption!!!
. Why is this text and the reference large? Because this part of text was not included in caption!}
    \end{table}
\lipsum[66]
\end{document}

在此处输入图片描述

如您所见,\hyperref[a]{(\ref*{a})}不会改变标题文本字体大小。

相关内容