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

1. Sep 6, 2016

### joshmccraney

Hi PF!

I have the following code
Code (Text):

\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

2. Sep 7, 2016

### JorisL

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.