4

I have a similar problem as asked in this Question. In my case there seems to be a difference in the rendering of a tikz figure between the standalone class and the scrartcl class. In the MWE you can see that if I use the standalone class the arrows are spaced in a way, that there is enough space for the labels. But in the scrartcl class the labels and arrows overlap. Does someone have an idea what causes this?

\documentclass[paper=A4]{scrartcl}
%\documentclass{standalone}

\usepackage[european resistors]{circuitikz}

\begin{document}

\begin{tikzpicture}[transform shape]
    \draw (-0.5,0)-- ++ (2,0)
    (-0.5,-1) -- ++ (2,0)
    (-0.5,-2) -- ++ (2,0)
    (-0.5,-3) -- ++ (2,0);

    \draw[Latex-Latex] (0,0) to[out=-78, in=80] node[midway,right] {$\underline{Z}_\mathrm{ab}$} (0,-1);
    \draw[Latex-Latex] (0.7,0) to[out=-79, in=81] node[pos=0.25,right] {$\underline{Z}_\mathrm{ac}$} (0.7,-2);
    \draw[Latex-Latex] (1.4,0) to[out=-80, in=82] node[pos=0.166667,right] {$\underline{Z}$} (1.4,-3);
\end{tikzpicture}

\end{document}

Rendering in scrartcl

enter image description here

Rendering in standalone

enter image description here

4
  • 2
    Different font sizes of the classes Commented Jun 21 at 9:10
  • 1
    \documentclass[11pt]{standalone} should give the same result as the koma class Commented Jun 21 at 9:12
  • ah, I didn't think of that. Thank you.
    – DraUX
    Commented Jun 21 at 9:13
  • 1
    Off-topic: ISO A4 is already the default using a KOMA-Script class. So the option is usually not needed. For more information about defaults with KOMA-Script classes, see the KOMA-Script user manuals.
    – cabohah
    Commented Jun 21 at 9:26

1 Answer 1

3

Different classes have different defaults for font sizes. The koma classes use 11pt as default. To replicate the same font size in standalone, you could use

%\documentclass[paper=A4]{scrartcl}
\documentclass[11pt]{standalone}

\usepackage[european resistors]{circuitikz}

\begin{document}

\begin{tikzpicture}[transform shape]
    \draw (-0.5,0)-- ++ (2,0)
    (-0.5,-1) -- ++ (2,0)
    (-0.5,-2) -- ++ (2,0)
    (-0.5,-3) -- ++ (2,0);

    \draw[Latex-Latex] (0,0) to[out=-78, in=80] node[midway,right] {$\underline{Z}_\mathrm{ab}$} (0,-1);
    \draw[Latex-Latex] (0.7,0) to[out=-79, in=81] node[pos=0.25,right] {$\underline{Z}_\mathrm{ac}$} (0.7,-2);
    \draw[Latex-Latex] (1.4,0) to[out=-80, in=82] node[pos=0.166667,right] {$\underline{Z}$} (1.4,-3);
\end{tikzpicture}

\end{document}

You must log in to answer this question.

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