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.

Consider four kinds of "arrow" symbols: 0. A horizontal line 1. A leftarrow 2. A rightarrow 3. A doublearrow

I'd like to add circles to each end of these arrows, allowing for all possible combinations of "filled" and "unfilled," for a total of sixteen combinations in total. As an example, one may consider the "spoons" offered by the MnSymbol package for reference, as in \leftspoon and \leftfilledspoon.

Any ideas as to how to achieve this?

EDIT: So to clarify, I want circles on BOTH ends of the arrows. As in O-->O.

share|improve this question
    
Where is the arrow? Above the filled circle (more or less invisible), outwards or in the inside, ...? –  Heiko Oberdiek Dec 4 '12 at 17:26
add comment

3 Answers

up vote 5 down vote accepted

You can use \hbox to create your own arrows by appending other symbols, like this:

\def\CircleftarrowCirc{\hbox{$\circ$}\kern-1.5pt\hbox{$\leftarrow$}\kern 1.5pt\hbox{$\circ$}}

enter image description here

share|improve this answer
    
Thanks. There needs to be a negative on the second kern, but in broad terms this is the answer I was looking for. So the fixed code reads: \def\CircleftarrowCirc{\hbox{$\circ$}\kern-1.5pt\hbox{$\leftarrow$}\kern-1.5pt\‌​hbox{$\circ$}} –  user18921 Dec 4 '12 at 17:55
    
@user18921: Good that you spotted the missing negative. I had it in the original code to create the image. It somehow got lost in the copy&paste. –  Mafra Dec 4 '12 at 18:07
add comment

I think the intended arrowtips are the following:

Arrows

which were produced with the following code:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

\def\generateFourVariants#1{% Parameter, arrow style
\xdef\y{0}
\foreach \left in {white, black} {
  \foreach \right in {white,black} {
    \draw[fill=\left]  (0,\y) circle (2pt);    
    \draw[fill=\right] (1,\y) circle (2pt);
    \draw[shorten <=2pt, shorten >=2pt, arrows=#1] (0,\y) -- (1, \y);
    \pgfmathparse{\y+1}
    \global\let\y\pgfmathresult
  }
 }
}

\begin{tikzpicture}[>=latex]
  \begin{scope}[xshift=0 cm]
  \generateFourVariants{}
  \end{scope}
  \begin{scope}[xshift=2 cm]
  \generateFourVariants{->}
  \end{scope}
  \begin{scope}[xshift=4 cm]
  \generateFourVariants{<-}
  \end{scope}
  \begin{scope}[xshift=6 cm]
  \generateFourVariants{<->}
  \end{scope}

\end{tikzpicture}
\end{document}

But I'm not sure if this answers the OP question...

share|improve this answer
    
Those are indeed the symbols! –  user18921 Dec 4 '12 at 17:50
add comment

Package txfonts contains all these symbols, however I am counting nine variants:

\documentclass{article}
\usepackage{txfonts}

\begin{document}
\begin{enumerate}
\item $-$
\item $\multimapinv$, $\multimapdotinv$
\item $\multimap$, $\multimapdot$
\item $\multimapboth$,
      $\multimapdotbothA$, $\multimapdotbothB$
      $\multimapdotboth$
\end{enumerate}
\end{document}

Result

share|improve this answer
    
If you look at 4, that's kind of what I'm looking for. Except I'd like the horizontal line connecting the circles to possibly end in an arrowhead. –  user18921 Dec 4 '12 at 17:19
    
@user18921 It's not clear to me. Perhaps you can made some ASCII art or a hand drawing? –  Heiko Oberdiek Dec 4 '12 at 17:24
    
Sure! O---O, O-->O, O<--O, O<->O. That's four of them. Filling in the O's in all combinations gives the remaining twelve. –  user18921 Dec 4 '12 at 17:35
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.