更改圖形標題的字體大小

更改圖形標題的字體大小

我正在使用該命令\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})}不會變更標題文字字體大小。

相關內容