I'm like two superimposed two arrow heads in tikz, e.g. given the arrow tips Latex
and Circle
, have a way of getting a new arrow tip SuperposeLatexCircle
such that \draw [-{SuperposeLatexCircle}] (A) -- (B)
is equivalent to \draw [-{Latex}] (A) -- (B); \draw [-{Circle}] (A) -- (B)
.
I think this should be doable using sep
, e.g. \draw [-{Latex[sep=-1pt]Circle}] (A) -- (B)
with 1pt
replaced by a better value. The relevant values should be:
- Default
sep
:0.88pt .3 1
- Default
length
forLatex
:+3pt 4.5 .8
I tried taking sep=-3.88pt -4.8 0.9
(the first two components are -0.88pt-3pt
and -.3-4.5
respectively, and I did not know what to put for the third one so I put the average of 1
and .8
. This does not work but is fairly close when replacing Circle
by Diamond
.
The problem with Circle
is probably that its length is very different from the lengths of Latex
, so we probably also need the default length of Circle
:
- Default
length
forCircle
:+2.39365pt +3.191538
Candidate methods before I had before thinking about sep
:
Any of the following would help (in decreasing order of preference):
- A way of combining arrows without needing to predeclare them, e.g.
\draw [-{Superpose[first=Latex, second=Circle]}] (A) -- (B)
;
Edit: I'm stating to think that it is possible to do this with a negative sep
, e.g. -{Latex[sep=-1pt]Circle}
, but I'm not sure how to compute the correct sep automatically.
- A way of declaring combinations without copying and pasting, e.g. using
pgfarrowsdeclarecombine
plus some shifting to cancel the movement between the two arrows, or something like
\pgfdeclarearrow{
name=CombineLatexCircle,
% ...
drawing code={
\pgf@ar@code@Latex
\pgf@ar@code@Circle
},
% ...
}
(This seems hard to do for some components of the definition)
- Some systematic way of copying and pasting that allows to combine two
\pgfdeclarearrow
declarations, e.g. "Concatenate the drawing codes, discard the defaults, change all names in setup and drawing code to avoid clashes, …"
Best Answer
Here's one way to do this. Define a style that places the circle tip at the end of the segment and call it with the
Latex
arrow.Alternatively, you could have
circarr
draw both arrowheads:Which creates the same output as above using
\draw [circarr] (0,.5) -- (1,.5);
. You could make another style for the arrows at the beginning of the segment usingposition 0
and\arrowreversed
instead of\arrow
.Here is a MWE with
circarrb
(beginning) andcircarre
(end) both implemented: