0

I'm doing some design for what's inside a D flip flop, with all the transistor, to explain all the basic components that are inside; and I have like 26 mos to fit. I tried to resize them, but the scale=0.4, transfor shapecommand option, kind of mess with my grid (all coordinates are shrinked as well).

So I found this answer resize nmos symbol, to redraw my nmos smaller, and the problem was the arrow size (too big), then on the circuitikz manual I found the comand circuitikz/current arrow scale=<your_scaling_factor> to put in the square brackets after the nmos option inside the node[]{} command.

But now that I got the right dimensions, the arrow is a bit too low nmos arrow too low.

Where do I find the right option to lift it up (or down for the pmos)??

\begin{figure}[!h]
    \centering
    \begin{circuitikz}
%       [scale=0.35,trasform shape]
    % PUN ffd
    %rectangle to show the pmos

    % PDN ffd
    %rectangle to show the nmos

    % Transistor
    \ctikzset{tripoles/mos style=arrows,
            transistors/arrow pos=end,
        }
    % custom nmos dimensions
    \ctikzset{tripoles/nmos/width/.initial=.3} %% .7
    \ctikzset{tripoles/nmos/gate height/.initial=.25}   %% .35
    \ctikzset{tripoles/nmos/base height/.initial=.35}   %% .5
    \ctikzset{tripoles/nmos/conn height/.initial=-0.5}  %% 0
    \ctikzset{tripoles/nmos/height/.initial=.7} %% 1.1
    \ctikzset{tripoles/nmos/base width/.initial=.5} %% .5
    \ctikzset{tripoles/nmos/gate width/.initial=.62}    %% .62


    \draw (0,-2) node[nmos,circuitikz/current arrow scale=24,](Mn1){\scriptsize(D)};
    \draw (0,-5) node[nmos,circuitikz/current arrow scale=24,](Mn2){\scriptsize(Y)};

\end{circuitikz} \caption{FFD as a one cell with 4 I/O} \label{fig:FFD_99} \end{figure}

Fr3d
  • 141
  • 1
    If I correctly understend you, than you are looking for something like this: \draw (0,0) node[nmos, scale=0.4,](Q1){(Y)} or \draw (0,0) node[nmos, scale=0.4, font=\Large](Q1){(Y)};. Am I correct? – Zarko Apr 04 '23 at 10:17
  • Yes, but more general. for the scheme I need to draw the transistors must be quite small – Fr3d Apr 04 '23 at 18:32

1 Answers1

5

Try whenever possible not to mess with the internal parameters... circuitikz now has the concept of class of a component which can be scaled. The answer you found refers to a (quite) old version of the package. So you can scale all your transistors to be half the default (linear) size:

\documentclass[border=2.72mm,preview]{standalone}
\usepackage{circuitikz}
\begin{document}
\ctikzset{tripoles/mos style=arrows,
            transistors/arrow pos=end,
            current arrow scale=24,
            transistors/scale=0.5,
        }
\begin{circuitikz}
        \draw (0,0) node[nmos,](Mn1){\scriptsize(D)};
        \draw (0,-1) node[nmos,](Mn2){\scriptsize(Y)};
        \path (0,0) ++ (1,0); % bounding box to see the labels
\end{circuitikz}
\end{document}

enter image description here

The arrow is not scaling automatically because it is designed so that it is the same as "current" arrows around the circuit.

Rmano
  • 40,848
  • 3
  • 64
  • 125