TeX - LaTeX Asked by mahu_83 on May 1, 2021
I am using the command usepackage[font=footnotesize]{caption}
in order to change the font size of the caption of my figures. This works fine if the caption goes over only one line. But if a caption is very long and goes over two lines, the font size of the second line remains unchanged. How can I fix this?
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.9linewidth}|}
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}
You compare caption content with document text, i.e. Your caption is finished immediately after command hyperref[a]{(ref*{a})}
. Dot was already out of caption.
See:
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.9linewidth}|}
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}
As you can see, hyperref[a]{(ref*{a})}
doesn't change caption text font size.
Correct answer by Zarko on May 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP