[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

arrows



Here's the current draft of two discussion documents on arrows.  To
understand the Task: number, I've included an organization document.

For those who weren't at Aston, the phrase `control glyph' is the
working name for a glyph whose appearance is not specified, but which
has defined ligaturing behaviour.

Alan.

--- cut here ---

%%% ====================================================================
%%%  @LaTeX-file{
%%%     author          = "Alan Jeffrey",
%%%     version         = "0.02",
%%%     date            = "3 Aug 1993",
%%%     time            = "20:02:05 BST",
%%%     filename        = "mfgorg.tex",
%%%     address         = "School of Cognitive and Computing Sciences
%%%                        University of Sussex
%%%                        Brighton BN1 9QH
%%%                        UK",
%%%     telephone       = "+44 273 606755 x 3238",
%%%     FAX             = "+44 273 678188",
%%%     checksum        = "42972 164 683 5612",
%%%     email           = "alanje@cogs.sussex.ac.uk",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "TeX fonts mathematics",
%%%     supported       = "yes",
%%%     abstract        = "This is a note on MFG organization",
%%%     docstring       = "The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%     package         = "stands alone",
%%%     dependencies    = "none",
%%%  }
%%% ====================================================================

\documentstyle{ltugboat}

\title{Note on math font group organization}

\author{Alan Jeffrey}
\address{University of Sussex}
\netaddress{alanje@cogs.susx.ac.uk}

\def\rtitlex{MFG discussion document}
\def\midrtitle{{\sl Task 1: Organization\/}}
\setcounter{page}{1}

\begin{document}

\maketitle

This note is based on an electronic mail discussion between
Alan Jeffrey and Justin Ziegler.  Our suggested breakdown of tasks for
the math font group (MFG) is:
\begin{enumerate}

\item {\em Organization\/}: writing papers such as this one, about the
   structure and direction of the group.

\item {\em Requirements analysis\/}: looking at the needs and current
   practice of mathematical typesetting, and setting (perhaps
   unachievable!) goals.

\item {\em Technical studies\/}: individual technical analysis, with
   clear conclusions and stating the advantages and disadvantages of
   the approaches investigated.

\item {\em Standardization\/}: recording the WG's decisions,
   leading towards the proposal of new math font encodings and
   related standards.

\item {\em Implementation\/}: designing
   software to support the new encodings.

\end{enumerate}
These are only rough suggestions, all better suggestions welcomed!
We might want to break each task down into subtasks.
Organization could include:
\begin{itemize}

\item {\em Statement of purpose\/}: a one-page document setting out the
   WG's aims.

\item {\em Outlining goals\/}: general papers like this one.

\item {\em Setting timetables\/}: completion dates for these
   goals.

\end{itemize}
Requirements analysis could include:
\begin{itemize}

\item {\em Common mathematical usage\/}: what features
   are common across different subjects?

\item {\em Specific mathematical
   usage\/}: what features are specific to particular
   subjects?  (For example setting of scripts on roman letters in
   chemistry, multiletter identifiers in computer science\ldots)

\item {\em Non-mathematical usage\/}: what is math mode used for other
   than for mathematics?  (For example, setting computer programs,
   fractions, footnote markers, trademark signs\ldots)

\item {\em Compatability\/}: how compatible should a new encoding be with
   Knuth's?

\item {\em Extensions\/}: what new symbols and other features
   are users crying out for?

\item {\em Non-CM fonts\/}: what are the requirements for users of non-CM
   fonts (for example PostScript outline fonts).

\end{itemize}
Technical studies could include:
\begin{itemize}

\item {\em The current state of \TeX\/}: what are the good and bad points
   of \TeX's current mathematical typesetting?

\item {\em The limitations of \TeX\/}: what restrictions does \TeX\
   make to mathematical typesetting?  (For example, the math spacing
   table in Chapter 18 of \TB\ is hard-wired, Appendix~G of \TB\
   overloads many font dimensions\ldots)

\item {\em Prototype implementations\/}: each part of the standard should
   be $\alpha$-tested before standardization.

\item {\em Studying requirements\/}: work on problems suggested by the
   requirements analysis task.

\end{itemize}
Standardization could include:
\begin{itemize}

\item {\em Font encodings\/}: this is probably the most important
   point!

\item {\em Encoding vectors\/}: naming all the symbols as PostScript
   encoding vectors.

\item {\em Font information\/}: any new font dimensions, kerning
   information, charlists, and so on.

\item {\em (\La)\TeX\ interface\/}: how the fonts can be used in
   (\La)\TeX, for example giving default control sequence names for
   each glyph.

\end{itemize}
Implementation could include:
\begin{itemize}

\item {\em \slMF\ programs\/}: implementing of the encodings using
   character shapes based on \verb|cmmi|, \verb|cmsy| and \verb|cmex|.

\item {\em \TeX\ programs\/}: a replacement for \verb|plain.tex|, and
   document styles for using the font encodings with \LaTeX.

\item {\em VPL manipulation tools\/}: to help install Non-CM fonts, we
   may need general virtual font manipulators.

\item {\em Benchmarks\/}: equivalents of the \verb|trip.tex|
   and \verb|testfont.tex| tests for the new encodings.

\end{itemize}

\makesignature

\end{document}

%%% ====================================================================
%%%  @LaTeX-file{
%%%     author          = "Alan Jeffrey",
%%%     version         = "0.01",
%%%     date            = "28 July 1993",
%%%     time            = "14:59:56 BST",
%%%     filename        = "arrowreq.tex",
%%%     address         = "School of Cognitive and Computing Sciences
%%%                        University of Sussex
%%%                        Brighton BN1 9QH
%%%                        UK",
%%%     telephone       = "+44 273 606755 x 3238",
%%%     FAX             = "+44 273 678188",
%%%     checksum        = "48808 181 567 6237",
%%%     email           = "alanje@cogs.sussex.ac.uk",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "companion font TeX",
%%%     supported       = "yes",
%%%     abstract        = "This is a requirements analysis document for a
%%%                        companion text font"
%%%     docstring       = "The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%     package         = "stands alone",
%%%     dependencies    = "none",
%%%  }
%%% ====================================================================
%
% 28 Jul 1993, v0.01: Finished v0.01.
%
% Copyright 1993 Alan Jeffrey.

\documentstyle{ltugboat}

\title{Requirements for setting math arrows}
\author{Alan Jeffrey}
\address{University of Sussex}
\netaddress{alanje@cogs.susx.ac.uk}

\def\rtitlex{MFG discussion document}
\def\midrtitle{{\sl Task 2:
   Requirements analysis\/}}
\setcounter{page}{1}

\def\ignore#1{}

\def\T#1{$\fam0 T_{#1}$}
\def\X#1{$\fam0 X_{#1}$}
\def\psname#1{{\normalshape $\langle$#1$\rangle$}}
\def\psnon#1{{\it $\langle$#1\/$\rangle$}}
\def\errorglyph{{\vrule width 0.5em height 0.5em depth0em}}

\font\msamten=msam10
\def\msam#1{{\msamten\char"#1}}

\makeatletter % Stuff nicked from my .sty file.

\def\goesto{\@transition\rightarrowfill}

\def\@transition#1{\@ifnextchar[{\@@transition{#1}}{\@@transition{#1}[]}}
\newbox\@transbox
\newbox\@arrowbox
\@ifundefined{Rightarrowfill}
   {\def\Rightarrowfill{$\m@th\mathord=\mkern-6mu%
      \cleaders\hbox{$\mkern-2mu\mathord=\mkern-2mu$}\hfill
      \mkern-6mu\mathord\Rightarrow$}}
   {}
\def\@@transition#1[#2]%
   {\setbox\@transbox\hbox
      {\strut\hskip0.25em$\scriptstyle#2$\hskip0.25em}
   \ifdim\wd\@transbox<1.5em
      \setbox\@transbox\hbox to 1.5em{\hfil\box\@transbox\hfil}\fi
   \setbox\@arrowbox\hbox to \wd\@transbox{#1}
   \ht\@arrowbox\z@\dp\@arrowbox\z@
   \setbox\@transbox\hbox{$\mathop{\box\@arrowbox}\limits^{\box\@transbox}$}
   \ht\@transbox\z@\dp\@transbox\z@
   \mathrel{\box\@transbox}}

\makeatother

\begin{document}

\maketitle

\section{Introduction}

This document takes a brief look at the requirements for setting arrows
in math mode.  Arrows are used as mathords, as binary operators as
binary relations, as delimiters, and as accents, for example:
\[
   (X = \vec Y) \Rightarrow ({\rightarrow}) : X^2 \mathbin\rightarrow \vec Y
\]
and:
\[
   \left\uparrow\begin{array}{c} a \\ b \\ c \end{array}\right\downarrow
\]
In addition, arrows are often extended, and such extensions may be
arbitrarily long, for example:
\[
   D \goesto[f \circ ()_\bot \circ ({\rightarrow})  \circ \Delta] D
\]
Arrows may also be negated, for example:
\[
   P \not\rightarrow P
\]
In this document, we'll just consider arrows in math mode (rather than
used in pictures such as commuting diagrams).  The arrow accents will be
left for the accents document.

\section{A survey of arrows}

The following arrows are used in mathematics, there are probably more:
\begin{center}
${-}\!\vcenter{\hbox{$\scriptstyle\triangleright$}}$
$\vcenter{\hbox{$\scriptstyle\triangleleft$}}\!{-}\!
   \vcenter{\hbox{$\scriptstyle\triangleright$}}$
${-}\!\vcenter{\hbox{$\scriptstyle\bullet$}}$    \ignore{arrowrightbullet}
$\vcenter{\hbox{$\scriptstyle\bullet$}}\!{-}\!\vcenter{\hbox{$\scriptstyle\bullet$}}$
${-}\!\vcenter{\hbox{$\scriptstyle\circ$}}$
$\vcenter{\hbox{$\scriptstyle\circ$}}\!{-}\!\vcenter{\hbox{$\scriptstyle\circ$}}$
$\vcenter{\hbox{$\scriptstyle\circ$}}\!{-}\!\vcenter{\hbox{$\scriptstyle\bullet$}}$
$\Rightarrow$ \ignore{arrowrightdbl}
$\Leftrightarrow$
$\hookrightarrow$ \ignore{arrowrighthook}
$\mapsto$ \ignore{arrowrightmapsto}
$\rightarrow$ \ignore{arrowright}
$\leftrightarrow$ \\
$\rightharpoondown$ \ignore{harpoonrightdown}
$\rightharpoonup$ \ignore{harpoonrightup}
\msam{0A} \ignore{harpoonrightupharpoonleftdown}
\msam{10} \ignore{arrowrightheadright}
\msam{13} \ignore{arrowrightarrowright}
\msam{1A} \ignore{arrowrightheadleft}
\msam{1A}$\!\!\!\!\!\rightarrow$ \ignore{arrowrightheadleftheadright}
\msam{1D} \ignore{arrowrightarrowleft}
\msam{20} \ignore{arrowrightcurly}
\msam{21}
\msam{23} \ignore{arrowrightturn}
\msam{56} \ignore{arrowrighttrpl}
\end{center}
Each of these is used mirrored around the vertical axis, extended,
and negated.  The following are used facing vertically:
\begin{center}

$\uparrow$ \ignore{arrowup}
$\updownarrow$
$\Uparrow$ \ignore{arrowupdbl}
$\Updownarrow$
\msam{16} \ignore{arrowupharpoonright}
\msam{18} \ignore{arrowupharpoonleft}

\end{center}
Each of these is used mirrored around the horizontal axis,
extended and negated.  The following are used facing diagonally:
\begin{center}

$\uparrow$ \ignore{arrowne}
$\updownarrow$
$\Uparrow$ \ignore{arrownedbl}
$\Updownarrow$

\end{center}
Each of these is used facing north-east, south-east, south-west and
north-west, with two-headed versions, extended and negated.  There are
rare uses of north-north-east, north-north-west, south-south-east and
south-south-west.

There may be a demand for vertical and diagonal versions
of `\msam{20}' and `$\hookrightarrow$'.  Indeed, it would be pleasant if
all arrows were available in all eight directions, but this will probably
not be practical, and is heading in the direction of the work on category
theoretic diagrams.

\makesignature

\end{document}

%%% ====================================================================
%%%  @LaTeX-file{
%%%     author          = "Alan Jeffrey",
%%%     version         = "0.01",
%%%     date            = "28 July 1993",
%%%     time            = "20:56:10 BST",
%%%     filename        = "arrocont.tex",
%%%     address         = "School of Cognitive and Computing Sciences
%%%                        University of Sussex
%%%                        Brighton BN1 9QH
%%%                        UK",
%%%     telephone       = "+44 273 606755 x 3238",
%%%     FAX             = "+44 273 678188",
%%%     checksum        = "11651 283 1282 11130",
%%%     email           = "alanje@cogs.sussex.ac.uk",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "companion font TeX",
%%%     supported       = "yes",
%%%     abstract        = "This a technical study for arrows."
%%%     docstring       = "The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%     package         = "stands alone",
%%%     dependencies    = "msam10 ltugboat.sty",
%%%  }
%%% ====================================================================
%
% 28 Jul 1993, v0.01: Finished v0.01.
%
% Copyright 1993 Alan Jeffrey.

\documentstyle{ltugboat}

\title{Control glyphs for arrows}
\author{Alan Jeffrey}
\address{University of Sussex}
\netaddress{alanje@cogs.susx.ac.uk}

\def\rtitlex{MFG discussion document}
\def\midrtitle{{\sl Task 3:
   Technical studies\/}}
\setcounter{page}{1}

\def\T#1{$\fam0 T_{#1}$}
\def\X#1{$\fam0 X_{#1}$}
\def\psname#1{\penalty0\mbox{\normalshape $\langle$#1$\rangle$}}
\def\psnon#1{\penalty0\mbox{\it $\langle$#1\/$\rangle$}}
\def\errorglyph{{\vrule width 0.5em height 0.5em depth0em}}

\font\msamten=msam10
\def\msam#1{\leavevmode\hbox{\msamten\char"#1}}

\font\lasyten=lasy10
\def\lasy#1{\leavevmode\hbox{\lasyten\char"#1}}

\def\syntax#1{\leavevmode\hbox{\it #1}}

\begin{document}

\maketitle

\section{Introduction}

This document looks at suitable control glyphs for implementing math
arrows.  In particular, we look at ways that extensible and negated
arrows can be produced.

\section{Vertical arrows}

Vertical arrows can be accessed using the growing delimiter mechanism.
The non-negated arrows can be built with a `top', `bot' and `rep'
section, and the negated arrows can be built with a `top', `bot', `med'
and `rep' section, where the `med' section includes the negation.

\section{Horizontal arrows}

Horizontal arrows can be produced using the advanced ligature mechanism
introduced in \TeX~3.  An \syntax{arrow} is defined by:
\[
   \syntax{arrow} ::=
      \syntax{leftarrow} \: \syntax{rightarrow} \: \syntax{extarrow}^*
\]
A \syntax{leftarrow} is the leftmost part of an arrow, that is the tail
of a rightwards-pointing arrow or the head of a leftwards-pointing
arrow.  For example, the \syntax{leftarrow} of `$\mapsto$' is
\psnon{leftarrowmapsto} and the \syntax{leftarrow} of `$\leftrightarrow$' is
\psnon{leftarowhead}.  A \syntax{leftarrow} is one of:
\begin{itemize}

\item \psnon{leftarrownone} There is nothing on the left of the arrow,
   for example `$\rightarrow$' or `\msam{13}'.

\item \psnon{leftarrowhead} There is a single arrowhead on the left of
   this arrow, for example `$\leftrightarrow$' or `$\hookleftarrow$'.

\item \psnon{leftarrowdblhead} There is a double arrowhead on the left of
   this arrow, for example `$\Leftarrow$' or `$\Leftrightarrow$'.

\item \psnon{leftarrowtrplhead} There is a triple arrowhead on the left
   of this arrow, for example `\msam{57}' or `\msam{57}\kern-2pt\msam{56}'.

\item \psnon{leftarrowmapsto} There is a flat bar on the left of this
   arrow, for example `$\mapsto$'.

\item \psnon{leftarrowhook} There is a hook on the left of this arrow,
   for example `$\hookrightarrow$'.

\item \psnon{leftarrowharpoonup} There is an upwards harpoon on the left
   of this arrow, for example `$\leftharpoonup$'.

\item \psnon{leftarrowharpoondown} There is a downwards harpoon on the
   left of this arrow, for example `$\leftharpoondown$'.

\item \psnon{leftarrowharpoondblup} There is an upwards harpoon on the
   left of this double arrow, for example `\msam{0B}'.

\item \psnon{leftarrowharpoondbldown} There is a downwards harpoon on the
   left of this double arrow, for example `\msam{0A}'.

\item \psnon{leftarrowheaddbl} There are two arrowheads on the left of
   this single arrow, for example `\msam{11}'.

\item \psnon{leftarrowdblheaddbl} There are two arrowheads on the left of
   this double arrow, for example `\msam{12}'.

\item \psnon{leftarrowdblheadup} There is an arrowhead on the top left of
   this double arrow, for example `\msam{1C}'.

\item \psnon{leftarrowdblheaddown} There is an arrowhead on the bottom
   left of this double arrow, for example `\msam{1D}'.

\item \psnon{leftarrowrighthead} There is a rightwards arrowhead on the
   left of this arrow, for example `\msam{1A}'.

\item \psnon{leftarrowcurlyhead} There is an arrowhead with a curly line
   leading out of it on the left of this arrow, for example `\msam{21}'

\item \psnon{leftarrowturn} There is a turn on the left of this arrow, for
   example `\msam{23}'.

\item \psnon{leftarrowcirc} There is an open circle on the left of this
   arrow, for example `$\vcenter{\hbox{$\scriptstyle\circ$}}\!-$'.

\item \psnon{leftarrowbullet} There is a closed circle on the left of this
   arrow, for example `$\vcenter{\hbox{$\scriptstyle\bullet$}}\!-$'.

\item \psnon{leftarrowtriangle} There is an open triangle on the left of this
   arrow, for example `$\vcenter{\hbox{$\scriptstyle\triangleleft$}}\!-$'.

\end{itemize}
A \syntax{rightarrow} has the same possibilities, visually mirrored
around the vertical axis, and with `\syntax{left}' swapped with
`\syntax{right}'.  For example:
\begin{itemize}

\item[$\rightarrow$] is \psnon{leftarrownone}\psnon{rightarrowhead}.

\item[$\leftrightarrow$] is \psnon{leftarrowhead}\psnon{rightarrowhead}.

\item[$\vcenter{\hbox{$\scriptstyle\bullet$}}\!\!$\msam{22}]
   is \psnon{leftarrowbullet}\psnon{rightarrowturn}.

\end{itemize}
These arrows can be extended using \syntax{extarrow} glyphs, which say
how many extension pieces to put into the arrow.  An \syntax{extarrow} is
one of:
\begin{itemize}

\item \psnon{extarrowone} which extends the arrow.
\item \psnon{extarrowneg} which negates the arrow.
\item \psnon{extarrowoneneg} which extends the arrow and negates it.

\end{itemize}
If there is a negation, it should come in the middle of the list of
extensions, for example:
\begin{raggedright}\begin{description}

\item[$\not\Leftrightarrow$] is \psnon{leftarrowdblhead}\psnon
   {rightarrowdblhead}\psnon{extarrowneg}.

\item[$\Leftarrow\!\!\not\,\Rightarrow$]
   is \psnon{leftarrowdblhead}\psnon
   {rightarrowdblhead}\psnon{extarrowoneneg}.

\item[$\Leftarrow\!\not\Longrightarrow$]
   is \psnon{leftarrowdblhead}\psnon
   {rightarrowdblhead}\psnon{extarrowone}\psnon{extarrowneg}\psnon
   {extarrowone}.

\end{description}\end{raggedright}%
Note that not every font will be able to produce every combination of
\syntax{leftarrow} and \syntax{rightarrow}, for example some pi fonts do
not allow $\mapsto$ to be extended.  In fact, some of the combinations
make no sense, such as \psnon{leftarrowhook}\psnon{rightarrowdblhead}.
Such nonexistent arrows should be set with an eye-catching error glyph
such as `\errorglyph' and if possible should put a `Warning:' special
into the \verb|dvi| file.

We should not specify anything about the appearance of these control
glyphs, which should give font implementors enough freedom to convert
most pi fonts into this encoding.  One possible implementation of these
control glyphs is by ligaturing and kerning, for example by using the
ligatures:
\begin{eqnarray*}
   \lefteqn{\psnon{leftarrowhead} \psnon{rightarrowhead}} \\&
   \rightarrow & \psnon{leftrightarrow} \\
   \lefteqn{\psnon{leftrightarrow}\psnon{extarrowone}} \\&
   \rightarrow & \psnon{leftrightarrow}\psnon{rightarrow} \\
   \lefteqn{\psnon{leftrightarrow}\psnon{rightarrow}} \\&
   \rightarrow & \psnon{leftarrow}\psnon{rightarrow} \\
   \lefteqn{\psnon{rightarrow}\psnon{extarrowone}} \\&
   \rightarrow & \psnon{rightarrow}\psnon{rightarrow} \\
   \lefteqn{\psnon{rightarrow}\psnon{rightarrow}} \\&
   \rightarrow & \psnon{arrowext}\psnon{rightarrow}
\end{eqnarray*}
and appropriate kerns for:
\begin{center}
   \psnon{leftarrow}\psnon{rightarrow} \\
   \psnon{arrowext}\psnon{rightarrow}
\end{center}
then the `arrow-building kit' will build any length of
`$\leftrightarrow$' that is required, for example:
\begin{verbatim}
   \def\longrightarrow{\mathrel
      {\leftarrowheadchar
         \rightarrowheadchar
         \arrowextonechar}}
\end{verbatim}
Note that as long as the user does
not use the control glyphs of type mathord in their document, the
ligtable will never be used (rule 14 of Appendix G) and so input such as:
\begin{verbatim}
   {\rightarrow} \rightarrow
\end{verbatim}
will not unexpectedly ligature to something else.  There are a few
features missing from these control glyphs:
\begin{itemize}

\item The simpler arrows should be in fixed slots, so that they can be
   accessed quickly through a \verb|\mathchardef|.  We should ensure that
   this \verb|\mathchardef| is always of type mathrel, otherwise strange
   ligaturing might happen.

\item There is currently no syntax for accessing the negation glyphs on
   their own, which are necessary for building negated arrow leaders
   similar to \verb|\arrowfill|.

\end{itemize}
There are eight other `arrowlike' glyphs that are defined as
special glyphs, and do not fit into the `arrow-building kit'. These are
`\msam{08}', `\msam{09}', `\msam{1E}', `\msam{1F}', `\msam{4B}',
`\msam{4C}', `$\vec{x}$' and
`$\vcenter{\hbox{$\scriptstyle\leftrightarrow$}\kern-2ex\hbox{$-$}\kern-.5ex}$'.
These glyphs should be accessed directly.

All that these control glyphs are doing is simulating the extensible
vertical glyphs such as the growing delimiters.  If there were a
horizontal equivalent of growing delimiters then no such trickery would
be required!

\section{Diagonal arrows}

There is no easy way to build diagonal extended arrows.  All the font can
do is provide the building blocks, and leave \TeX\ macros to build the
arrows.  The font standard should specify how each of the diagonal
extended arrows is to be constructed, and any font dimensions that will
be necessary for the task.

\section{Conclusions}

Setting extensible vertical arrows with \TeX\ is simple, since the
growing delimiter mechanism already supports it.  Setting growing
horizontal arrows is trickier, and requires clever ligtable programming,
but it can still be done inside the font, and without use of \TeX\
macros.  Setting diagonal arrows can only be done by brute force and
\TeX\ programming.

\makesignature

\end{document}