I am a beginner with latex and tikz, and am using a .sty template to set my default fonts etc throughout the document (university requirement). This makes all the default text slightly larger than usual and adds 1.5 line spacing.

However I would like to add a flowchart (which I built successfully in a separate latex file using tikz). The problem is that once I pasted the code into the other document (the one with the template), the text inside the flowchart changed to that document's default (larger and with 1.5 line spacing). Obviously this made all the process boxes of the flowchart larger and they no longer fit in a page. Is there a way to only change the font of the tikz shapes to the latex default? I found ways how to add line spacing to the tikz shapes, or change the font, but cannot find how to set it to the latex default (which is not the default of that document).

Thanks. Your help is greatly appreciated.

  • As a workaround, you can compile your tikz figure in a separate .tex with appropiate font settings, and then \includegraphics the resulting pdf into the main one. Use standalone class (or preview package) in the separate .tex, to get the figure with appropiate bounding box.
    – JLDiaz
    May 9, 2014 at 9:08
  • 1
    Normally it is better to use the same font for diagrams (or the sans font you are using). Could you not just use e.g. the default sans with \small for the diagram?
    – cfr
    May 10, 2014 at 2:17

2 Answers 2


A small extension of cfr's comment:

\begin{tikzpicture}[every node/.style={font=\small\singlespacing}]
\node [text width=12cm] {\kant[1]};


enter image description here

\node {\parbox{12cm}{\small\singlespacing\kant[1]}};

enter image description here

You must log in to answer this question.

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