図のキャプションのフォントサイズを変更する

図のキャプションのフォントサイズを変更する

図のキャプションのフォント サイズを変更するために、このコマンドを使用しています\usepackage[font=footnotesize]{caption}。キャプションが 1 行だけの場合は、このコマンドは正常に機能します。しかし、キャプションが非常に長く、2 行にまたがる場合は、2 行目のフォント サイズは変更されません。どうすればこれを修正できますか?

\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})}キャプション テキストのフォント サイズは変更されません。

関連情報