TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Taking from the PGF manual,

  \draw [help lines] (0,0) grid (3,3);
  \coordinate (a) at (rnd,rnd);
  \coordinate (b) at (3-rnd,3-rnd);
  \draw (a) -- (b);
  \node (c) at (1,2) {x};
  \draw let \p1 = ($ (a)!(c)!(b) - (c) $),
            \n1 = {veclen(\x1,\y1)}
        in circle [at=(c), radius=\n1];

I'd like to increase the size of x. The problem is that I have multiple circles in the same diagram. Some of them require a larger sized font, while others are okay at default. How do I do this?

share|improve this question
how about \node[scale=3] at (1,2) {x} (choose the number appropriately) – cmhughes Apr 5 '13 at 17:38
@cmhughes: why not post an answere? ;) – ralfix Apr 5 '13 at 19:03
up vote 58 down vote accepted

You can change the font size inside a tikZ node like you do it in normal LaTeX – use one of these:



\node (c) at (1,2) {\large x};


\node (c) at (1,2) {\large $x$}; %note the \large *outside* the inline math

Edit: To change font size inside math mode, LaTeX provides the following commands:


Using scaling algorithms provided by tikZ/pgf (e.g. scale=...) scales "the entire character", so it may look ugly if you use too much scaling. If you set the font sizes with the above commands, LaTeX selects different symbols for the different font sizes. This ensures the fonts are readable and have enough "details". If you want a more extreme scaling, use the scale=3.0 option for the node.

share|improve this answer
it says it's invalid with math mode? – AlanH Apr 5 '13 at 17:53
Maybe worth pointing out the font key which could be of help in this case :) – Claudio Fiandrino Apr 5 '13 at 17:56
@ralfix sorry i didn't mention it. it's too early in the morning for me. bah! – AlanH Apr 5 '13 at 18:02
@ClaudioFiandrino: Do you mean the scale option? – ralfix Apr 5 '13 at 18:11
@Qrrbrbirlbel: you're right... what I wanted to say was that \node (c) at (1,2) {\large x}; is equivalent to \node[font=\large] (c) at (1,2) {x}; – Claudio Fiandrino Apr 5 '13 at 19:15

Set a new style so that you can use it later.

For example:


\tikzset{fontscale/.style = {font=\relsize{#1}}

  \draw [help lines] (0,0) grid (3,3);
  \coordinate (a) at (rnd,rnd);
  \coordinate (b) at (3-rnd,3-rnd);
  \draw (a) -- (b);
  \node (c) at (1,2) [fontscale=4] {x};
  \draw let \p1 = ($ (a)!(c)!(b) - (c) $),
            \n1 = {veclen(\x1,\y1)}
        in circle [at=(c), radius=\n1];
share|improve this answer
Please add an } at the end of the MWE. Thanks. – Patrizio Bertoni Sep 11 '15 at 20:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.