Como redimensionar a fonte da figura e do rótulo da tabela?

Como redimensionar a fonte da figura e do rótulo da tabela?

Usei o comando \footnotesize para reduzir o tamanho da fonte do rótulo, porém a parte "Figura 2.1" do rótulo não é redimensionada. Isso significa que acabo com algo como: "Figura 2.1:" em fonte pequena mais a descrição no tamanho da fonte original.

Como posso colocar a parte "Figura Xi" também em fonte pequena?

Responder1

Uma solução simples é alterar sua classe de documento para uma das classes de script KOMA que corresponde à classe de documento que você usa ( book=scrbook, report=scrreprte article=scrartcl). Em seguida, você pode usar os comandos integrados do script KOMA para formatar as legendas.

Listei a maioria dos comandos de formato de legenda do script KOMA no MWE. Os dois comandos que presumo que serão de maior interesse para você são

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

A primeira linha adiciona atributos à parte do texto da legenda ( \caption{<text>}),ou seja. o texto entre colchetes. O segundo adiciona atributos de fonte à parte do rótulo, ( Figure 1, Tabell 1,etc..) O comando \usekomafont{<fontset>}) replica todos os atributos de fonte definidos para a parte do texto para o rótulo.

Se você quiser redefinir os atributos do zero, use \setkomafont{caption}{<attributes>}, instead of\addtokomafont`. Por exemplo, se você quiser o rótulo emitálico, mas não a parte do texto, use

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

Aqui está um MWE e a saída:

insira a descrição da imagem aqui

\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}

informação relacionada