Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm looking how to use currarrow as a new arrowhead in tikz.

Especially it's of the same size of latex or stealth and way smaller than triangle 45.

Any idea how to make it?

For now I use node[currarrow, sloped, allow upside down, pos=1] {} which is not really convenient...

enter image description here

share|improve this question
    
Can you add some details about this currarrow? –  percusse Mar 24 '13 at 11:37
    
Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Also, please specify what you mean by currarrow; a picture would help. –  Jubobs Mar 24 '13 at 11:37
    
First of all, I think you can have a look to Is it possible to change the size of an arrowhead in TikZ/PGF?: perhaps, what you're looking for has already been done by the fantastic library from Luigi. –  Claudio Fiandrino Mar 24 '13 at 11:38
    
Thanks for the screenshot but I meant where it is defined, how do you use it etc. –  percusse Mar 24 '13 at 11:43
    
The context of the question is : when I have a dipole in circuitikz, how to display a voltage arrow between those two points, as there is no component between them? –  s__C Mar 24 '13 at 11:45
add comment

1 Answer

A quick conceptual definition with hard coded values, you can combine it with Luigi's goodies. It won't work with different line widths etc. since I didn't do any right/left extend calculation.

I took the currarrow definition from circutikz library. It doesn't look too different from the scaled triangle 45. I would recommend using Luigi's definitions and modifiying them if necessary.

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows}
\makeatletter
\pgfarrowsdeclare{mycurrarrow}{mycurrarrow}{
\pgfarrowsleftextend{-5\pgflinewidth}
\pgfarrowsrightextend{5\pgflinewidth}
}
{
            \newlength\pgf@my@length
            \pgf@my@length = 1cm
            \divide \pgf@my@length by 16
            \pgfpathmoveto{\pgfpoint{-.7\pgf@my@length}{0pt}}
            \pgfpathlineto{\pgfpoint{-.7\pgf@my@length}{-.8\pgf@my@length}}
            \pgfpathlineto{\pgfpoint{1\pgf@my@length}{0pt}}
            \pgfpathlineto{\pgfpoint{-.7\pgf@my@length}{.8\pgf@my@length}}
            \pgfpathlineto{\pgfpoint{-.7\pgf@my@length}{0pt}}           
            \pgfusepathqfillstroke
}
\makeatother
\begin{document}
\begin{tikzpicture}
    \draw[mycurrarrow-mycurrarrow,blue] (0,0) -- (2,1);
    \draw[latex-latex,shift={(0mm,3mm)}] (0,0) -- (2,1);
    \draw[triangle 45-triangle 45,shift={(0mm,-3mm)},red] (0,0) -- (2,1);
\end{tikzpicture}
\end{document}

enter image description here

I don't get why you don't post five lines of code(four being documentclass and begin/end document and circutikz package)for an example instead of describing the arrow with screenshot from the manual.

share|improve this answer
    
When using your solution with dashed, there is the problem of having the arrowhead also in dash mode... Like in \draw[-mycurrarrow,dashed] (0,0) -- (2,0); –  s__C Mar 24 '13 at 17:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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