How to make font in subfigure of tikZ same size as document

  • Topic: LaTeX 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Font
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 5K views
member 428835
Hi PF!

I have the following code
Code:
\begin{figure}
    \isp
    \begin{subfigure}[t]{0.5\textwidth}
    \centering
    \resizebox{\linewidth}{!}{
    \begin{tikzpicture}
\draw(0,0) to (0,1);
\node at (0,1) {$z$};
\end{tikzpicture}
    }
    \caption{}
      \label{tri}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
       \centering
        \resizebox{\linewidth}{!}{
      \begin{tikzpicture}
\draw(0,0) to (1,0);
\node at (1,0) {$x$};
     \end{tikzpicture}
   }
   \caption{}
      \label{round}
    \end{subfigure}
        \caption{Illustration of the tapered corner regime.}
        \label{tc}
\end{figure}

in LateX but for some reason when I scale the pictures, the font is also scaled. How can I control this so the font is the same size as the rest of the document?

Thanks so much!

Josh
 
Physics news on Phys.org
It's quite logical behaviour that the font is scaled down.
First the contents of the resizebox etc. are rendered after which they are scaled down hence the smaller font.

I would approach this by defining a new environment.
This environment would take a scaling parameter and perhaps a reference length.

In this environment you would scale up the fontsize before the rescaling is done.
This is a great exercise to become better at LaTeX.