2

Code:

\documentclass[12pt]{article}
\usepackage{float}
\usepackage[american,siunitx]{circuitikz}
\begin{document} 
    \noindent
    Hello\newline
    \footnotesize
    This is small.
    \begin{figure}[H]
        \centering
        \begin{circuitikz}
            \draw(0, 0) to [V, v_= $v_g\left(t\right)$] ++(0, -3) ;
            \draw(0, 0) to [R, l^= $R$] ++(3,0) to [C, l^=$C$] ++(0, -3) -- ++(-3,0);
        \end{circuitikz}
        \caption{A simple low-pass filter.}
        \label{RCFilter}
    \end{figure}
    \noindent
    This is small.
\end{document}

Output: enter image description here

I realized that when I used the \footnotesize command, the text changes, but the figure captions do not. Is there a way of getting the font of the figure's text to be changed, the same effect as if I change \documentclass[12pt]{article} to \documentclass[10pt]{article}?

Note: I am not sure if this is true, but I think that under my situation, the section headers' fonts may remain unchanged besides the text in the figures.

3
  • I don't understand, do you want the text inside the figure to be small or the caption? Do you want it to be global (i.e. all the text in all the figures, or all the captions for all the figures) or just on this specific one?
    – Elad Den
    Commented Jun 7, 2020 at 5:45
  • Both, because when I used the footnotesize command, I wanted the text in the figure and the caption to be of the same font as the text outside of the figure.
    – Superman
    Commented Jun 7, 2020 at 5:46
  • Like I apply a size command, all the text both in and out of the figures are shrunk, then back to normal after another size command.
    – Superman
    Commented Jun 7, 2020 at 5:47

1 Answer 1

2

The size of the text inside the tikz picture can be tweaked with the option font=\footnotesize This can either be done locally in the setup of the environment itself like so:

\begin{circuitikz}[font=\footnotesize]
...
\end{circuitikz}

Or globally using \tikzset{fontscale/.style = {font=\footnotesize}} in the preamble of your document.

The size of the caption can be changed locally within the caption of the figure or, globally using the solution from Here, using the caption package.

The MWE:

\documentclass[12pt]{article}
\usepackage{float}
\usepackage{caption}
\captionsetup[figure]{font=footnotesize}
\usepackage[american,siunitx]{circuitikz}
\tikzset{fontscale/.style = {font=\footnotesize}
    }

\begin{document} 
    \noindent
    Hello\newline
    \footnotesize
    This is small.
    \begin{figure}[H]
        \centering
        \begin{circuitikz}
            \draw(0, 0) to [V, v_= $v_g\left(t\right)$] ++(0, -3) ;
            \draw(0, 0) to [R, l^= $R$] ++(3,0) to [C, l^=$C$] ++(0, -3) -- ++(-3,0);
        \end{circuitikz}
        \caption{A simple low-pass filter.}
        \label{RCFilter}
    \end{figure}
    \noindent
    This is small.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .