[texhax] \twoheaduparrow

Barbara Beeton bnb at ams.org
Thu Oct 27 16:21:37 CEST 2005


here's something i put together for another purpose
that i think will help.  a 90 degree rotation will
turn a right arrow upright.
 							-- bb

---------- Original message ----------
Date: Thu, 27 Oct 2005 08:02:14 -0400
From: Zbigniew Nitecki <zbigniew.nitecki at tufts.edu>
To: support at tug.org
Subject: [texhax] \twoheaduparrow

I'm unfamiliar with the defining code for ams symbols, but would like
to create the \uparrow equivalent of \twoheadrightarrow.  How do I do
it?

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966

 			--------------------

\documentclass{article}
\usepackage{graphicx}
\usepackage{amssymb}
\nofiles % don't need .aux file

\newcommand{\reflectit}[1]{\reflectbox{\ensuremath#1}}
\newcommand{\turnover}[1]{\rotatebox[origin=c]{180}{\ensuremath#1}}
\newcommand{\turnne}[1]{\rotatebox[origin=c]{45}{\ensuremath#1}}
\newcommand{\turnnw}[1]{\rotatebox[origin=c]{135}{\ensuremath#1}}
\newcommand{\turnsw}[1]{\rotatebox[origin=c]{225}{\ensuremath#1}}
\newcommand{\turnse}[1]{\rotatebox[origin=c]{315}{\ensuremath#1}}

\begin{document}
\section*{New symbols from old}
Sometimes one needs a symbol that can't be found in any font,
but that is either a rotation or a reflection of a sybol that
\emph{is} available.  \texttt{graphicx} package to the rescue!

Define some suitable commands to provide the desired degree of
rotation or to reflect an object:
\begin{verbatim}
\newcommand{\reflectit}[1]{\reflectbox{\ensuremath#1}}
\newcommand{\turnover}[1]{\rotatebox[origin=c]{180}{\ensuremath#1}}
\end{verbatim}
Then you can use these commands to produce your new symbols:
\[
{}\leqslant\;\geqslant{}:\;
   \turnover{\geqslant}\;\turnover{\leqslant};
\qquad
{}\Rightarrow{}:\;
   \turnne{\Rightarrow}\;\turnnw{\Rightarrow}\;
   \turnsw{\Rightarrow}\;\turnse{\Rightarrow};
\qquad
{}\sim{}:\;
   \reflectit{\sim}
\]
Combining these two techniques to obtain a symbol that is both
rotated and reflected is left as an exercise for the reader.

When you define new names for such symbols, it's a good idea to
specify the class (\verb|\mathord|, \verb|\mathbin|, etc.)\ in
the definition so you get the correct spacing when they're used.
\end{document}



More information about the texhax mailing list