Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Sep 6, 2016 #1

    joshmccraney

    User Avatar
    Gold Member

    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. jcsd
  3. Sep 7, 2016 #2
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: How to make font in subfigure of tikZ same size as document
  1. Plotting in TikZ (Replies: 6)

Loading...