1

I used the \footnotesize command to downsize the label font however the "Figure 2.1" part of the label does not resize. This means I end up with something like: "Figure 2.1:" in a small font plus the description in the original font size.

How can I put the "Figure X.i" part in small font as well?

  • Welcome to TeX.SE! We can't say anything before seeing a small, but complete document which reproduce your problem. – Zarko Aug 14 at 23:30
  • 2
    you should never use formatting within the \caption argument, specify the formatting of the text as it appears in the caption and list of figures as part of the document setup in the class file or preamble – David Carlisle Aug 14 at 23:33
  • 2
    you need to give at least some hints about your document, no one can tell you how to change code that they have not seen. You may want to use the caption package and its \captionsetup command, or perhaps you are using a class that has built in features, or ... – David Carlisle Aug 14 at 23:39
  • 1
    Possible duplicate: Change caption font size – Werner Aug 14 at 23:41
  • 1
    Does this answer address the issues you wish to solve? Incidentally, the caption package is not compatible with certain document classes; it is for this reason that various people have asked you for more information about the structure of your document, beginning with the \documentclass instruction. – Mico Aug 15 at 2:13
1

A simple solution is to change your document class to one of the KOMA-script classes that corresponds to the document class you use (book=scrbook, report=scrreprt and article=scrartcl). Then, you may use KOMA-script’s build in commands to format the captions.

I have listed most of KOMA-script’s caption format commands in the MWE. The two commands that I assume will be of the most interest for you, is

\addtokomafont{caption}{\footnotesize}
\addtokomafont{captionlabel}{\usekomafont{caption}}

The first line adds attributes to the text part of the caption (\caption{<text>}), i.e. the text inside the curly brackets. The second adds font attributes to the label part, (Figure 1, Tabell 1, etc.) The command \usekomafont{<fontset>}) replicates all font attributes set for the text part to the label.

If you want to reset the attributes from scratch, use \setkomafont{caption}{<attributes>}, instead of\addtokomafont`. For example, if you want the label in italic, but not the text part, use

\addtokomafont{captionlabel}{\usekomafont{caption}\itshape}

Here is an MWE and the output:

enter image description here

\documentclass[UKenglish, demo]{scrartcl}
\usepackage{lmodern}
\usepackage{scrlayer-scrpage}
\usepackage[babel=true]{microtype}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{booktabs, bigdelim, rotating}

\KOMAoptions{headings=small,%
            captions=tableheading,%
    }

% Section
\let\raggedsection\flushleft

% Caption and figures
\renewcommand*{\captionformat}{:\ }
\addtokomafont{caption}{\footnotesize}
\addtokomafont{captionlabel}{\usekomafont{caption}}
\setlength{\belowcaptionskip}{0.5\baselineskip}
\setlength{\abovecaptionskip}{0.5\baselineskip}
\setlength{\intextsep}{0.5\baselineskip}

\begin{document}
\title{Capital Asset Prices}
\author{W.\,T.\,F.\,Dull}
\maketitle

\section{Section}
\label{sec:intro}

\textsc{One of the problems} which has plagued the world is bad typesetting of figures and tables. Now we have KOMA-script to help us.

\begin{figure}[!h]
\centering
\includegraphics[width=0.5\columnwidth]{figure1.png}
\caption{A demo of figure captions\label{fig-1}}
\end{figure}

Even table captions look better with KOMA-script, but that is no surprise. The example is borrowed from another question posted at Stackexchange.com

\begin{table}[!htbp]
\caption{A demo of figure captions\label{fig-1}}
\centering

\begin{tabular}{llcc@{}}
\cmidrule[\heavyrulewidth](l){2-4}
& header1 & header 2 & header 3 \\
\cmidrule(l){2-4}
\ldelim\{{4}{4mm}[\parbox{4mm}{\rotatebox[origin=c]{90}{group1}}] & 1 & a & g \\
& 2 & b & h \\
& 3 & c & i \\
& 3 & c & i \\\addlinespace[0.75ex]
\ldelim\{{6}{4mm}[\parbox{4mm}{\rotatebox[origin=c]{90}{group2}}] & 4 & d & j \\
& 5 & e & k \\
& 6 & f & l \\
& 7 & g & m \\
& 8 & h & n \\
& 9 & i & o \\
\cmidrule[\heavyrulewidth](l){2-4}
\end{tabular}
\end{table}
\end{document}
  • @Sebastiano Thank you for nice comment and upvote. Appreciated! – Sveinung Aug 20 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.