I am trying to draw a simple circuit with circuitikz, but in order to better suit my needs I had to modify the size of all components through /tikz/circuitikz/bipoles/length=0.9cm (default length should be 1.4cm). However, when compiling the figure on the left in the mwe below, you see that the shape of the voltage source is not satisfying.
I merged two answers from TeX.SE to try and cope with this, but I obtained the picture on the right, where the shape of the voltage source is indeed ok, but its label is scaled and the starting coordinate of the path is not where I expected it to be! I guess it has to do with the transform shape option, but I do not really know how to circumvent this issue and achieve what I wanted.
\documentclass[a4paper]{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize[prefix=mwe-\overlaynumber-]
\tikzsetexternalprefix{tikzpics/}
\usetikzlibrary{3D, calc, external, positioning, circuits.logic.mux, shapes.gates.logic.US}
\usepackage[americaninductors]{circuitikz}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}[auto, node distance=4mm and 4mm, circuit logic,every node/.style={font=\tiny}, >=latex,%
/tikz/circuitikz/bipoles/length=0.9cm]
\def\nodedist{4mm}
\def\complen{9mm}
\ctikzset{tripoles/mos style/arrows, tripoles/nmos/arrow pos=0.8, tripoles/pmos/arrow pos=0.6,}
\draw (0,0) to [C, name=c] ++(\complen, 0) node[american not port, name=inv1, anchor=in] {};
\node (inv2) [right=of inv1, american not port] {};
\draw ({$(c.east)!.5!(inv1.in)$} |- inv1.in) to [short,*-] ++(0,.7*\complen) to [R] ({$(inv1.out)!.5!(inv2.in)$} |- {$(inv1.out)+(0,.7*\complen)$}) to [short,-*] ({$(inv1.out)!.5!(inv2.in)$} |- inv1.out);
\draw ({$(c.east)!.5!(inv1.in)$} |- inv1.in) to [american voltage source, l=$V_\textup{CM}$] ({$(c.east)!.5!(inv1.in)$} |- {$(inv1.in) + (0,-2*\complen)$});
\draw (inv1.out) -- (inv2.in);
\end{tikzpicture}\hfil
\begin{tikzpicture}[auto, node distance=4mm and 4mm, circuit logic,every node/.style={font=\tiny}, >=latex,%
/tikz/circuitikz/bipoles/length=0.9cm]
\def\nodedist{4mm}
\def\complen{9mm}
\ctikzset{tripoles/mos style/arrows, tripoles/nmos/arrow pos=0.8, tripoles/pmos/arrow pos=0.6,}
\draw (0,0) to [C, name=c] ++(\complen, 0) node[american not port, name=inv1, anchor=in] {};
\node (inv2) [right=of inv1, american not port] {};
\draw ({$(c.east)!.5!(inv1.in)$} |- inv1.in) to [short,*-] ++(0,.7*\complen) to [R] ({$(inv1.out)!.5!(inv2.in)$} |- {$(inv1.out)+(0,.7*\complen)$}) to [short,-*] ({$(inv1.out)!.5!(inv2.in)$} |- inv1.out);
\draw \pgfextra{\ctikzset{/tikz/circuitikz/bipoles/length=1.4cm, transform shape}} ({$(c.east)!.5!(inv1.in)$} |- inv1.in) to [american voltage source, l=$V_\textup{CM}$, scale=0.6] ({$(c.east)!.5!(inv1.in)$} |- {$(inv1.in) + (0,-2*\complen)$});
\draw (inv1.out) -- (inv2.in);
\end{tikzpicture}
\end{figure}
\end{document}


circuitikzwith internal TikZ library without using the compatibility options, so anything can happen: https://texdoc.org/serve/circuitikz/0#subsection.1.6. Moreover, I do not have tikz libraries3Dnorlogic.mux. Could you please try to do a minimal example with onlycircuitikz? – Rmano Jul 22 '21 at 09:20circuitikzand the styling options. So probably you have more constraints that I do not know (really the "node distance" thing will not work well withcircuitikz, where the idea is to build a circuit along a path, and not positioning the nodes and then connect them like in a, say, block diagram. Anyway, without using thecompatibilitykey tocircuitikz, it will not work --- please read the manual section I linked above. – Rmano Jul 22 '21 at 10:10circuitikzis quite new and I haven't fully grasped it yet. Anyway, I read the manual section that you linked and tried using thecompatibilitykey, but unfortunately that didn't fix the problem. – DavideM Jul 22 '21 at 11:37compatibilitykey has failed. If you can prepare an example showing that I will investigate. – Rmano Jul 22 '21 at 12:02scalenortransform shapein a path. It will change all the coordinates of that path, which you normally do not want... – Rmano Jul 22 '21 at 15:22