# Symbol for “rotate around axis”

I have two pictures of an object where I need to indicate that one is rotated by x° (around a certain axis), preferably with the arrow in the picture - BUT - I can't seem to find this arrow in the "comprehensive latex symbol list". Anyone has any idea where to get?

I already have alternatives but would prefer to have this if possible:

-
Please make sure that all images are uploaded using the official stackexchange interface, i.e. the image icon on top of the text field (shortcut: CTRL+G). This ensures that all images are always accessible and do not expire. (As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again.) –  Torbjørn T. Nov 29 '11 at 15:41
@Mico: Why did you mark the "x°" as code? If anyhting, I'd put the "x" italic: _x_°. (I agree on removing the space before the degree sign.) –  doncherry Nov 29 '11 at 17:02
@doncherry: I did so because I think of "x" as a variable; in LaTeX I'd set it in math mode, of course, as in $x=\pi/4=45^\circ$. :-) –  Mico Nov 29 '11 at 18:33
Thanks for fixing - still starting out with TeX/stackexchange. Will keep it in mind in future. –  user9631 Nov 29 '11 at 18:42

Here is a tikz version which automatically gets you all the flexibility inherent in tikz such as rotating the symbol to be appropriate for the axis, adjusting the line style, colors, arrow style, etc...

## Further Enhancement:

• Automatically rotate the symbol to be along the path.
• Provide a style setting that can be used to customize the symbol

## Code:

\documentclass[border=2pt]{standalone}
\usepackage{tikz}

\newcommand{\AxisRotator}[1][rotate=0]{%
\tikz [x=0.25cm,y=0.60cm,line width=.2ex,-stealth,#1] \draw (0,0) arc (-150:150:1 and 1);%
}

\begin{document}
\begin{tikzpicture}
\draw (0,0)  -- (3,0)  node [midway] {\AxisRotator};
\draw (0,0)  -- (0,-3) node [midway] {\AxisRotator[rotate=-90]};
\draw (0,-3) -- (3,0)  node [midway] {\AxisRotator[rotate=60]};
\end{tikzpicture}
%
\begin{tikzpicture}
\draw (0,0)  -- (3,0)  node [midway] {\AxisRotator[x=0.2cm,y=0.4cm,->,densely dotted]};
\draw (0,0)  -- (0,-3) node [midway] {\AxisRotator[x=0.2cm,y=0.4cm,->,rotate=-90,blue, dashed]};
\draw (0,-3) -- (3,0)  node [midway] {\AxisRotator[x=0.2cm,y=0.4cm,->,rotate=60, red ]};
\end{tikzpicture}
\end{document}

-
@user9631 For the inline inclusion of this, see Jake's modification to Quartertone symbols –  percusse Nov 30 '11 at 1:10
Thanks a lot, my favorite - these are some really beautiful arrows :) –  user9631 Nov 30 '11 at 18:44

You could just use the image you have, its quality seems to be good. Define the height in terms of ex, so it'll scale according to the current font size:

\documentclass{article}

\usepackage{graphicx}% for images
\usepackage{xspace}% for awesome spacing at the end of macros. Note how a space
% is only inserted if necessary.

\newcommand{\rotatearoundaxis}{\includegraphics[height=1.5ex]{rotatesymbol-img}\xspace}

\begin{document}

\section[Barrel rolls]{Barrel rolls: \rotatearoundaxis}% short title without graphics for ToC

\subsection[The symbol rocks]{The symbol \rotatearoundaxis rocks}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.
Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Whenever you see the symbol \rotatearoundaxis, do a barrel roll.
\rotatearoundaxis means: Do a barrel roll. Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.

\end{document}


Or you could learn TikZ, which might actually be not too hard for this symbol. Take a look at its awesome manual, which explains how to do a lot of things. Our question Materials for learning TikZ might be helpful, too.

-
Thanks - will do like this. I was hoping someone knew what package this originated from (if at all). –  user9631 Nov 29 '11 at 18:40
@user9631: Hmm, no idea, I don't usually do maths in LaTeX. But you could edit your question to ask about a package. It might be helpful to see the document that you got the symbol from. –  doncherry Nov 29 '11 at 18:45

You could build up this symbol, which I'll call \rotateonaxis, starting with the \circlearrowleft command provided by the amssymb package. Note that the command works in both text and math mode:

\documentclass{article}
\usepackage{graphicx,amssymb}
\newcommand{\rotateonaxis}{\raisebox{0.45ex}{\vrule height 0.025em%
depth 0pt width 1.5em}\kern-1.05em\scalebox{0.55}[1.1]{\raisebox{%
-0.6ex}{\rotatebox{60}{$\circlearrowleft$}}}\kern0.55em}

\begin{document}
$x\rotateonaxis x$, A\rotateonaxis B
\end{document}


Obviously, depending on your exact needs, you could lengthen or shorten the horizontal bar (the "axis"), rotate the circlearrow a bit more or a bit less, and change the overall size of the cirlcearrow item (by varying the parameters of the \scalebox command).

-

@Mico was just a few minutes faster than me... But still, here is my variant of the code, which does basically the same:

\documentclass{article}

\usepackage{graphicx}
\usepackage{ulem}

\usepackage{wasysym}

\newcommand{\rotateaxisright}{\raisebox{0.15ex}{\sout{\,\textbf{\resizebox{1.4ex}{1.5ex}{\rightturn}}\,}}}
\newcommand{\rotateaxisleft}{\raisebox{0.15ex}{\sout{\,\textbf{\resizebox{1.4ex}{1.5ex}{\leftturn}}\,}}}%

\begin{document}
Let's twist baby \rotateaxisright! And now the other way around \rotateaxisleft\ right, baby!
\end{document}


-
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{mathabx}
\newcommand\makeRot[1][3em]{\ensuremath{%
\rlap{\rule[0.6ex]{#1}{0.4pt}}\makebox[#1]{$\mathbf{\uptodownarrow}$}}}
\begin{document}

`