5

I have problem with scaling of the arrowhead (see figure below). I found some examples, but unfortunately it does not work: question 1, question 2, question 3. I would like to reduce arrowhead of the current (for better proportion with arrows of the voltage).

enter image description here

  \documentclass{article}
  \usepackage{circuitikz}  
  \usepackage{tikz}
    \usetikzlibrary{decorations.markings}
  \usepackage{wrapfig}
  \usepackage{subfig} 

\begin{document}
  \begin{figure}[htp]
    \centering
    \subfloat[ ]   {
        \begin{circuitikz}[scale=1, every node/.style={scale=1}]
          \draw (0,0) node[ocirc] {} --+ (1,0) coordinate(A); 
          \coordinate (B) at ([yshift=-2.5cm]A);
          \draw (A) to[R] (B) --+ (-1,0) coordinate(D) node[ocirc] {}; 

          \begin{scope}[shorten >= 10pt,shorten <= 10pt]

            \draw[arrows={-open triangle 45}]
               ([xshift=.6cm,yshift=-0.5cm]A) -- node[right] {$i(t)$} ([xshift=.6cm,yshift=0.5cm]B); 
            \draw[->]  (0,0) -- node[left] {$u(t)$} (D);            
          \end{scope}         
        \end{circuitikz}    
    }
    \subfloat[ ]   {
        \begin{circuitikz}[scale=1, every node/.style={scale=1}]
          \draw (0,0) node[ocirc] {} --+ (1,0) coordinate(A); 
          \coordinate (B) at ([yshift=-2.5cm]A);
          \draw (A) to[L] (B) --+ (-1,0) coordinate(D) node[ocirc] {}; 

          \begin{scope}[shorten >= 10pt,shorten <= 10pt]
            \draw[arrows={-open triangle 45}]  ([xshift=.6cm,yshift=-0.5cm]A) -- node[right] {$i(t)$} ([xshift=.6cm,yshift=0.5cm]B); 
            \draw[->]  (0,0) -- node[left] {$u(t)$} (D);
          \end{scope}         
        \end{circuitikz}
    }   
  \end{figure} 
\end{document}
2

Using the arrows.new tikz library, and -open triangle 45 new,arrow head=3pt you can get what you want (change 3pt to the desired length):

  \documentclass{article}
  \usepackage{circuitikz}  
  \usepackage{tikz}
    \usetikzlibrary{decorations.markings,arrows.new}
  \usepackage{wrapfig}
  \usepackage{subfig} 

\begin{document}
  \begin{figure}[htp]
    \centering
    \subfloat[ ]   {
        \begin{circuitikz}[scale=1, every node/.style={scale=1}]
          \draw (0,0) node[ocirc] {} --+ (1,0) coordinate(A); 
          \coordinate (B) at ([yshift=-2.5cm]A);
          \draw (A) to[R] (B) --+ (-1,0) coordinate(D) node[ocirc] {}; 

          \begin{scope}[shorten >= 10pt,shorten <= 10pt]

            \draw[-open triangle 45 new,arrow head=3pt]
               ([xshift=.6cm,yshift=-0.5cm]A) -- node[right] {$i(t)$} ([xshift=.6cm,yshift=0.5cm]B); 
            \draw[->]  (0,0) -- node[left] {$u(t)$} (D);            
          \end{scope}         
        \end{circuitikz}    
    }
    \subfloat[ ]   {
        \begin{circuitikz}[scale=1, every node/.style={scale=1}]
          \draw (0,0) node[ocirc] {} --+ (1,0) coordinate(A); 
          \coordinate (B) at ([yshift=-2.5cm]A);
          \draw (A) to[L] (B) --+ (-1,0) coordinate(D) node[ocirc] {}; 

          \begin{scope}[shorten >= 10pt,shorten <= 10pt]
            \draw[-open triangle 45 new,arrow head=3pt]  ([xshift=.6cm,yshift=-0.5cm]A) -- node[right] {$i(t)$} ([xshift=.6cm,yshift=0.5cm]B); 
            \draw[->]  (0,0) -- node[left] {$u(t)$} (D);
          \end{scope}         
        \end{circuitikz}
    }   
  \end{figure} 
\end{document}

enter image description here

Download the file tikzlibraryarrows.new.code.tex and save it somewhere TeX can find it (the current working directory, for a quick run).

|improve this answer|||||
  • Why this library is not included in Miktex sw? – JardaFait Jun 20 '13 at 19:21
  • @jafan this library was developed by user Luigi from his answer to one of the questions you linked to. The library is still not part of PGF. You might have to ask the author why is this so. – Gonzalo Medina Jun 20 '13 at 19:31
3

On the search for scaling an open triangle 45 I found a different option that I assume was introduced with TikZ 3.0:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
    % Define a new style for the arrow tip
    \tikzset{myArrowStyle/.style={arrows = {{Stealth[inset=0pt,scale=5,fill=white,angle'=45]}-}}}
    % Draw arrow
    \draw[myArrowStyle] (0,0) -- (5,0);
\end{tikzpicture}\\
Some text as reference regarding the size...
\end{document}

The result is:

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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