\chapter{Additional Information}
\label{addl-info}
\realsections

Unlike the previous chapters of this document, \ref{addl-info} does
not contain new symbol tables.  Rather, it provides additional help in
using the \doctitle.  First, it draws attention to symbol names used
by multiple packages (\ref{sym-name-clashes}).  Next, it explains how
variable-sized mathematical symbols operate (\ref{resizing-symbols}).
\ref{package-notes} provides per-package information that may be
helpful in using the package.  The next section
(\ref{combining-symbols}) offers some guidelines for finding symbols
and gives some examples regarding how to construct missing symbols out
of existing ones.  The following two sections relate to math mode: a
discussion of the spacing surrounding symbols in math mode
(\ref{math-spacing}) and a showcase of different ways to embolden
mathematical symbols (\ref{bold-math}).  After that, the chapter
presents an \ascii and Latin~1 quick-reference guide
(\ref{ascii-quickref}), showing how to enter all of the standard
\ascii/Latin~1 symbols in \latex{}.  In a similar vein, direct input
of Unicode\index{Unicode} characters is covered in
\ref{unicode-chars}.  Finally, the chapter lists some statistics about
this document itself (\ref{about-doc}) and states in
\ref{copyright-license} the legal terms that apply to the document.

\section{Symbol Name Clashes}
\label{sym-name-clashes}

% Rather than create a rat's nest of \if statements, we keep the table
% whole and have each symbol conditionally appear.
\makeatletter
\DeclareRobustCommand{\trysym}[1]{\@ifundefined{#1}{\mbox{\tiny N/A}}{\csname#1\endcsname}}
\makeatother

Unfortunately, a number of symbol names are not unique; they appear in
more than one package.  Depending on how the symbols are defined in
each package, \latex{} will either output an error message or replace
an earlier-defined symbol with a later-defined symbol.
\vref{name-clashes} presents a small selection of name clashes that
appear in this document.
\ifcomplete
\else
  The symbol ``\trysym{NONEXISTENT}'' is used to indicate that the
  corresponding package was not available when \selftex was compiled.
\fi

\begin{nonsymtableL}{Symbol Name Clashes}
\index{check marks}
\label{name-clashes}
\begin{tabular}{@{}lp{0.3em}cccccccccc@{}} \toprule
  Symbol && \latexE & \AMS & \ST & \WASY & \ABX & \MARV & \DING & \IFS & \ARK & \WIPA \\
  \cmidrule(r){1-1}\cmidrule(l){3-12}
  %
  \cmdI[$\trysym{baro}$ vs.\ \trysym{WSUbaro}]{\baro} &&
    & & $\trysym{baro}$ & & & & & & & \trysym{WSUbaro} \\
  \cmdI[$\string\bigtriangledown$ vs.\ $\trysym{STbigtriangledown}$]{\bigtriangledown} &&
    $\bigtriangledown$ & & $\trysym{STbigtriangledown}$ \\
  \cmdI[$\string\bigtriangleup$ vs.\ $\trysym{STbigtriangleup}$]{\bigtriangleup} &&
    $\bigtriangleup$ & & $\trysym{STbigtriangleup}$ \\
  \cmdI[\trysym{checkmark} vs.\ \trysym{ARKcheckmark}]{\checkmark} &&
    & \trysym{checkmark} & & & & & & & \trysym{ARKcheckmark} \\
  \cmdI[\trysym{Circle} vs.\ \trysym{ifsCircle}]{\Circle} &&
    & & & \trysym{Circle} & & & & \trysym{ifsCircle} \\
  \cmdI[\trysym{Cross} vs.\ \trysym{dingCross} vs.\ \trysym{ifsCross}]{\Cross} &&
    & & & & & \trysym{Cross} & \trysym{dingCross} & \trysym{ifsCross} \\
  \cmdI[$\trysym{ggg}$ vs.\ $\trysym{ABXggg}$]{\ggg} &&
    & $\trysym{ggg}$ & & & $\trysym{ABXggg}$ \\
  \cmdI[\trysym{Letter} vs.\ \trysym{ifsLetter}]{\Letter} &&
    & & & & & \trysym{Letter} & & \trysym{ifsLetter} \\
  \cmdI[$\trysym{STlightning}$ vs.\ \trysym{WASYlightning}]{\lightning}\index{lightning} &&
    & & $\trysym{STlightning}$ & \trysym{WASYlightning} \\
  \cmdI[\trysym{Lightning} vs.\ \trysym{ifsLightning}]{\Lightning} &&
    & & & & & \trysym{Lightning} & & \trysym{ifsLightning} \\
  \cmdI[$\trysym{lll}$ vs.\ $\trysym{ABXlll}$]{\lll} &&
    & $\trysym{lll}$ & & & $\trysym{ABXlll}$ \\
  \cmdI[\trysym{Square} vs.\ \trysym{dingSquare} vs.\ \trysym{ifsSquare}]{\Square} &&
    & & & \trysym{Square} & & & \trysym{dingSquare} & \trysym{ifsSquare} \\
  \index{suns}%
  \cmdI[\trysym{Sun} vs.\ \trysym{ifsSun} vs.\ $\trysym{ABXSun}$]{\Sun} &&
    & & & & $\trysym{ABXSun}$ & \trysym{Sun} & & \trysym{ifsSun} \\
  \cmdI[\trysym{TriangleDown} vs.\ \trysym{ifsTriangleDown}]{\TriangleDown} &&
    & & & & & & \trysym{TriangleDown} & \trysym{ifsTriangleDown} \\
  \cmdI[\trysym{TriangleUp} vs.\ \trysym{ifsTriangleUp}]{\TriangleUp} &&
    & & & & & & \trysym{TriangleUp} & \trysym{ifsTriangleUp} \\
  \bottomrule
\end{tabular}
\end{nonsymtableL}

Using multiple symbols with the same name in the same document---or
even merely loading conflicting symbol packages---can be tricky but,
as evidenced by the existence of \ref{name-clashes}, not
impossible.  The general procedure is to load the first package,
rename the conflicting symbols, and then load the second package.
Examine the \latex{} source for this document (\selftex) for examples
of this and other techniques for handling symbol conflicts.  Note that
\selftex's \cmd{\savesymbol} and \cmd{\restoresymbol} macros have been
extracted into the \pkgname{savesym} package, which can be downloaded
from \CTAN.

\ifTX

\TX\ and \PX\ redefine a huge number of symbols---essentially, all of
the symbols defined by \pkgname{latexsym}, \TC, the various \AMS\
symbol sets, and \latexE\ itself.
\ifABX
  Similarly, \ABX\ redefines a vast number of math symbols in an
  attempt to improve their look.  The \TX, \PX, and \ABX\ conflicts
\else
  The \TX\ and \PX\ conflicts
\fi
are not listed in \ref{name-clashes} because they are designed
to be compatible with the symbols they replace.
\vref{benign-clash} illustrates what ``compatible'' means in
this context.

\begin{nonsymtable}{Example of a Benign Name Clash}
\label{benign-clash}
\begin{tabular}{@{}lcc@{}} \toprule
& Default & \TX \\
\multicolumn{1}{c}{\raisebox{1ex}[0pt][0pt]{Symbol}} &
(\PSfont{Computer Modern}) &
(\PSfont{Times Roman}) \\ \cmidrule(r){1-1}\cmidrule(l){2-3}
\texttt{R} & \Huge R & {\fontfamily{txr}\selectfont \Huge R} \\
\cmdI{\textrecipe} & \Huge\textrecipe &
  {\fontfamily{txr}\selectfont \Huge\textrecipe} \\
\bottomrule
\end{tabular}
\end{nonsymtable}

To use the new \TXPX\ symbols without altering the document's main
font, merely reset the default font\index{font families} families back
to their original values after loading one of those packages:

\begin{verbatim}
   \renewcommand\rmdefault{cmr}
   \renewcommand\sfdefault{cmss}
   \renewcommand\ttdefault{cmtt}
\end{verbatim}

\fi   % TX test


\section{Resizing symbols}
\label{resizing-symbols}

Mathematical symbols listed in this document as
``variable-sized\idxboth{variable-sized}{symbols}'' are designed to
stretch vertically.  Each
variable-sized\idxboth{variable-sized}{symbols} symbol comes in one or
more basic sizes plus a variation comprising both stretchable and
nonstretchable segments.  \vref{var-sized-syms} presents the symbols
\cmdX{\}} and \cmdX{\uparrow} in their default size, in their
\cmd{\big}, \cmd{\Big}, \cmd{\bigg}, and \cmd{\Bigg} sizes, in an even
larger size achieved using \cmd{\left}\slash\cmd{\right}, and---for
contrast---in a large size achieved by changing the font size using
\latexE's \cmd{\fontsize} command.  Because the symbols shown belong
to the \PSfont{Computer Modern} family\index{font families}, the
\pkgname{type1cm} package needs to be loaded to support font sizes
larger than 24.88\,pt.

\begin{nonsymtable}{Sample resized delimiters}
\idxboth{variable-sized}{symbols}
\label{var-sized-syms}
\newcommand{\maketall}[1]{\ensuremath{\left.\rule{0pt}{1.5cm}\right#1}}
\newcommand{\makebig}[1]{\fontsize{3cm}{3cm}\selectfont\ensuremath{#1}}
\begin{tabular}{@{}*8c@{}}
  \toprule
  Symbol &
  Default size &
  \cmd{\big} &
  \cmd{\Big} &
  \cmd{\bigg} &
  \cmd{\Bigg} &
  \cmd{\left}\,/\,\cmd{\right} &
  \cmd{\fontsize} \\
  \midrule

  \verb|\}| &
  $\}$ &
  $\big\}$ &
  $\Big\}$ &
  $\bigg\}$ &
  $\Bigg\}$ &
  \maketall\} &
  \makebig\} \\

  \index{arrows}%
  \verb|\uparrow| &
  $\uparrow$ &
  $\big\uparrow$ &
  $\Big\uparrow$ &
  $\bigg\uparrow$ &
  $\Bigg\uparrow$ &
  \maketall\uparrow &
  \makebig\uparrow \\
  \bottomrule
\end{tabular}
\end{nonsymtable}

Note how \cmd{\fontsize} makes the symbol wider and thicker.  (The
\pkgname{graphicx} package's \cmd{\scalebox} or \cmd{\resizebox}
commands would produce a similar effect.)  Also, the
\cmd{\fontsize}-enlarged symbol is vertically centered relative to
correspondingly large text, unlike the symbols enlarged using
\cmd{\big} et al.\ or \cmd{\left}\slash\cmd{\right}, which all use the
same math axis regardless of symbol size.  However, \cmd{\fontsize} is
not limited to mathematical delimiters.  Also, \cmd{\scalebox} and
\cmd{\resizebox} are more robust to poorly composed symbols (e.g.,~two
symbols made to overlap by backspacing a fixed distance) but do not
work with every \tex backend and will produce jagged symbols when
scaling a bitmapped font.

\ifhavemultirow

All variable-sized delimiters are defined (by the corresponding
\fileext{tfm} file) in terms of up to five segments, as illustrated by
\vref{extensible-brace}.  The top, middle, and bottom segments
are of a fixed size.  The top-middle and middle-bottom segments (which
are constrained to be the same character) are repeated as many times
as necessary to achieve the desired height.

\begin{figure}[htbp]
\centering
\renewcommand{\arraystretch}{2}
\newcommand{\cmexchar}{\usefont{OMX}{cmex}{m}{n}\selectfont\char}
\newlength{\braceheight}
\setlength{\braceheight}{6.5\baselineskip}
\begin{tabular}{@{}ccl@{}}
  \multirow{5}*{$\left.\rule{0pt}{\braceheight}\right\}
    \longrightarrow$\index{arrows}}
  & \cmexchar'71 & top \\
  & \cmexchar'76 & top-middle (repeatable) \\
  & \cmexchar'75 & middle \\
  & \cmexchar'76 & middle-bottom (repeatable) \\
  & \cmexchar'73 & bottom \\
  \\
\end{tabular}
\idxboth{extensible}{symbols}
\caption{Implementation of variable-sized delimiters}
\label{extensible-brace}
\end{figure}

\fi    % havemultirow test


\section{Package-specific usage notes}
\label{package-notes}

\newlength{\notewidth}
\setlength{\notewidth}{\linewidth}
\addtolength{\notewidth}{-7pc}
\addtolength{\notewidth}{-\parindent}

% Define a \packagenote...\endpackagenote pair to simplify package-note
% construction.
\newcommand*{\packagenote}[2]{%
  \csname if#1\endcsname
    \item[\csname#1\endcsname\phantomsection\label{note-#2}]
}
\let\endpackagenote=\fi

\begin{description}[
    font={\normalfont},
    listparindent=\parindent,
    leftmargin=!,
    labelwidth=8pc
  ]

  % abraces
  \packagenote{ABRACES}{abraces}
    \cmd{\aoverbrace} and \cmd{\aunderbrace} accept optional arguments
    that provide a great deal of control over the braces' appearance.
    For example, these commands can produce braces with asymmetric
    endpoints, braces that span lines, dashed braces, and multicolored
    braces.  \seedocs{\ABRACES}.
  \endpackagenote

  % academicons
  \packagenote{ACICOS}{academicons}
    \luaxemessage{\ACICOS}.
  \endpackagenote

  % actuarialangle
  \packagenote{ACTANG}{actuarialangle}
    The \ACTANG\ package additionally defines \cmdW{\angl} as
    \cmdW{\actuarialangle} with a small amount of extra space to the
    right of the accented expression under
    the~$\actuarialangle{\phantom{a}}$, \cmdX{\angln} as
    \verb|\angl{n}|, and \cmdX{\anglr} as \verb|\angl{r}|.
  \endpackagenote

  % allrunes
  \packagenote{ARUNE}{allrunes}
    \ARUNE\ symbols should appear within the argument to
    \cmd{\textarc} (for common Germanic\idxboth{Germanic}{runes}
    runes), \cmd{\textara} (for
    Anglo-Frisian\idxboth{Anglo-Frisian}{runes} runes), \cmd{\textarn}
    (for normal\idxboth{normal}{runes} runes), \cmd{\textart} (for
    short-twig\idxboth{short-twig}{runes} runes), \cmd{\textarl} (for
    staveless\idxboth{staveless}{runes} runes), \cmd{\textarm} (for
    medieval\idxboth{medieval}{runes} runes), or within a scope that
    sets, respectively, \cmd{\arcfamily}, \cmd{\arafamily},
    \cmd{\arnfamily}, \cmd{\artfamily}, \cmd{\arlfamily}, or
    \cmd{\armfamily}.  Each family presents slightly different glyphs
    and/or slightly different subsets of the available runes.  (The
    \ARUNE\ tables in this document present the common
    Germanic\idxboth{Germanic}{runes} runes.)  \seedocs{\ARUNE}.
  \endpackagenote

  % arcs
  \packagenote{ARCS}{arcs}
    The accents shown in \vref{arcs-accents} scale only to a few
    characters wide.  An optional macro argument alters the effective
    width of the accented characters.  \seedocs{\ARCS}.

    Circa 2013, an incompatibility arose between the \ARCS\ package
    and the \pkgname{relsize} package, upon which \ARCS\ depends.  As
    a workaround, one should apply the patch proposed by
    \person{Michael}{Sharpe} on the \xetex\ mailing list (Subject:
    ``\href{https://tug.org/pipermail/xetex/2013-August/024674.html}{The
      arcs package}'', dated 2013/08/25) to prevent spurious text from
    being added to the document (as in, ``5.0pt\overarc{A}'' when
    ``\overarc{A}'' is expected).  Furthermore, \ARCS\ has been
    observed to hang when used with optically\idxboth{optical}{font
      scaling} scaled fonts set at somewhat small sizes
    (e.g.,~\PSfont{Computer Modern} 10\,pt.).
  \endpackagenote

  % asapsym
  \packagenote{ASAP}{asapsym}
    \luaxemessage{\ASAP}.
  \endpackagenote

  % ascii
  \packagenote{ASCII}{ascii}
    Code Page~437 (CP437), which was first utilized by the original
    IBM~PC, uses the symbols \cmdI[\string\SOH]{\SOH} through
    \cmdI[\string\US]{\US} to depict \ascii characters~1--31 and
    \cmdI[\string\DEL]{\DEL} to depict \ascii character~127.  The
    \cmdI[\string\NUL]{\NUL} symbol, not part of CP437, represents
    \ascii character~0.  \cmdI[\string\NBSP]{\NBSP}, also not part of
    CP437, represents a nonbreaking space.
    \cmdI[\string\splitvert]{\splitvert} is merely the ``$|$''
    character drawn as it was on the IBM~PC.
  \endpackagenote

  % bartel-chess-fonts
  \packagenote{BARTEL}{bartel}
    In addition to the \texttt{fselch} font showcased in
    \vref{bartel}, \BARTEL\ also provides a \texttt{pkelch} font which
    includes the same symbol set (minus some of the higher-numbered
    characters) but drawn in a slightly different style.

    \BARTEL\ provides the \texttt{fselch} and \texttt{pkelch} fonts in
    various sizes (optically\idxboth{optical}{font scaling} scaled).
    See ``\latexE Font Selection''~\cite{fntguide} for advice on how
    to expose these sorts of fonts to \latex using
    \cmd{\DeclareFontFamily} and \cmd{\DeclareFontShape}.

  \endpackagenote

  % bclogo
  \packagenote{BCLOGO}{bclogo}
    All \BCLOGO\ symbols are implemented with \TikZ\ (or
    alternatively, \PSTricks) graphics, not with a font.
  \endpackagenote

  % begriff
  \packagenote{BEGRIFF}{begriff}
    The \BEGRIFF\ package contains additional commands for typesetting
    Frege's\index{Frege, Gottlob} Begriffsschrift notation for
    second-order logic.  \seedocs{\BEGRIFF}.
  \endpackagenote

  % bullcntr
  \packagenote{BULL}{bullcntr}
    The notation for \verb|\bullcntr| used in \vref{bullcntr} requires
    some explanation.  \verb|\bullcntr| does not take a number as its
    argument but rather a \latex\ counter, whose value it uses to
    typeset a tally marker.  ``\verb|\bullcntr{|\meta{3}\verb|}|'',
    for example, means to invoke \verb|\bullcntr| with a counter whose
    value is~3.  \verb|\bullcntr| usage is therefore akin to that of
    \latex's \cmd{\fnsymbol}.  The intention is to use
    \verb|\bullcntr| indirectly via the \pkgname{bullenum} package's
    \cmd{bullenum} environment, which is a variation on the
    \cmd{enumerate} environment that uses \verb|\bullcntr| to typeset
    the labels.

    To typeset individual tally markers, one can define a helper
    command:

\begin{verbatim}
    \newcounter{bull}
    \newcommand{\showbullcntr}[1]{%
      \setcounter{bull}{#1}%
      \bullcntr{bull}%
    }
\end{verbatim}

    \BULL's package options \optname{bullcntr}{smallctrbull},
    \optname{bullcntr}{largectrbull}, and
    \optname{bullcntr}{heartctrbull} and corresponding commands
    \cmd{\smallctrbull}, \cmd{\largectrbull}, and
    \cmd{\heartctrbull}\index{hearts} control the formatting of each
    tally marker:

    \qquad
    \begin{tabular}{@{}lccc@{}}
      & \texttt{small}
      & \texttt{large}
      & \texttt{heart}
      \\
      \verb|\bullcntr{|\meta{5}\verb|}|
      & \smallctrbull\showbullcntr{5}
      & \largectrbull\showbullcntr{5}
      & \heartctrbull\showbullcntr{5}
      \\
    \end{tabular}

    The default is \optname{bullcntr}{smartctrbull}
    (\cmd{\smartctrbull}), which maps counter values~1--5 to large pips
    and 6--9 to small pips.  It is also possible to use arbitrary
    symbols for \verb|\bullcntr|'s pips.  \seedocs{\BULL}.
  \endpackagenote

  % casiofont
  \packagenote{CASIO}{casiofont}
    All \CASIO\ symbols are intended to be used in text mode, not math
    mode.  The underlying \PSfont{CASIOClassWiz} font is not
    distributed on \CTAN\ and must be downloaded separately.
    \seedocs{\CASIO}, and be sure to download ``ClassWiz EX Models''
    (as opposed to the other calculator models) from the Casio
    website.
  \endpackagenote

  % ccicons
  \packagenote{CCICO}{ccicons}
    In addition to the symbols shown in \vref{ccico-creativecommons},
    \CCICO\ defines a set of commands for typesetting many complete
    Creative Commons licenses (i.e.,~juxtapositions of two or more of
    the \ref{ccico-creativecommons} icons).  For example, the
    \cmdI[\protect\ccbyncnd]{\ccbyncnd} command typesets the
    ``Attribution--Noncommercial--No Derivative Works''
    license~(``\ccbyncnd'').  \seedocs{\CCICO}.
  \endpackagenote

  % chemarrow
  \packagenote{CHEMB}{chemarrow}
    In addition to the symbols shown in
    \vref{chemarrow-extensible-arrows}, \CHEMB\ also provides
    \cmd{\larrowfill}, \cmd{\rarrowfill},
    \cmd{\leftrightharpoonsfill}, and \cmd{\rightleftharpoonsfill}
    macros.  Each of these takes a length argument and produces an
    arrow of the specified length.
  \endpackagenote

  % cmupint
  \packagenote{CMUPINT}{cmupint}
    \CMUPINT\ additionally provides \cmdI[\CMUPintT]{\longint},
    \cmdI[\CMUPiintT]{\longiint}, \cmdI[\CMUPointT]{\longoint}, and
    \cmdI[\CMUPoiintT]{\longoiint} commands that stretch arbitrarily
    tall.  \seedocs{\CMUPINT}.
  \endpackagenote

  % countriesofeurope
  \packagenote{COE}{countriesofeurope}
    The commands in \vref{CountriesOfEurope} work only when the
    \texttt{CountriesOfEurope} \fntfam[CountriesOfEurope] is active.
    For convenience, the package defines a
    \cmd{\countriesofeuropefamily} command that switches to that
    \fntfam.

    By default, countries are drawn in the current font size.  Hence,
    ``\verb|{\countriesofeuropefamily\France}|'' draws a nearly
    unrecognizable ``{\countriesofeuropefamily\France}''.  For clarity
    of presentation, \ref{CountriesOfEurope} scales each glyph to
    72\,pt.\ via an explicit \verb|\fontsize{72}{72}|.  An alternative
    is to specify the \optname{CountriesOfEurope}{scaled} package
    option to scale all country glyphs by a given factor of the font
    size.
  \endpackagenote

  % customdice
  \packagenote{CUSTDICE}{customdice}
    \tikznotfontmessage{\CUSTDICE}.

    An arbitrary symbol can be placed on a face instead of pips, and
    colors for the pips/symbol, face, and border all can be specified.
    \seedocs{\CUSTDICE}.
  \endpackagenote

  % cypriot
  \packagenote{CYPR}{cypriot}
    \usefontcmdmessage[\CYPR]{\textcypr}{\cyprfamily}.
    Single-character shortcuts are also supported: Both
    ``\verb+\textcypr{\Cpa\Cki\Cna}+'' and ``\verb+\textcypr{pcn}+''
    produce ``\textcypr{pcn}'', for example.  \seedocs{\CYPR}.
  \endpackagenote

  % dancers
  \packagenote{DANCE}{dancers}
    Fans of \person{Sherlock}{Holmes} mysteries will recognize the
    \DANCE\ glyphs as forming the substitution cipher featured in
    \person{Sir Arthur Conan}{Doyle}'s \emph{The Adventure of the
    Dancing Men} (1903).
  \endpackagenote

  % dice
  \packagenote{DICE}{dice}
    \DICE\ defines its symbols at a very small design size.  The
    glyphs shown in \vref{dice3d} were scaled up by a factor of four
    using \verb|\DeclareFontShape{U}{dice3d}{m}{n}{<->|
    \texttt{\textcolor{blue}{s*[4]}} \verb|dice3d}{}|.

    An alternative to using \cmd{\Pisymbol} to select a die rotation
    is to rely on some cleverness in the kerning tables provided by
    the \DICE\ font.  The individual digits ``1'' through ``6'' each
    produce the corresponding (2D) die face:
    \verb|{\usefont{U}{dice3d}{m}{n}2 2 1}| produces
    ``{\usefont{U}{dice3d}{m}{n}2 2 1}'', for example.  When followed
    by a letter ``a'' through ``d'', those pairs are kerned to produce
    a 3D die rotation with the digit specifying by the top face and
    the letter specifying one of the four possible front faces, sorted
    by increasing value.  For example,
    \verb|{\usefont{U}{dice3d}{m}{n}2a 2b 1d}| produces
    ``{\usefont{U}{dice3d}{m}{n}2a 2b 1d}''.
  \endpackagenote

  % DotArrow
  \packagenote{DOTARR}{DotArrow}
    The \DOTARR\ package provides mechanisms for lengthening the
    arrow, adjusting the distance between the arrow and its symbol,
    and altering the arrowhead\index{arrowheads}.  \seedocs{\DOTARR}.
  \endpackagenote

  % endofproof
  \packagenote{EOPROOF}{endofproof}
    \texttt{\string\wasserdicht} is implemented as an external
    PDF\index{PDF} graphic.  The command in fact typesets the symbol
    flush right on the page to signify the end of proof.  To use the
    command in inline text, simply load the underlying graphic file
    directly:

\begin{verbatim}
    \includegraphics[width=10pt]{endofproofwd}
\end{verbatim}
  \endpackagenote

  % esvect
  \packagenote{ESV}{esvect}
    \ESV\ also defines a \verb|\vv*| macro which is used to typeset
    arrows over vector variables with subscripts.  \seedocs{\ESV}.
  \endpackagenote

  % extpfeil
  \packagenote{XPFEIL}{extpfeil}
    The \XPFEIL\ package also provides a \cmd{\newextarrow} command to
    help you define your own extensible arrow symbols.
    \seedocs{\XPFEIL}.
  \endpackagenote

  % feyn
  \packagenote{FEYN}{feyn}
    All arguments to the \verb|\feyn| command that are not listed in
    \vref{feyn} produce a ``~\feyn{?}~'' symbol.

    The \FEYN\ package provides various commands for composing the
    \ref{feyn} symbols into complete Feynman diagrams.  See the
    \FEYN\ documentation for examples and additional information.
  \endpackagenote

  % figchild
  \packagenote{CHILD}{figchild}
    \tikznotfontmessage{\CHILD}.  Not shown in the \CHILD\ tables,
    each symbol takes an optional argument, which represents options
    to pass to \verb|\begin{tikzpicture}|.  \seedocs{\CHILD}.

    The \CHILD\ tables in this document omit symbols that are only
    subtly different.  For example, \vref{figchild-animals} includes
    \cmdI{\fcSnail} but not \cmdI{\fcSnailA}, which differs only in
    the eyes:

    \begin{center}
      \begin{tabular}{c@{\hspace{2cm}}c}
        \includegraphics[height=40pt,keepaspectratio]{figchild/fcSnail}
        & \includegraphics[height=40pt,keepaspectratio]{figchild/fcSnailA}
        \\
        \small\verb|\fcSnail|
        & \small\verb|\fcSnailA|
      \end{tabular}
    \end{center}
  \endpackagenote

  % fontmfizz
  \packagenote{MFIZZ}{fontmfizz}
    \luaxemessage{\MFIZZ}.
  \endpackagenote

  % fontawesome
  \packagenote{FNTAWE}{fontawesome}
    The \pkgname{fontawesome} package underwent a major change from
    version~5 to version~6.  In addition to observing a change in
    maintainers, the package (and underlying \PSfont{Font Awesome}
    font) added, removed, and renamed a substantial number of symbols.
    This version of the \doctitle\ presents only \FNTAWE\ symbols but
    provides table notes where appropriate to highlight changes from
    \FNTAWEv.
  \endpackagenote

  % frege
  \packagenote{FREGE}{frege}
    The \FREGE\ package contains additional commands for typesetting
    Frege's\index{Frege, Gottlob} Begriffsschrift notation for
    second-order logic.  \seedocs{\FREGE}.
  \endpackagenote

  % go
  \packagenote{GOPKG}{go}
    In addition to the board fragments and stones shown in \vref{go},
    \GOPKG's \cmd{\black} and \cmd{\white} commands accept numbers
    from~1 to~253 and display them circled as \GOblack{1},
    \GOblack{2}, \GOblack{3},~\dots, \GOblack{253} and \GOwhite{1},
    \GOwhite{2}, \GOwhite{3},~\dots, \GOwhite{253}, respectively.
    \cmd{\black} and \cmd{\white} additionally accept
    \cmdI[\GOsquare]{\square} and \cmdI[\GOtriangle]{\triangle} as
    arguments, producing {\usefont{U}{gofont}{b}{sl}\char126} and and
    {\usefont{U}{gofont}{b}{sl}\char127} for \cmd{\black} and
    {\usefont{U}{gofont}{m}{sl}\char126} and and
    {\usefont{U}{gofont}{m}{sl}\char127} for \cmd{\white}.

    The \GOPKG\ package is intended to typeset complete Go\index{Go
      boards} boards (goban\index{goban}).  \seedocs{\GOPKG}.
  \endpackagenote

  % halloweenmath
  \packagenote{HWMATH}{halloweenmath}
    The \HWMATH\ extensible-arrow commands (\vref{hwmath-arrows})
    always typeset the arrow in script (small) style, hence the
    ``\texttt{script}'' in their names.  Contrast the size of the
    arrowheads\index{arrowheads} in the following examples (zoomed
    3$\times$ for clarity):

    \begin{center}
      \begin{tabular}{ccc}
        \scalebox{3}{$\overrightarrow{abc}$} & \small vs. & \scalebox{3}{$\overscriptrightarrow{abc}$} \\
        \small\verb|\overrightarrow{abc}| & & \small\verb|\overscriptrightarrow{abc}| \\
      \end{tabular}
    \end{center}
  \endpackagenote

  % hamnosys
  \packagenote{HNS}{hamnosys}
    \luaxemessage{\HNS}.
  \endpackagenote

  % harmony
  \packagenote{HARM}{harmony}
    The \MSX\ package must be installed to use \HARM.
  \endpackagenote

  % harpoon
  \packagenote{HARP}{harpoon}
    All of the \HARP\ symbols are implemented using the
    \pkgname{graphics} package (specifically, \pkgname{graphics}'s
    \cmd{\resizebox} command).  Consequently, only \tex backends that
    support graphical transformations (e.g.,~\emph{not}
    Xdvi\index{Xdvi}) can properly display these symbols.
  \endpackagenote

  % hieroglf
  \packagenote{HIER}{hieroglf}
    The \HIER\ package defines alternative control sequences and
    single-letter shortcuts for each of its symbols for use within the
    argument to the \cmd{\textpmhg} command.  For example,
    ``\verb|\textpmhg{Pakin}|'' produces ``\textpmhg{Pakin}''.
    \seedocs{\HIER}.
  \endpackagenote

  % igo
  \packagenote{IGO}{igo}
    In addition to the uses shown in \vref{igo}, \IGO's
    \cmd{\blackstone} and \cmd{\whitestone} commands accept numbers
    from~1 to~99 and display them circled as \blackstone[1],
    \blackstone[2], \blackstone[3],~\dots, \blackstone[99] and
    \whitestone[1], \whitestone[2], \whitestone[3],~\dots,
    \whitestone[99], respectively.

    The \IGO\ package is intended to typeset complete Go\index{Go
      boards} boards (goban\index{goban}).  \seedocs{\IGO}.
  \endpackagenote

  % ifsym
  \packagenote{IFS}{ifsym}
    \vref{pulse-diagram} presents a variety of digital pulses.  In
    addition, within
    \verb|\textifsym{|$\ldots$\verb|}|\indexcommand{\textifsym}, the
    following codes are valid:

    \begin{center}
      \begin{tabular}{*6{ll@{\qquad}}ll}
        \textifsym{l} & l &
        \textifsym{m} & m &
        \textifsym{h} & h &
        \textifsym{d} & d &
        \textifsym{<} & \textless &
        \textifsym{>} & \textgreater &
        \textifsym{|} & \textbar \\[4pt]

        \textifsym{L} & L &
        \textifsym{M} & M &
        \textifsym{H} & H &
        \textifsym{D} & D &
        \textifsym{<<} & \textless\kern0pt\textless &
        \textifsym{>>} & \textgreater\kern0pt\textgreater \\
      \end{tabular}
    \end{center}

    This enables one to write ``\verb|\textifsym{mm<DDD>mm}|'' to get
    ``\textifsym{mm<DDD>mm}'' or ``\verb+\textifsym{L|H|L|H|L}+'' to
    get ``\textifsym{L|H|L|H|L}''.  See also the \pkgname{timing}
    package, which provides a wide variety of pulse-diagram symbols
    within an environment designed specifically for typesetting pulse
    diagrams.

    Finally, \cmd{\textifsym} supports the display of
    segmented\idxboth{segmented}{numerals} digits, as would appear on
    an LCD\idxboth{LCD}{numerals}: ``\verb|\textifsym{-123.456}|''
    produces ``\textifsym{-123.456}''.  ``\verb|\textifsym{b}|''
    outputs a blank with the same width as an ``\textifsym{8}''.
  \endpackagenote

  % JeuxCartes
  \packagenote{JCARTES}{JeuxCartes}
    \tikznotfontmessage{\JCARTES}.

    The package also provides commands for drawing complete hands.
    \seedocs{\JCARTES}.
  \endpackagenote

  % knitting
  \packagenote{KNIT}{knitting}
    The \KNIT\ package is intended to typeset complete knitting
    charts.  \seedocs{\KNIT}.

    Some symbols behave differently when used as part of a sequence.
    For example, contrast \verb|\textknit{1}|~(``\textknit{1}''),
    \verb|\textknit{11}|~(``\textknit{11}''), and
    \verb|\textknit{111}|~(``\textknit{111}'').  Similarly, contrast
    \verb|\textknit{"}|~(``\textknit{"}\,'') and
    \verb|\textknit{""}|~(``\,\textknit{""}'').  Again,
    \expandafter\MakeLowercase\seedocs{\KNIT}.
  \endpackagenote

  % knot
  \packagenote{KNOT}{knot}
    The following is an example of a basic knot, using
    \verb|\usefont{U}{knot|\meta{number}\verb|}{m}{n}| to change fonts
    for multiple characters instead of \cmd{\Pisymbol} to typeset one
    character at a time.  Note that all of the characters in the
    \KNOT\ fonts lie conveniently within the range of printable
    \ascii\ characters.

    \begingroup
    \newcommand*{\kf}[1]{\usefont{U}{knot#1}{m}{n}}
    \renewcommand{\arraystretch}{0}
    \setlength{\tabcolsep}{0.25em}
    \qquad
    \begin{tabular}{@{} >{\ttfamily}c >{\kf1}c >{\kf2}c >{\kf3}c >{\kf4}c >{\kf5}c >{\kf6}c >{\kf7}c @{}}
      \multicolumn{1}{@{}c}{Input}
      & \multicolumn{1}{c}{\ttfamily knot1}
      & \multicolumn{1}{c}{\ttfamily knot2}
      & \multicolumn{1}{c}{\ttfamily knot3}
      & \multicolumn{1}{c}{\ttfamily knot4}
      & \multicolumn{1}{c}{\ttfamily knot5}
      & \multicolumn{1}{c}{\ttfamily knot6}
      & \multicolumn{1}{c@{}}{\ttfamily knot7} \\[1ex]
      CDB & CDB & CDB & CDB & CDB & CDB & CDB & CDB \\
      FHG & FHG & FHG & FHG & FHG & FHG & FHG & FHG \\
      @EA & @EA & @EA & @EA & @EA & @EA & @EA & @EA \\
    \end{tabular}
    \endgroup

    \niceframemessage{\KNOT}, especially using characters~48--63 of
    each font variant.
  \endpackagenote

  % LaTeX base
  \item[\latex\ base\phantomsection\label{note-latex}]
    Calling log-like symbols ``symbols'' may be a bit
    misleading.\footnote{Michael\index{Downes, Michael J.} J. Downes
    prefers the more general term, ``atomic\index{atomic math objects}
    math objects''.}  Each log-like symbol merely produces the
    eponymous textual equivalent, but with proper surrounding spacing.
    See \ref{math-spacing} for more information about log-like
    symbols.  As \cmd{\bmod} and \cmd{\pmod} arguably are not symbols
    the reader is referred to the Short Math Guide for
    \latex~\cite{Downes:smg} for samples.

  % lcircuit
  \packagenote{LCIRC}{lcircuit}
    Each of the symbols shown in \vref{lcircuit} first must be defined
    via an \cmd{\input} of the corresponding \verb|.mac|~file.  For
    example, before a document can invoke \cmd{\usebox}\verb|{\nande}|
    it first must \cmd{\input}\verb|{nande.mac}|.

    All \LCIRC\ symbols are defined using a \latex\ \texttt{picture}
    environment, not with a font.
  \endpackagenote

  % linearb
  \packagenote{LINB}{linearb}
    \usefontcmdmessage[\LINB]{\textlinb}{\linbfamily}.
    Single-character shortcuts are also supported for \LINB\ letters
    (\vref{linearB}): Both ``\verb+\textlinb{\Bpa\Bki\Bna}+'' and
    ``\verb+\textlinb{pcn}+'' produce ``\textlinb{pcn}'', for example.
    \seedocs{\LINB}.
  \endpackagenote

  % logic
  \packagenote{LOGIC}{logic}
    The \LOGIC\ package implements the digital logic-gate symbols
    specified by the U.S. Department of Defense's
    MIL-STD-806\index{MIL-STD-806} standard.  Note that on \CTAN, the
    package is \emph{called} \LOGIC, but the package is \emph{loaded}
    using \verb|\usepackage{milstd}|.  (There was already
    a---completely unrelated---\pkgname{milstd} package on \CTAN at
    the time of \LOGIC's release.)  Consequently, package details are
    listed under \pkgname{milstd} in \ref{doc-characteristics} and
    \ref{package-dates}
    \vpagerefrange{doc-characteristics}{package-dates}.
  \endpackagenote

  % logix
  \packagenote{LOGIX}{logix}
    \luaxemessage{\LOGIX}.
  \endpackagenote

  % vscodeicons
  \packagenote{LUCICOS}{lucide-icons}
    All \LUCICOS\ symbols are implemented with PDF\index{PDF}
    graphics, not with a font.  Options exist for adjusting symbol
    height and depth on a per-symbol basis.  \seedocs{\LUCICOS}.
  \endpackagenote

  % magic
  \packagenote{MAGIC}{magic}
    \index{Wizards of the Coast}
    \index{Magic: The Gathering symbols=\emph{Magic: The Gathering} symbols}
    \index{symbols>Magic: The Gathering symbols=\emph{Magic: The Gathering}}
    The symbols provided by the \MAGIC\ package resemble those from
    Wizards of the Coast's \emph{Magic: The Gathering} trading-card
    game.  An alternative to entering symbols numerically using
    \cmd{\Pisymbol} is to switch to the \MAGIC\ font with
    \verb|\usefont{U}{magic}{m}{n}| and employ the following mnemonic
    characters:

    \begingroup
    \def\mchar#1{\usefont{U}{magic}{m}{n}#1 & #1}
    \qquad
    \begin{tabular}{@{}ccl@{}}
      {\usefont{U}{magic}{m}{n}0}--{\usefont{U}{magic}{m}{n}9}
      & 0--9 & Circled numerals 0--9 \\
      \mchar{B} & Black magic symbol \\
      \mchar{G} & Green magic symbol \\
      \mchar{R} & Red magic symbol \\
      \mchar{T} & Tap symbol (tilted ``T'' in a circle) \\
      \mchar{U} & Blue magic symbol \\
      \mchar{W} & White magic symbol \\
      \mchar{X} & Circled ``X'' (for mana cost, e.g.,~Fireball) \\
      \mchar{Z} & Circled ``10'' (for mana cost, e.g.,~Aladdin's Lamp) \\
    \end{tabular}
    \endgroup
  \endpackagenote

  % mahjong
  \packagenote{MAHJONG}{mahjong}
    \tikznotfontmessage{\MAHJONG}.

    The package provides means of scaling, rotating, grouping, and
    stacking tiles.  \seedocs{\MAHJONG}.
  \endpackagenote

  % maritime
  \packagenote{MTIME}{maritime}
    \tikznotfontmessage{\MTIME}.  Symbols are drawn 15 x-heights tall:

    \begin{center}
      \flagZ
    \end{center}

    Use the \pkgname{graphicx} package's \cmd{\resizebox} command to
    draw flags in different sizes.  For example,
    \verb|\resizebox{!}{2ex}{\flagZ}| produces ``\mtimesmall{Z}''.
  \endpackagenote

  % musicography
  \packagenote{MUSICOG}{musicography}
    The \MSX\ package must be installed to use \MUSICOG.
  \endpackagenote

  % newcomputermodern
  \packagenote{NEWCM}{newcomputermodern}
    \newcommand*{\NCMlang}[1]{#1\index{alphabets>#1}\index{#1}}

    Because it is based on a Unicode\index{Unicode} font,
    \luaxemessage{\NEWCM}.

    \NEWCM\ defines a rich set of mathematical symbols---covering a
    substantial number of those presented in \ref{math-symbols}---and
    relies on the \pkgname{unicode-math} package to provide the
    associated \latex\ commands.  \NEWCM\ additionally provides
    Unicode\index{Unicode} characters from an extensive set of scripts
    (Latin, \NCMlang{Greek}, \NCMlang{Cyrillic}, \NCMlang{Hebrew},
    \NCMlang{Coptic}, \NCMlang{Cherokee}, \NCMlang{Canadian
      Aboriginal}, and \NCMlang{Devanagari}), braille\index{braille}
    patterns, Aegean\index{numerals>Aegean} and
    Epact\index{numerals>Epact} numbers, currency symbols, IPA
    symbols, and more.  These are intended to be accessed via direct
    entry of Unicode\index{Unicode} characters into a document as
    opposed to via \latex\ commands.  \seedocs{\NEWCM} about all the
    various symbols the package provides.

    As a caveat, \NEWCM\ changes the document font to \PSfont{New
      Computer Modern}.  Use the \pkgname{fontspec} package instead of
    loading \NEWCM\ for more precise control over where \PSfont{New
      Computer Modern} is utilized.  For example,
    ``\verb|{\fontspec{NewCM10-Book.otf}|\linebreak[0]%
    \verb|\char"2820|\linebreak[0]%
    \verb|\char"280F|\linebreak[0]%
    \verb|\char"2801|\linebreak[0]%
    \verb|\char"2805|\linebreak[0]%
    \verb|\char"280A|\linebreak[0]%
    \verb|\char"281D}|''
    produces the braille pattern
    ``\NCMbraillecapital\NCMbrailleABCD\NCMbrailleA\NCMbrailleAC\NCMbrailleBD\NCMbrailleACDE''.
  \endpackagenote

  % old-arrows
  \packagenote{OLDARR}{old-arrows}
    The arrows provided by \OLDARR\ represent Donald\index{Knuth,
      Donald E.}  Knuth's pre-1992 \PSfont{Computer Modern} glyphs,
    which feature smaller arrowheads\index{arrowheads}.  Contrast the
    following:

    \begin{center}
      \begin{tabular}{ccc}
        \Huge $\rightarrow$ & vs. & \Huge \OLDrightarrow \\
        default & & \OLDARR \\
      \end{tabular}
    \end{center}

    \ifAMS
    \ifMTOOLS
      In addition to providing the arrows shown in \vref{old-arrows},
      \OLDARR\ reduces the arrowhead\index{arrowheads} size for
      \AMS's
      \cmdI[$\string\blackacc{\string\overleftarrow}$]{\overleftarrow},
      \cmdI[$\string\blackacc{\string\overrightarrow}$]{\overrightarrow},
      \cmdI[$\string\blackacc{\string\overleftrightarrow}$]{\overleftrightarrow},
      \cmdI[$\string\blackacc{\string\underleftarrow}$]{\underleftarrow},
      \cmdI[$\string\blackacc{\string\underrightarrow}$]{\underrightarrow},
      \cmdI[$\string\blackacc{\string\underleftrightarrow}$]{\underleftrightarrow},
      \cmdI[$\string\blackacc{\string\xleftarrow}$]{\xleftarrow},
      \cmdI[$\string\blackacc{\string\xrightarrow}$]{\xrightarrow},
      \cmdX{\varinjlim}, and \cmdX{\varprojlim} symbols
      (\vref{ams-log}, \vref{extensible-accents}, and
      \vref{ams-extensible-arrows}) and \MTOOLS's
      \cmdI[$\string\blackacc{\string\MTOOLSxleftrightarrow}$]{\xleftrightarrow},
      \cmdI[$\string\blackacc{\string\MTOOLSxhookleftarrow}$]{\xhookleftarrow},
      \cmdI[$\string\blackacc{\string\MTOOLSxhookrightarrow}$]{\xhookrightarrow},
      and \cmdI[$\string\blackacc{\string\MTOOLSxmapsto}$]{\xmapsto}
      symbols (\vref{mathtools-extensible-arrows}).
    \fi
    \fi

    With the \optname{old-arrows}{new} package option,
    \OLDARR\ prefixes all of the \ref{old-arrows} arrows with
    ``\texttt{var}'' (i.e.,~\verb|\vardownarrow|,
    \verb|\varhookleftarrow|, etc.) so both old and new glyphs can be
    used in the same document.
    %
    \incsyms\indexcommand[\string\OLDdownarrow]{\vardownarrow}%
    \incsyms\indexcommand[\string\OLDhookleftarrow]{\varhookleftarrow}%
    \incsyms\indexcommand[\string\OLDhookrightarrow]{\varhookrightarrow}%
    \incsyms\indexcommand[\string\OLDleftarrow]{\varleftarrow}%
    \incsyms\indexcommand[\string\OLDleftrightarrow]{\varleftrightarrow}%
    \incsyms\indexcommand[\string\OLDlongleftarrow]{\varlongleftarrow}%
    \incsyms\indexcommand[\string\OLDlongleftrightarrow]{\varlongleftrightarrow}%
    \incsyms\indexcommand[\string\OLDlongmapsfrom]{\varlongmapsfrom}%
    \incsyms\indexcommand[\string\OLDlongmapsto]{\varlongmapsto}%
    \incsyms\indexcommand[\string\OLDlongrightarrow]{\varlongrightarrow}%
    \incsyms\indexcommand[\string\OLDmapsfrom]{\varmapsfrom}%
    \incsyms\indexcommand[\string\OLDmapsto]{\varmapsto}%
    \incsyms\indexcommand[\string\OLDnearrow]{\varnearrow}%
    \incsyms\indexcommand[\string\OLDnearrow]{\varnearrow}%
    \incsyms\indexcommand[\string\OLDnwarrow]{\varnwarrow}%
    \incsyms\indexcommand[\string\OLDnwarrow]{\varnwarrow}%
    \incsyms\indexcommand[\string\OLDrightarrow]{\varrightarrow}%
    \incsyms\indexcommand[\string\OLDsearrow]{\varsearrow}%
    \incsyms\indexcommand[\string\OLDsearrow]{\varsearrow}%
    \incsyms\indexcommand[\string\OLDswarrow]{\varswarrow}%
    \incsyms\indexcommand[\string\OLDswarrow]{\varswarrow}%
    \incsyms\indexcommand[\string\OLDuparrow]{\varuparrow}%
    \incsyms\indexcommand[\string\OLDupdownarrow]{\varupdownarrow}%
    %
    In contrast, the \optname{old-arrows}{new} package option does not
    define a \verb|\var|\rule{2em}{1pt} version of the harpoon symbols
    shown in \vref{old-arrows-harpoons}.  Furthermore, harpoon
    arrowheads are not reduced in size (i.e.,~relative to the size of
    those shown in \vref{harpoons}).
  \endpackagenote

  % overarrows
  \packagenote{OVARS}{overarrows}
    \OVARS\ is extremely customizable.  Virtually all aspects of
    arrows---length, thickness, position, scale,
    arrowhead\index{arrowheads} style, etc.---can be modified, and new
    extensible arrows can be constructed.  \seedocs{\OVARS}.  For
    example, the documentation shows how to create extensible arrows
    like the following:

    \begin{tabular}{ll@{\qquad}ll}
      \W[\OVARSoverarchedleftrightarrow]\overarchedleftrightarrow{abc} & \W[\OVARSoverbandedarrow]\overbandedarrow{abc} \\
    \end{tabular}
  \endpackagenote

  % pdfMsym
  \packagenote{PDFMSYM}{pdfmsym}
    \PDFMSYM\ symbols are implemented with PDF\index{PDF} literals
    instead of (or sometimes in conjunction) with a font.  All symbols
    can be rendered by \pdflatex and \lualatex, some by \xelatex, and
    none by most other \tex backends.
  \endpackagenote

  % pgfornament
  \packagenote{PGFORN}{pgfornament}
    \tikznotfontmessage{\PGFORN}.  The \cmd{\pgfornament} command
    supports resizing, coloring, and rotating symbols.
    \seedocs{\PGFORN}.
  \endpackagenote

  % phonetic
  \packagenote{PHON}{phonetic}
    \begin{morespacing}{1pt}
      \fontencoding{OT1}\selectfont  % T1 messes up \acbar and \acarc.
      The \PHON\ package provides macros for linguistic accents in
      addition to those presented in \vref{phon-accents}. \cmd{\acbar}
      and \cmd{\acarc} compose characters with multiple accents; for
      example, \verb+\acbar{\'}{a}+ produces ``\acbar{\'}{a}'' and
      \verb+\acarc{\"}{e}+ produces ``\acarc{\"}{e}''.  \cmd{\labvel}
      joins two characters with an arc:
      \verb+\labvel{mn}+~$\rightarrow$ ``\labvel{mn}''.  \cmd{\upbar}
      is intended to go between characters as in
      ``\verb+x\upbar{}y''+~$\rightarrow$ ``x\upbar{}y''.  Lastly,
      \cmd{\uplett} behaves like \cmd{\textsuperscript} but uses a
      smaller font.  Contrast ``\verb+p\uplett{h}''+~$\rightarrow$
      ``p\uplett{h}'' with
      ``\verb+p\textsuperscript{h}''+~$\rightarrow$
      ``p\textsuperscript{h}''.
    \end{morespacing}
  \endpackagenote

  % pmboxdraw
  \packagenote{PMBOX}{pmboxdraw}
    Code Page~437 (CP437), which was first utilized by the original
    IBM~PC, contains the set of box-drawing symbols (sides, corners,
    and intersections of single- and double-ruled boxes) shown in
    \vref{box-drawing} in character positions~176--223.  These symbols
    also appear in the \href{https://www.unicode.org/charts/}{Unicode
      Box Drawing and Block Element tables}\index{Unicode}.

    The \PMBOX\ package draws the CP437 box-drawing symbols using \tex
    rules (specifically, \cmd{\vrule}) instead of with a font and
    thereby provides the ability to alter both rule width and the
    separation between rules.  \seedocs{\PMBOX}.
  \endpackagenote

  % prodint
  \packagenote{PRODINT}{prodint}
    \PRODINT\ currently requires the author manually to specify
    \cmdI{\prodi} for inlined expressions (\verb|$|\dots\verb|$|),
    \cmdI{\Prodi} for displayed math (\verb|\[|\dots\verb|\]|), and
    \cmdI{\PRODI} for displayed math involving tall integrands.  The
    package does not define a product integral command that scales
    automatically akin to the symbols in \ref{op}.
  \endpackagenote

  % protosem
  \packagenote{PROTO}{protosem}
    The \PROTO\ package defines abbreviated control sequences for all
    of its symbols.  In addition, single-letter shortcuts can be used
    within the argument to the \cmd{\textproto} command
    (e.g.,~``\verb|\textproto{Pakyn}|'' produces
    ``\textproto{Pakyn}'').  \seedocs{\PROTO}.
  \endpackagenote

  % realhats
  \packagenote{RHATS}{realhats}
    All hats are drawn by scaling a graphic image and placing it at an
    appropriate location.

    If \texttt{\string\hat} is used with no argument, it selects a hat
    at random.  Alternatively, a hat type can be passed as an option
    to \RHATS\ to specify the default hat.  \seedocs{\RHATS}.
  \endpackagenote

  % recycle
  \packagenote{RECYC}{recycle}
    The \MFlogo\ code that implements the \RECYC\ recycling symbols
    is, in the words of its author, ``awful code [that] doesn't even
    put the logo in a box (properly)''.  Expect to receive
    ``\texttt{Inconsistent equation (off by} \meta{number}\texttt{)}''
    errors from \MFlogo.  Fortunately, if you tell \MFlogo\ to proceed
    past those errors (e.g.,~by pressing Enter after each one or by
    specifying ``\texttt{-interaction=nonstopmode}'' on the
    \MFlogo\ command line) it should produce a valid font.

    The commands listed in \vref{recycling} should be used within a
    group (e.g.,~``\verb|{\recycle}|'') because they exhibit the side
    effect of \emph{changing} the font to the recycle font.
  \endpackagenote

  % rojud
  \packagenote{ROJUD}{rojud}
    The commands in \vref{romanian-counties} work only when the
    \texttt{rojud} \fntfam[rojud] is active.  Use the OT1 \fntenc[OT1]
    in \pdflatex and the TU \fntenc[TU] in \xelatex.
    (\ROJUD\ requires one of those two \tex\ engines.)  For example,
    ``\verb|{\usefont{OT1}{rojud}{m}{n}\jBI}|'' draws
    Bucharest\index{Bucharest}.\footnote{technically a municipality,
    not a county}
  \endpackagenote

  % rubikcube
  \packagenote{RUBIK}{rubikcube}
    \tikznotfontmessage{\RUBIK}.  In addition to the symbols shown in
    \vref{rubik-rot}, the \RUBIK\ package defines commands for
    combinations of textual and graphical representations of rotations
    (e.g.,~\cmdI{\textRubikUa} produces ``\textRubikUa'') as well as
    commands that produce colored illustrations of Rubik's Cube
    configurations and rotations.  \seedocs{\RUBIK}.
  \endpackagenote

  % sacsymb
  \packagenote{SACSYMB}{sacsymb}
    \tikznotfontmessage{\SACSYMB}.
  \endpackagenote

  % sarabian
  \packagenote{SARAB}{sarabian}
    \usefontcmdmessage[\SARAB]{\textsarab}{\sarabfamily}.
    Single-character shortcuts are also supported: Both
    ``\verb+\textsarab{\SAb\SAk\SAn}+'' and ``\verb+\textsarab{bkn}+''
    produce ``\textsarab{bkn}'', for example.  \seedocs{\SARAB}.
  \endpackagenote

  % scsnowman
  \packagenote{SCSNOW}{scsnowman}
    \cmdI[\scsnowmanFANCY]{\scsnowman} is drawn using \TikZ\@.  The command
    accepts a number of options for controlling the presence, appearance, and
    color of the snowman's body, eyes, nose, mouth, arms, hat, and more.
    \seedocs{\SCSNOW}, but the following examples showcase a subset of the
    possibilities (drawn large for clarity):

    \begin{center}
      \begin{tabular}{c@{\hspace{1cm}}c}
        \scsnowman[scale=5] &
        \scsnowmanFANCY[scale=5] \\
        \texttt{\string\scsnowman} &
        \multicolumn{1}{p{5cm}}{%
          \texttt{\string\scsnowman[\snowargs]}%
        } \\
      \end{tabular}
    \end{center}
  \endpackagenote

  % semaphor
  \packagenote{SEMA}{semaphor}
    \SEMA\ provides a \filename{semaf.fd} font-definition file.
    Instead of using \PI\ and \cmd{\Pisymbol} to typeset a glyph, a
    document can select the \SEMA\ fonts directly, although this does
    require putting \verb|\input{semaf.fd}| in the document's
    preamble.  For example, \verb|{\usefont{OT1}{smfp}{m}{n}Hello}|
    will typeset ``{\usefont{OT1}{smfp}{m}{n}Hello}''.  This can be
    useful for typesetting complete messages.  Roman, bold, monospace,
    slanted, and bold+slanted styles are all supported.

    In addition, \SEMA\ provides three variations of each font: a
    ``person'' version (\texttt{smfpr10}), which is what is
    illustrated in \vref{semaphor}, a ``pillar'' version
    (\texttt{smfr10}), which shows the flags on a pillar rather than
    being held by a person, and an ``empty'' version
    (\texttt{smfer10}), which shows only the flags and no pillar or
    person.  Contrast these variations of the letter ``H'':
    \begin{center}
      \begin{tabular}{c*4{@{\quad}c}}
        \usefont{OT1}{smfp}{m}{n}\Huge H
        & vs.
        & \usefont{OT1}{smf}{m}{n}\Huge H
        & vs.
        & \usefont{OT1}{smfe}{m}{n}\Huge H
        \\[-1ex]
        \tiny (person)
        & & \tiny (pillar)
        & & \tiny (empty)
      \end{tabular}
    \end{center}
  \endpackagenote

  % sillypage
  \packagenote{SILLY}{sillypage}
    All \SILLY\ symbols are implemented with PDF\index{PDF} graphics,
    not with a font.
  \endpackagenote

  % simpsons
  \packagenote{SIMP}{simpsons}
    The location of the characters' pupils can be controlled with the
    \cmd{\Goofy} command.  See \emph{A \MFlogo\ of `Simpsons'
    characters}~\cite{Chen1998} for more information.  Also, each of
    the commands in \vref{simpsons} can be prefixed with \cmd{\Left}
    to make the character face left instead of right:

    \begin{center}
      \begin{tabular}{ll}
        \Left\Bart & \verb|\Left\Bart| \\
      \end{tabular}
    \end{center}
  \endpackagenote

  % staves
  \packagenote{STAVE}{staves}
    The meanings of the symbols appearing in \vref{staves} are
    described on the Web site for the Museum of Icelandic Sorcery and
    Witchcraft\index{Museum of Icelandic Sorcery and Witchcraft} at
    \url{https://galdrasyning.is/en/galdrastafir/}.  For example, the
    website indicates that
    \cmdI[\protect\staveL]{\staveL}~(``\staveL'') is intended to ward
    off ghosts\index{ghosts} and evil\index{evil spirits} spirits.
  \endpackagenote

  % steinmetz
  \packagenote{STEIN}{steinmetz}
    \STEIN\ uses the \pkgname{pict2e} package to draw a horizontally
    and vertically scalable Steinmetz phasor symbol.  Consequently,
    \verb|\phase| works only with those \tex backends supported by
    \pkgname{pict2e}.  \seedocs{\pkgname{pict2e}}.
  \endpackagenote

  % stix
  \packagenote{STIX}{stix}
    By default, \STIX\ draws slanted integrals, as shown in
    \vref{stix-smint} and \vref{stix-large}.  The
    \optname{stix}{upint} package option typesets each integral
    instead as an upright version, as shown respectively in
    \vref{stix-smint-all} and \vref{stix-large-all}.  Use the
    explicitly upright integrals only when both upright and slanted
    versions of a symbol must appear in the same document.  (This is
    rare.)  Otherwise, favor the slanted integrals and use
    \optname{stix}{upint} to typeset them consistently upright
    throughout the document.
  \endpackagenote

  % symbats3
  \packagenote{SYMBATS}{symbats}
    \luaxemessage{\SYMBATS}.  The underlying \PSfont{Symbats} font is
    not distributed on \CTAN\ and must be downloaded separately.
    \seedocs{\SYMBATS}.
  \endpackagenote

  % t4phonet
  \packagenote{PHONFC}{t4phonet}
    The idea behind the \PHONFC\ package's phonetic symbols and
    text-mode accents is to provide an interface to some of the
    characters in the T4 \fntenc[T4]
    \ifFC
      (\vref{fc})
    \fi    % FC
    but using the same names as
    \ifTIPA
      the \TIPA\ characters presented in \vref{tipa-phonetic}.
    \else
      the \TIPA\ package.
    \fi    % TIPA
  \endpackagenote

  % teubner
  \packagenote{TEUB}{teubner}
    The \TEUB\ package provides a \cmd{\newmetrics} command that helps
    users combine the symbols in \vref{teubner-metric} as well as
    other \TEUB\ symbols.  For example, the predefined \cmdI{\pentam}
    symbol uses \cmd{\newmetrics} to juxtapose six \cmdI{\longa}s, two
    \cmdI{\barbbrevis}es, four \cmdI{\brevis}es, and a \cmdI{\dBar}
    into ``\pentam''. \seedocs{\TEUB}.
  \endpackagenote

  % textgreek
  \packagenote{TGRK}{textgreek}
    \TGRK\ tries to use a Greek font that matches the body text.  As a
    result, the glyphs may appear slightly different from those shown
    in this document.

    \ifUPGR
    Unlike \UPGR\ (\vref{upgreek-greek}), \TGRK\ works in text mode.
    \else
    Unlike \UPGR, \TGRK\ works in text mode.
    \fi

    \TGRK\ symbols are intended to be used sporadically
    throughout a document (e.g.,~in phrases such as
    ``\textbeta-decay'').  In contrast, \greekfontmessage.
  \endpackagenote

  % tipa
  \packagenote{TIPA}{tipa}
    \TIPA\ defines shortcuts for many of its symbols.  It also defines
    a command \cmd{\tone} for denoting tone letters (pitches).
    \seedocs{\TIPA}.
  \endpackagenote

  % tikz-cookingsymbols
  \packagenote{TIKZCOOK}{tikz-cookingsymbols}
    \tikznotfontmessage{\TIKZCOOK}.  The starred form of each symbol
    produces a slightly larger version, for example,

    \begin{center}
      \begin{tabular}{c@{\qquad}c@{\qquad}c}
        \Pizza        & vs. & \Pizza* \\
        \cmdI{\Pizza} &     & \verb|\Pizza*|
      \end{tabular}
    \end{center}

    In addition, symbols accept an optional argument that provides
    control over color and scale (beyond merely ``default'' and
    ``large'').  \seedocs{\TIKZCOOK}.
  \endpackagenote

  % tikzlings
  \packagenote{TKZLNGS}{tikzlings}
    \tikznotfontmessage{\TKZLNGS}.  Symbols must be typeset within the
    argument to a \cmd{\tikz} command or within a
    \verb|\begin{tikzpicture}|\dots \verb|\end{tikzpicture}|
    environment.

    The symbols---primarily animals---provided by the package are
    extremely customizable.  Colors of individual components (eyes,
    arms, legs, etc.)\ can be altered; hats, signs,
    speech\index{speech bubble} bubbles, thought\index{thought bubble}
    bubbles, food items, sports gear, and miscellaneous other items
    can be added; symbols can be scaled and rotated; feet can take
    steps; and the symbol as a whole can be drawn in a front view,
    back view, 3D view, or as a contour.  \seedocs{\TKZLNGS}.

    The following are a few examples, shown in their natural size.
    (To save space, they are presented at 30\% of their natural size
    in symbol tables.)

    \begin{center}
      \begin{tabular}{ccc}
        \tkzlngs[]{\turkey}
        & \tkzlngs[back]{\turkey}
        & \tkzlngs[3D]{\turkey}
        \\
        \verb|\tikz{\turkey}|
        & \verb|\tikz{\turkey[back]}|
        & \verb|\tikz{\turkey[3D]}|
      \end{tabular}
      \par
      \begin{tabular}{c}
        \tikz{\turkey\thing[hat, scale=0.5, yshift=2cm]} \\
        \verb|\tikz{\turkey\thing[hat, scale=0.5, yshift=2cm]}|
      \end{tabular}
    \end{center}
  \endpackagenote

  % tikzsymbols
  \packagenote{TIKZSYM}{tikzsymbols}
    \tikznotfontmessage{\TIKZSYM}.  The package provides means of
    customizing the colors used in many of the symbols.
    \seedocs{\TIKZSYM}.
  \endpackagenote

  % turnstile
  \packagenote{TURN}{turnstile}
    Each \TURN\ relation symbol accepts an optional argument that
    controls the size of the upper and lower expressions.  See the
    \TURN\ documentation for more information.
  \endpackagenote

  % twemojis
  \packagenote{TWEM}{twemojis}
    Most \TWEM\ symbols have multiple names.  Only the most
    descriptive name for each symbol is shown in each table.

    All \TWEM\ symbols are implemented as PDF\index{PDF} graphics, not
    with a font.  See also the \pkgname{hwemoji} package, which
    enables direct Unicode\index{Unicode} entry of emoji characters in
    \pdflatex; the \pkgname{emoji} package, which provides a \lualatex
    interface to different underlying emoji fonts; and the
    \pkgname{emo} package, which uses a font if possible, otherwise
    PDF\index{PDF} graphics.

    The \TWEM\ symbol tables show only a single variant of each
    symbol.  However, many symbols---especially those of people and
    body\index{body parts} parts---provide a number of alternative
    forms.  For example, \TWEM\ defines the following variants of
    ``\texttt{thumbs up}'':

    \begingroup
    \medskip
    \noindent
    \setlength{\twemojiDefaultHeight}{36pt}%
    \newcommand*{\TWEMtu}[2]{%
      \frenchspacing\ttfamily\small#1%
      \index{#1=#1\ (\protect\twemoji{#2})}%
      \indexcommand{\twemoji}%
    }%
    \begin{tabularx}{\notewidth}{@{}*6{>{\centering\arraybackslash}X}@{}}
      \twemoji{thumbs up}
      & \twemoji{thumbs up: dark skin tone}
      & \twemoji{thumbs up: medium-dark skin tone}
      & \twemoji{thumbs up: medium skin tone}
      & \twemoji{thumbs up: medium-light skin tone}
      & \twemoji{thumbs up: light skin tone}
      \\
      \TWEMtu{thumbs up}{1f44d}
      & \TWEMtu{thumbs up: dark skin tone}{1f44d-1f3ff}
      & \TWEMtu{thumbs up: medium-dark skin tone}{1f44d-1f3fe}
      & \TWEMtu{thumbs up: medium skin tone}{1f44d-1f3fd}
      & \TWEMtu{thumbs up: medium-light skin tone}{1f44d-1f3fc}
      & \TWEMtu{thumbs up: light skin tone}{1f44d-1f3fb}
    \end{tabularx}
    \smallskip
    \endgroup

    \seedocs{\TWEM}.
  \endpackagenote

  % typicons
  \packagenote{TYPICOS}{typicons}
    \luaxemessage{\TYPICOS}.
  \endpackagenote

  % upgreek
  \packagenote{UPGR}{upgreek}
    \UPGR\ utilizes upright Greek characters from either
    Euler\index{Euler Roman} Roman (depicted in \vref{upgreek-greek})
    or the \postscript \PSfont{Symbol} font.  As a result, the glyphs
    may appear slightly different from those presented in this
    document.  Contrast, for example,
    ``\Upgamma\Updelta\Uptheta\upalpha\upbeta\upgamma''~(Euler) with
    ``{\usefont{U}{psy}{m}{n}GDQabg}''~(Symbol).  Also note that the
    \verb|\var|\rule{2em}{1pt} forms do not always produce a distinct
    glyph.

    \ifTGRK
      Unlike \TGRK\ (\vref{textgreek-greek}), \UPGR\ works in math mode.
    \else
      Unlike \TGRK, \UPGR\ works in math mode.
    \fi

    \UPGR\ symbols are intended to be used sporadically throughout a
    document (e.g.,~to represent mathematical units or numerical
    quantities: ``$\mbox{\uppi} \approx 3.14159$'').  In contrast,
    \greekfontmessage.
  \endpackagenote

  % ushort
  \packagenote{USHORT}{ushort}
    \verb|\ushortw| and \verb|\ushortdw| are intended to be used with
    multi-character arguments (``words'') while \verb|\ushort|%
    \index{ushort=\verb+\ushort+ ($\blackacc{\ushort}$)}
    and \verb|\ushortd|%
    \setbox0=\hbox{\begin{tabular}{ll}\W\ushortd{x}\end{tabular}}
    are intended to be used with single-character arguments.

    The underlines produced by the \USHORT\ commands are shorter than
    those produced by the \verb|\underline|%
    \setbox0=\hbox{\begin{tabular}{ll}\W\underline{x}\end{tabular}}
    command.  Consider the output from the expression
    ``\verb+$\ushort{a}+\linebreak[0]%
      \verb+\ushort{a}+\linebreak[0]
      \verb+\quad+
      \verb+\underline{a}+\linebreak[0]%
      \verb+\underline{a}$+'',
    which at size \cmd{\Huge} looks like this:

    \begingroup
      \centering
      \Huge
      $\ushort{a}\ushort{a} \quad \underline{a}\underline{a}$
      \par
    \endgroup
  \endpackagenote

  % utfsym
  \packagenote{UTFSYM}{utfsym}
    For the reader's convenience, the Unicode\index{Unicode} name of
    each symbol is listed in each \UTFSYM\ table.  Names are derived
    from
    \url{https://www.unicode.org/Public/16.0.0/ucd/UnicodeData.txt}.

    \tikznotfontmessage{\UTFSYM}.

    In addition to \cmd{\usym}, the \UTFSYM\ package
    defines \cmd{\usymH}, which renders a symbol at a given height,
    and \cmd{\usymW}, which renders a symbol at a given width.  For
    example, ``\cmd{\usymH}\verb|{1F409}{72pt}|'' produces
    \begin{center}
      \usymH{1F409}{72pt}
    \end{center}
    \seedocs{\UTFSYM}.
  \endpackagenote

  % undertilde
  \packagenote{UTILD}{undertilde}
    Because \verb|\utilde| is based on \verb|\widetilde|%
    \ifhavespverbatim
      \index{widetilde=\spverb+\widetilde+ ($\blackacc{\widetilde}$)}
    \else
      \index{widetilde=\verb+\widetilde+ ($\blackacc{\widetilde}$)}
    \fi
    it is automatically made more extensible by the \YH\
    \ifYH
      package (\vref{yhmath-extensible-accents}).
    \else
      package.
    \fi    % YH test
  \endpackagenote

  % vectorlogos
  \packagenote{VECLOG}{vectorlogos}
    \tikznotfontmessage{\VECLOG}.

    \vref{vectorlogos} excludes commands that draw textual logos
    (e.g.,~\cmdI{\logoscratch} for ``\logoscratch'') because these are
    wordmarks, not symbols.
  \endpackagenote

  % vscodeicons
  \packagenote{VSCODE}{vscodeicons}
    All \VSCODE\ symbols are implemented with PDF\index{PDF} graphics,
    not with a font.  Options exist for adjusting symbol height,
    depth, and alignment on a per-symbol basis.  \seedocs{\VSCODE}.
  \endpackagenote

  % webomints
  \packagenote{WEBO}{webomints}
    \WEBO\ provides a \filename{uwebo.fd} font-definition file.
    Instead of using \PI\ and \cmd{\Pisymbol} to typeset a glyph, a
    document can select the \WEBO\ font directly.  For example,
    \verb|{\usefont{U}{webo}{xl}{n}\char73\char74}|---alternatively,
    \verb|{\usefont{U}{webo}{xl}{n}IJ}|---will typeset
    ``{\usefont{U}{webo}{xl}{n}\char73\char74}''.  This can be useful
    for typesetting a number of \WEBO\ glyphs in a row.

    \niceframemessage{\WEBO}.
  \endpackagenote

  % worldflags
  \packagenote{WFLAGS}{worldflags}
    \tikznotfontmessage{\WFLAGS}.  The package provides a number of
    options for controlling flag size and style.  \seedocs{\WFLAGS}.
  \endpackagenote
\end{description}


\section{Where can I find the symbol for~\dots?}
\label{combining-symbols}

If you can't find some symbol you're looking for in this document, there
are a few possible explanations:

\begin{itemize}
  \item The symbol isn't intuitively named.  As a few examples,
\ifIFS
  the \IFS\ command to draw dice\index{dice} is ``\cmdI[\allCubes]{\Cube}'';
\fi    % IFS test
  a plus sign with a circle around it (``exclusive
  or''\index{exclusive or} to computer engineers) is
  ``\cmdX{\oplus}''; and lightning bolts in fonts designed by German
  speakers may have ``blitz'' in their names as in the \ULSY\ package.
  The moral of the story is to be creative with synonyms when
  searching the index.

  \item The symbol is defined by some package that I overlooked (or
  deemed unimportant).  If there's some symbol package that you think
  should be included in the \doctitle, please send me e-mail at the
  address listed on the title page.

  \item The symbol isn't defined in any package whatsoever.
\end{itemize}

\ifcomplete
  Even in the last case, all is not lost.  Sometimes, a symbol exists
  in a font, but there is no \latex{} binding for it.  For example,
  the \postscript \PSfont{Symbol} font contains a
  ``\Pisymbol{psy}{191}''\index{arrows} symbol, which may be useful
  for representing a carriage\index{carriage return} return, but there
  is no package (as far as I know) for accessing that symbol.  To
  produce an unnamed symbol, you need to switch to the font explicitly
  with \latexE's low-level font commands~\cite{fntguide} and use
  \tex's primitive \cmd{\char} command~\cite{Knuth:ct-a} to request a
  specific character number in the font.
\ifLATMOD    % Not covered by \ifcomplete
  For example, one can define a command to typeset a
  long~s\index{long s=long s (\LMlongs)}~(``\,\LMlongs\,'') using
  character~115 from the Latin Modern fonts in the TS1
  \fntenc[TS1]:\footnote{Since January 2020, the \WASY\ package
    provides a \cmdI[\protect\longs]{\longs} symbol.  See \ref{wasy-text}.}

\begin{verbatim}
   \newcommand{\textlongs}{{%
     \fontencoding{TS1}\fontfamily{lmr}\selectfont\char115%
   }}
\end{verbatim}

  \noindent
  Then, ``\verb|\textlongs| \verb|ucce\textlongs| \verb|sful|'' will
  produce ``\LMlongs ucce\LMlongs sful''---in the current font style
  (roman, italic, bold, etc.)
\fi    % LATMOD test

\ifOTII    % Not covered by \ifcomplete
  In fact, \cmd{\char} is not strictly necesssary in all cases; the
  character can often be entered symbolically.  \index{sha=sha
    ({\fontencoding{OT2}\selectfont SH})|(} For example, the symbol
  for an impulse train or Tate-Shafarevich group
  (``{\fontencoding{OT2}\selectfont SH}'') is actually an uppercase
  \textit{sha} in the Cyrillic\subindex{alphabets}{Cyrillic} alphabet.
  (Cyrillic is supported by the OT2 \fntenc[OT2], for instance).
  While a \textit{sha} can be defined numerically as
  ``\verb|{\fontencoding{OT2}|\linebreak[0]\verb|\selectfont|\cmd{\char}\verb|88}|''
  it may be more intuitive to use the OT2 \fntenc[OT2]'s ``SH''
  ligature:
  ``\verb|{\fontencoding{OT2}|\linebreak[0]\verb|\selectfont SH}|''\index{sha=sha
    ({\fontencoding{OT2}\selectfont SH})|)}.  Another possibility is
  to use the T2A \fntenc[T2A]'s \cmdI[\enctwoA{\CYRSH}]{\CYRSH}
  command:
  ``\verb|{\fontencoding{T2A}|\linebreak[0]\verb|\selectfont|\linebreak[0]\verb|\CYRSH}|''.
\fi    % OTII test

  For the specific case of the U~\fntenc[U], which is used for symbol
  or ``pi''\index{pi fonts=pi fonts}\index{fonts>pi=pi} fonts,
  the \pkgname{pifont} package defines a convenient \cmd{\Pisymbol}
  command.  \cmd{\Pisymbol} typesets a specified character (by number)
  in a specified \fntfam.  For example,
  ``\cmd{\Pisymbol}\texttt{\string{psy\string}\string{191\string}}''
  produces the aforementioned ``\Pisymbol{psy}{191}''\index{carriage
    return} symbol by typesetting character number~191 in the
  \texttt{psy} (\postscript \PSfont{Symbol}) \fntfam[psy].


  \subsection{Reflecting and rotating existing symbols}

  \mbox{}%    % Force the \index commands into the paragraph proper.
  \index{symbols>reversed|(}%
  \index{symbols>rotated|(}%
  \index{symbols>inverted|(}%
  \index{symbols>upside-down|(}%
  \index{reversed symbols|(}%
  \index{rotated symbols|(}%
  \index{upside-down symbols|(}%
  \index{inverted symbols|(}%
  \DeclareRobustCommand{\irony}{\textsuperscript{\reflectbox{?}}}%
  \DeclareRobustCommand{\DEDEpartof}{\mathrel{\raisebox{0.45ex}{$\mathfrak{3}$}}}%
  \DeclareRobustCommand{\DEDEwholeof}{\mathrel{\reflectbox{$\DEDEpartof$}}}%
  A common request on \ctt is for a reversed or rotated version of an
  existing symbol.  As a last resort, these effects can be achieved
  with the \pkgname{graphicx} (or \pkgname{graphics}) package's
  \cmd{\reflectbox} and \cmd{\rotatebox} macros.
  \newcommand{\definitedescription}{\rotatebox[origin=c]{180}{$\iota$}}
  For example, \verb|\textsuperscript{\reflectbox{?}}| produces an
  \href{https://en.wikipedia.org/wiki/Irony_mark}{irony
    mark}\index{irony mark=irony mark (\irony)}~(``\,\irony\,''), and
  \verb|\rotatebox[origin=c]{180}{$\iota$}| produces the
  definite-description\index{definite-description operator
    (\definitedescription)}\index{iota, upside-down}
  operator~(``\rotatebox[origin=c]{180}{$\iota$}'').  As noted by
  \person{Marc}{Olschok} in a July~2011 post on \ctt,
  \href{https://www.gutenberg.org/}{Project Gutenberg}\index{Project
    Gutenberg} uses \cmd{\reflectbox} to typeset the
  part~(``$\DEDEpartof$\indexcommand[$\DEDEpartof$]{\partof}'') and
  whole~(``$\DEDEwholeof$\indexcommand[$\DEDEwholeof$]{\wholeof}'')
  relations used in Dedekind's\index{Dedekind, Richard} set notation:

\begin{verbatim}
   \newcommand\partof{\mathrel{\raisebox{0.45ex}{$\mathfrak{3}$}}}
   \newcommand\wholeof{\mathrel{\reflectbox{$\partof$}}}
\end{verbatim}

  The disadvantage of the \pkgname{graphicx}/\pkgname{graphics}
  approach is that not every \tex backend handles graphical
  transformations.\footnote{As an example, Xdvi\index{Xdvi} ignores
    both \cmd{\reflectbox} and \cmd{\rotatebox}.}  Far better is to
  find a suitable font that contains the desired symbol in the correct
  orientation.  For instance, if the \PHON\ package is available, then
  \verb|\textit{\riota}| will yield a
  backend-independent~``\textit{\riota}''.
  Similarly,\label{page:such-that} \TIPA's
  \cmdI{\textrevepsilon}~(``\textrevepsilon'') or \WIPA's
  \cmdI{\revepsilon}~(``\revepsilon'') may be used to express the
  mathematical notion of ``such\index{such that} that'' in a cleaner
  manner than with \cmd{\reflectbox} or
  \cmd{\rotatebox}.\footnote{More common symbols for representing
    ``such\index{such that} that'' include ``\texttt{|}'',
    ``\texttt{:}'', and ``\texttt{s.t.}''.}
  \index{symbols>reversed|)}
  \index{symbols>rotated|)}
  \index{symbols>upside-down|)}
  \index{symbols>inverted|)}
  \index{reversed symbols|)}
  \index{rotated symbols|)}
  \index{upside-down symbols|)}%
  \index{inverted symbols|)}

  \subsection{Joining and overlapping existing symbols}

  Symbols that do not exist in any font can sometimes be fabricated
  out of existing symbols.  The \latexE{} source file \fontdefdtx
  contains a number of such definitions.  For example, \cmdX{\models}
  (see \vref{rel}) is defined in that file with:
\else
  Even in the last case, all is not lost.  Sometimes, a symbol exists
  in a font, but there is no \latex{} binding for it.

  \subsection{Reflecting and rotating existing symbols}

  Rotated/reflected versions of an existing symbol can be produced
  using the \pkgname{graphicx} (or \pkgname{graphics}) package's
  \cmd{\reflectbox} and \cmd{\rotatebox} macros.\footnote{This should
  be used as a last resort.  Not every \tex backend supports graphical
  transformations.}

  \subsection{Joining and overlapping existing symbols}

  If a symbol does not exist in any orientation in any font, it may be
  possible to fabricate it out of existing symbols.  The \latexE{}
  source file \fontdefdtx contains a number of such definitions.  For
  example, \cmdX{\models} (see \vref{rel}) is defined in that
  file with:
\fi    % Matches \ifcomplete ...

\begin{verbatim}
   \def\models{\mathrel|\joinrel=}
\end{verbatim}

\noindent
where \cmd{\mathrel} and \cmd{\joinrel} are used to control the
horizontal spacing.  \verb|\def| is the \tex primitive upon which
\latex's \verb|\newcommand| is based.  See \TeXbook for more
information on all three of those commands.

\newcommand{\ismodeledby}{\ensuremath{=\joinrel\mathrel|}}
With some simple pattern-matching, one can easily define a backward
\cmdX{\models} sign (``\ismodeledby''):

\begin{verbatim}
   \def\ismodeledby{=\joinrel\mathrel|}
\end{verbatim}
\indexcommand[\string\ismodeledby]{\ismodeledby}

In general, arrows\index{arrows}/harpoons, horizontal lines (``='',
``-'', ``\cmdX{\relbar}'', and ``\cmdX{\Relbar}''), and the various
math-extension characters can be combined creatively with
miscellaneous other characters to produce a variety of new symbols.
Of course, new symbols can be composed from \emph{any} set of existing
characters.  For instance, \latex defines \cmdX{\hbar} (``$\hbar$'')
as a ``$\mathchar'26$'' character (\verb|\mathchar'26|) followed by a
backspace of 9~math units (\verb|\mkern-9mu|), followed by the
letter~``$h$'':

\begin{verbatim}
   \def\hbar{{\mathchar'26\mkern-9muh}}
\end{verbatim}

\noindent
We can just as easily define other barred\idxboth{barred}{letters}
letters:

\def\bbar{{\mathchar'26\mkern-9mu b}}
\def\dbar{{\mathchar'26\mkern-12mu d}}

\begin{verbatim}
   \def\bbar{{\mathchar'26\mkern-9mu b}}
   \def\dbar{{\mathchar'26\mkern-12mu d}}
\end{verbatim}

\noindent
(The space after the ``mu'' is optional but is added for clarity.)
\cmdX{\bbar} and \cmdX{\dbar} define ``$\bbar$'' and ``$\dbar$'',
respectively.  Note that \cmdX{\dbar} requires a greater backward
math~kern than \cmdX{\bbar}; a $-9$\,mu~kern would have produced
the less-attractive ``$\mathchar'26\mkern-9mu d$'' glyph.

The \pkgname{amsmath} package provides \cmd{\overset} and
\cmd{\underset} commands for placing one symbol respectively above or
below another.  For example,
\verb|\overset{G}{\sim}|\footnote{\latex's \cmd{\stackrel} command is
similar but is limited to placing a symbol above a binary relation.}
produces ``$\overset{G}{\sim}$'' (sometimes used for
``equidecomposable\index{equidecomposable} with respect to~$G$'').

\DeclareRobustCommand{\asterism}{\smash{%
   \raisebox{-.5ex}{%
     \setlength{\tabcolsep}{-.5pt}%
     \begin{tabular}{@{}cc@{}}%
       \multicolumn2c*\\[-2ex]*&*%
     \end{tabular}}}}

Sometimes an ordinary \texttt{tabular} environment can be co-opted
into juxtaposing existing symbols into a new symbol.  Consider the
following definition of \cmdI{\asterism}~(``\asterism'') from a
June~2007 post to \ctt by \person{Peter}{Flynn}:

\begin{verbatim}
    \newcommand{\asterism}{\smash{%
       \raisebox{-.5ex}{%
         \setlength{\tabcolsep}{-.5pt}%
         \begin{tabular}{@{}cc@{}}%
           \multicolumn2c*\\[-2ex]*&*%
         \end{tabular}}}}
\end{verbatim}

\noindent
Note how the space between columns (\cmd{\tabcolsep}) and rows
(\verb|\\[|\dots\verb|]|) is made negative to squeeze the asterisks
closer together.

\bigskip

There is a \tex primitive called \cmd{\mathaccent} that centers one
mathematical symbol atop another.  For\label{page:dotcup} example, one
can define \cmdX{\dotcup} (``\dotcup'')---the composition of a
\cmdX{\cup} and a \cmdX{\cdot}---as follows:

\begin{verbatim}
    \newcommand{\dotcup}{\ensuremath{\mathaccent\cdot\cup}}
\end{verbatim}

\noindent
The catch is that \cmd{\mathaccent} requires the accent to be a ``math
character''.  That is, it must be a character in a math font as
opposed to a symbol defined in terms of other symbols.  See \TeXbook
for more information.

Another \tex primitive that is useful for composing symbols is
\cmd{\vcenter}.  \cmd{\vcenter} is conceptually similar to
``\verb|\begin{tabular}{l}|'' in \latex but takes a list of vertical
material instead of \verb|\\|-separated rows.  Also, it vertically
centers the result on the math axis.  (Many operators, such as ``$+$''
and ``$-$'' are also vertically centered on the math axis.)
\person{Enrico}{Gregorio} posted the following symbol definition to
\ctt in March~2004 in response to a query about an alternate way to
denote equivalence:

\newcommand*{\threesim}{%
  \mathrel{\vcenter{\offinterlineskip
  \hbox{$\sim$}\vskip-.35ex\hbox{$\sim$}\vskip-.35ex\hbox{$\sim$}}}}

\begin{verbatim}
    \newcommand*{\threesim}{%
      \mathrel{\vcenter{\offinterlineskip
      \hbox{$\sim$}\vskip-.35ex\hbox{$\sim$}\vskip-.35ex\hbox{$\sim$}}}}
\end{verbatim}

\noindent
The \cmdX{\threesim} symbol, which vertically centers three
\cmdX{\sim}~(``$\sim$'') symbols with 0.35 $x$-heights of space
between them, is rendered as ``$\threesim$''.  \cmd{\offinterlineskip}
is a macro that disables implicit interline spacing.  Without it,
\cmdX{\threesim} would have a full line of vertical spacing between
each \cmdX{\sim}.  Because of \cmd{\vcenter}, \cmdX{\threesim} aligns
properly with other math operators: \mbox{$a \div b \threesim c \times
d$}.

\makeatletter
\providecommand\barcirc{\mathpalette\@barred\circ}
\def\@barred#1#2{\ooalign{\hfil$#1-$\hfil\cr\hfil$#1#2$\hfil\cr}}
\newcommand\stst{^{\protect\barcirc}}
\makeatother

A related \latex command, borrowed from Plain \tex, is \cmd{\ooalign}.
\cmd{\ooalign} vertically overlaps symbols and works both within and
outside of math mode.  Essentially, it creates a single-column
\texttt{tabular} environment with zero vertical distance between rows.
However, because it is based directly on \tex's \cmd{\ialign}
primitive, \cmd{\ooalign} uses \tex's tabular syntax instead of
\latex's (i.e.,~with \cmd{\cr} as the row terminator instead of
\cmd{\\}).  The following example of \cmd{\ooalign}, a macro that
defines a standard-state\index{standard state} symbol~(\cmdX{\stst},
``$\stst$'') as a superscripted Plimsoll\index{Plimsoll line}
line~(\cmdX{\barcirc}, ``$\barcirc$''),%
\ifST
  \ifPLIM
    \footnote{While \cmdX{\barcirc} illustrates how to combine symbols
      using \cmd{\ooalign}, the \PLIM\ package's \cmdI{\plimsoll}
      command (\vref*{plimsoll}) and the \ST\ package's \cmdX{\minuso}
      command (\vref*{st-bin}) provide a similar glyph~(\plimsoll) as
      a single, indivisible symbol.}
  \fi    % PLIM test
\fi    % ST test
 is due to an October~2007 \ctt post by \person{Donald}{Arseneau}:

\begin{verbatim}
    \makeatletter
    \providecommand\barcirc{\mathpalette\@barred\circ}
    \def\@barred#1#2{\ooalign{\hfil$#1-$\hfil\cr\hfil$#1#2$\hfil\cr}}
    \newcommand\stst{^{\protect\barcirc}}
    \makeatother
\end{verbatim}

In the preceding code, note the \cmd{\ooalign} call's use of
\cmd{\hfil} to horizontally center a minus sign~(``$-$'') and a
\cmdX{\circ}~(``$\circ$'').

\DeclareRobustCommand{\suchthat}{%
  \mathrel{\ooalign{$\ni$\cr\kern-1pt$-$\kern-6.5pt$-$}}}

As another example of \cmd{\ooalign}, consider the following code (due
to \person{Enrico}{Gregorio} in a June~2007 post to \ctt) that
overlaps a \cmdX{\ni}~(``$\ni$'') and two minus
signs~(``$-$\kern-6.5pt$-$'') to produce
``$\suchthat$''\indexcommand[$\suchthat$]{\suchthat}%
\ifcomplete
  , an obscure variation on the infrequently used ``\textrevepsilon''
  symbol for ``such\index{such that} that''
  discussed~\vpageref[above]{page:such-that}%
\fi
:

\begin{verbatim}
    \newcommand{\suchthat}{%
      \mathrel{\ooalign{$\ni$\cr\kern-1pt$-$\kern-6.5pt$-$}}}
\end{verbatim}

\newcommand{\rqm}{{\declareslashed{}{\text{-}}{0.04}{0}{I}\slashed{I}}}

The \pkgname{slashed} package, although originally designed for
producing Feynman\index{Feynman slashed character notation}
slashed-character\idxboth{slashed}{letters} notation, in fact
facilitates the production of \emph{arbitrary} overlapped symbols.
The default behavior is to overwrite a given character with ``$/$''.
For example, \cmd{\slashed}\verb|{D}| produces ``$\slashed{D}$''.
However, the \cmd{\declareslashed} command provides the flexibility to
specify the mathematical context of the composite character (operator,
relation, punctuation, etc., as will be discussed in
\ref{math-spacing}), the overlapping symbol, horizontal and vertical
adjustments in symbol-relative units, and the character to be
overlapped.  Consider, for example, the symbol for reduced quadrupole
moment~(``$\rqm$'').  This can be declared as follows:

\begin{verbatim}
    \newcommand{\rqm}{{%
      \declareslashed{}{\text{-}}{0.04}{0}{I}\slashed{I}}}
\end{verbatim}

\newcommand{\curlyarg}{\texttt{\char`\{}$\cdot$\texttt{\char`\}}}%

\noindent
\cmd{\declareslashed}\curlyarg\curlyarg\curlyarg\curlyarg\verb|{I}|
affects the meaning of all subsequent \cmd{\slashed}\verb|{I}|
commands in the same scope.  The preceding definition of \cmdX{\rqm}
therefore uses an extra set of curly braces to limit that scope to a
single \cmd{\slashed}\verb|{I}|.  In addition, \cmdX{\rqm} uses
\pkgname{amstext}'s \cmd{\text} macro
(described~\vpageref[below]{text-macro}) to make \cmd{\declareslashed}
use a text-mode hyphen~(``-'') instead of a math-mode minus
sign~(``$-$'') and to ensure that the hyphen scales properly in size
in subscripts and superscripts.  See \pkgname{slashed}'s documentation
(located in
\hfilename{https://mirror.ctan.org/macros/latex/contrib/carlisle/slashed.sty}{slashed.sty}
itself) for a detailed usage description of the \cmd{\slashed} and
\cmd{\declareslashed} commands.

Somewhat simpler than \pkgname{slashed} is the \pkgname{centernot}
package.  \pkgname{centernot} provides a single command,
\cmd{\centernot}, which, like \cmd{\not}, puts a slash over the
subsequent mathematical symbol.  However, instead of putting the slash
at a fixed location, \cmd{\centernot} centers the slash over its
argument.  \cmd{\centernot} might be used, for example, to create a
``does\index{does not imply} not imply'' symbol:

\begin{center}
  \index{arrows}
  \renewcommand{\arraystretch}{1.25}%
  \begin{tabular}{cl}
    $\not\Longrightarrow$       & \verb|\not\Longrightarrow| \\
    \multicolumn{2}{c}{vs.} \\
    $\centernot\Longrightarrow$ & \verb|\centernot\Longrightarrow| \\
  \end{tabular}
\end{center}
\seedocs{\pkgname{centernot}}.

\ifcomplete
  \bigskip

  Creating a symbol by joining and overlapping symbols from the
  current font can provide a more consistent look than using a single
  symbol designed for a different body font.  For example,
  \pkgname{frenchmath} defines a \cmdX{\paral}~(``$\paral\,$'') symbol
  in terms of two slashes:

\begin{verbatim}
    \newcommand\paral{\mathrel{\ooalign{$\mkern-1.75mu/\mkern1.75mu$\cr%
        $\mkern1.75mu/\mkern-1.75mu$}}}
\end{verbatim}

  \noindent
  \vref{frenchmath-paral} demonstrates how the \cmdX{\paral} adapts to
  the surrounding font, in contrast to similar fixed-style symbols
  found in \ST\ (\cmdX{\sslash}), \TXPX\ (\cmdX{\varparallel}), and
  \FOUR\ (\cmdI{\parallelslant}).

  \begin{table}[htbp]
    \centering
    \caption{Contrasting \pkgname{frenchmath}'s \cmd{\paral} with similar symbols}
    \label{frenchmath-paral}
    \newcommand*{\helv}[1]{\text{\usefont{T1}{phv}{m}{n}#1}}
    \newcommand*{\ihelv}[1]{\text{\usefont{T1}{phv}{m}{it}#1}}
    \DeclareRobustCommand{\hparal}{%
      \mathrel{\ooalign{$\mkern-1.75mu\helv{/}\mkern1.75mu$\cr
          $\mkern1.75mu\helv{/}\mkern-1.75mu$}}%
    }
    \newsavebox{\paralbox}
    \savebox{\paralbox}{\ttfamily\string\parallelslant}
    \begin{tabular}{@{}l*4{>{\centering\arraybackslash}p{\wd\paralbox}}@{}}
      \toprule
      Font
      & \verb|\paral|
      & \verb|\sslash|
      & \verb|\varparallel|
      & \verb|\parallelslant|
      \\
      \cmidrule(r){1-1} \cmidrule(l){2-5}
      Computer Modern
      & \Large$a \paral b$
      & \Large$a \sslash b$
      & \Large$a \varparallel b$
      & \Large$a \mathrel{\text{\parallelslant}} b$
      \\ \addlinespace
      Nimbus Sans~L
      & \Large$\ihelv{a} \hparal \ihelv{b}$
      & \Large$\ihelv{a} \sslash \ihelv{b}$
      & \Large$\ihelv{a} \varparallel \ihelv{b}$
      & \Large$\ihelv{a} \mathrel{\text{\parallelslant}} \ihelv{b}$
      \\
      \bottomrule
    \end{tabular}
  \end{table}

  As a second example of composite symbols being font-aware,
  \pkgname{mismath} defines an
  \cmdI[$\mmeqdef$]{\eqdef}~(``$\mmeqdef$'') symbol by stacking
  ``def'' atop ``='', both in the current font:

\begin{verbatim}
    \newcommand\eqdef{\stackrel{\mathup{def}}{=}}
\end{verbatim}

  \noindent
  If a smaller ``def'' is desired, a custom version of \verb|\eqdef|
  can be defined using \cmd{\stackrel}:

\begin{verbatim}
    \newcommand{\eqdef}{\stackrel{\text{\smaller[3]def}}{=}}
\end{verbatim}

  \noindent
  Note the use of \pkgname{relsize}'s \cmd{\smaller} command to scale
  ``def'' relative to the current font size rather than hard-wiring
  its size to, say, \cmd{\tiny}.  \vref{mismath-eqdef} shows how the
  composite ``def'' and ``='' symbols inherit the current font, unlike
  \STIX's \cmdI[\STIXeqdef]{\eqdef}.

  \begin{table}[htbp]
    \centering
    \caption{Contrasting \pkgname{mismath}'s \texttt{\string\eqdef} with \STIX's}
    \label{mismath-eqdef}
    \newcommand*{\ihelv}[1]{\text{\usefont{T1}{phv}{m}{it}#1}}
    \begin{tabular}{@{}lccc@{}}
      \toprule
      Font
      & \pkgname{mismath}
      & custom
      & \STIX
      \\
      \cmidrule(r){1-1} \cmidrule(l){2-4}
      Computer Modern
      & \Large$a \mmeqdef b$
      & \Large$a \tinyeqdef b$
      & \Large$a \mathrel{\text{\STIXeqdef}} b$
      \\ \addlinespace
      Nimbus Sans~L
      & \usefont{T1}{phv}{m}{n}\Large$\ihelv{a} \mmeqdef \ihelv{b}$
      & \usefont{T1}{phv}{m}{n}\Large$\ihelv{a} \tinyeqdef \ihelv{b}$
      & \usefont{T1}{phv}{m}{n}\Large$\ihelv{a} \mathrel{\text{\STIXeqdef}} \ihelv{b}$
      \\
      \bottomrule
    \end{tabular}
  \end{table}
\fi    % Matches \ifcomplete


\subsection{Making new symbols work in superscripts and subscripts}

\index{subscripts>new symbols used in|(}
\index{superscripts>new symbols used in|(}
\def\topbotatom#1{\hbox{\hbox to 0pt{$#1\bot$\hss}$#1\top$}}
\newcommand*{\topbot}{\mathrel{\mathchoice{\topbotatom\displaystyle}
                                 {\topbotatom\textstyle}
                                 {\topbotatom\scriptstyle}
                                 {\topbotatom\scriptscriptstyle}}}

To make composite symbols work properly within subscripts and
superscripts, you may need to use \tex's \cmd{\mathchoice} primitive.
\cmd{\mathchoice} evaluates one of four expressions, based on whether
the current math style is display, text, script, or scriptscript.
(See \TeXbook for a more complete description.)  For example, the
following \latex code---posted to \ctt by
\person{Torsten}{Bronger}---composes a sub/superscriptable
``$\topbot$'' symbol out of \cmdX{\top} and \cmdX{\bot} (``$\top$''
and ``$\bot$''):

\indexcommand[$\string\topbot$]{\topbot}%
\indexcommand{\displaystyle}%
\indexcommand{\textstyle}%
\indexcommand{\scriptstyle}%
\indexcommand{\scriptscriptstyle}%
\label{code:topbot}%
\begin{verbatim}
   \def\topbotatom#1{\hbox{\hbox to 0pt{$#1\bot$\hss}$#1\top$}}
   \newcommand*{\topbot}{\mathrel{\mathchoice{\topbotatom\displaystyle}
                                    {\topbotatom\textstyle}
                                    {\topbotatom\scriptstyle}
                                    {\topbotatom\scriptscriptstyle}}}
\end{verbatim}
\index{superscripts>new symbols used in|)}
\index{subscripts>new symbols used in|)}

\index{integrals|(}

The following\label{dashint} is another example that uses
\cmd{\mathchoice} to construct symbols in different math modes.  The
code defines a principal value integral symbol, which is an integral
sign with a line through it.

\indexcommand{\displaystyle}%
\indexcommand{\textstyle}%
\indexcommand{\scriptstyle}%
\indexcommand{\scriptscriptstyle}%
\begin{verbatim}
   \def\Xint#1{\mathchoice
      {\XXint\displaystyle\textstyle{#1}}%
      {\XXint\textstyle\scriptstyle{#1}}%
      {\XXint\scriptstyle\scriptscriptstyle{#1}}%
      {\XXint\scriptscriptstyle\scriptscriptstyle{#1}}%
      \!\int}
   \def\XXint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
        \vcenter{\hbox{$#2#3$}}\kern-.5\wd0}}
   \def\ddashint{\Xint=}
   \def\dashint{\Xint-}
\end{verbatim}

\noindent
(The preceding code was taken verbatim from \TeXFAQ{prinvalint}.)
\cmdI[$\string\dashint$]{\dashint} produces a single-dashed integral
sign~(``$\dashint$''), while \cmdX{\ddashint} produces a double-dashed
one~(``$\ddashint$'').  The \verb|\Xint| macro defined above can also
be used to generate a wealth of new integrals:
\index{arrows}
\ifAMS
  ``$\Xint\circlearrowright$'' (\verb|\Xint\circlearrowright|),
  ``$\Xint\circlearrowleft$'' (\verb|\Xint\circlearrowleft|),
  ``$\Xint\subset$'' (\verb|\Xint\subset|),
  ``$\Xint\infty$''\index{infinity} (\verb|\Xint\infty|), and so forth.
\else
  \verb|\Xint\circlearrowright|, \verb|\Xint\circlearrowleft|,
  \verb|\Xint\subset|, \verb|\Xint\infty|\index{infinity}, and so forth.
\fi    % AMS test

\index{integrals|)}

\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}

\latexE provides a simple wrapper for \cmd{\mathchoice} that sometimes
helps produce terser symbol definitions.  The macro is called
\cmd{\mathpalette} and it takes two arguments.  \cmd{\mathpalette}
invokes the first argument, passing it one of ``\cmd{\displaystyle}'',
``\cmd{\textstyle}'', ``\cmd{\scriptstyle}'', or
``\cmd{\scriptscriptstyle}'', followed by the second argument.
\cmd{\mathpalette} is useful when a symbol macro must know which math
style is currently in use (e.g.,~to set it explicitly within an
\cmd{\mbox}).  \person{Donald}{Arseneau} posted the following
\cmd{\mathpalette}-based definition of a
probabilistic-independence\index{probabilistic
independence}\index{independence>probabilistic}\index{statistical
independence}\index{independence>statistical}
symbol~(``$\independent$'') to \ctt in June~2000:

\begin{verbatim}
   \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
   \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\end{verbatim}

\noindent
The \cmdX{\independent} macro uses \cmd{\mathpalette} to pass the
\verb|\independenT| helper macro both the current math style and the
\cmdX{\perp} symbol.  \verb|\independenT| typesets \cmdX{\perp} in the
current math style, moves two math units to the right, and finally
typesets a second---overlapping---copy of \cmdX{\perp}, again in the
current math style.  \cmd{\rlap}, which enables text overlap, is
described~\vpageref[later on this page]{desc:rlap}.

\def\DHLhksqrt#1#2{\setbox0=\hbox{$#1\sqrt#2$}\dimen0=\ht0
  \advance\dimen0-0.2\ht0
  \setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
  {\box0\lower0.4pt\box2}}
\newcommand{\hksqrt}[2][]{\mathpalette\DHLhksqrt{[#1]{#2\,}}}

\index{sqrt=\verb+\sqrt+ ($\blackacc{\sqrt}$)|(}

\begin{morespacing}{1pt}
Some people like their square-root signs with a trailing ``hook''
(i.e.,~``$\!\hksqrt{~}$\,'') as this helps visually distinguish
expressions like~``$\!\sqrt{3x}$\,'' from those
like~``$\!\sqrt{3}x$''.  In March 2002, \person{Dan}{Luecking} posted
a \cmd{\mathpalette}-based definition of a hooked square-root symbol
to \ctt.  This code was subsequently refined by \person{Max}{Dohse}
and \person{Scott}{Pakin} into the version shown below, which accepts
a root as an optional argument, for consistency with \verb|\sqrt|.
\end{morespacing}

\Needspace*{5\baselineskip}
\index{hksqrt=\verb+\hksqrt+ ($\blackacc{\hksqrt}$)}%
\begin{verbatim}
   \newcommand{\hksqrt}[2][]{\mathpalette\DHLhksqrt{[#1]{#2\,}}}
   \def\DHLhksqrt#1#2{\setbox0=\hbox{$#1\sqrt#2$}\dimen0=\ht0
     \advance\dimen0-0.2\ht0
     \setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
     {\box0\lower0.4pt\box2}}
\end{verbatim}

\noindent
Notice how \verb|\hksqrt| uses \cmd{\mathpalette} to pass the current
math style (\cmd{\displaystyle}, \cmd{\textstyle}, etc.)\ to
\verb|\DHLhksqrt| as argument~\verb|#1|.  \verb|\DHLhksqrt|
subsequently uses that style within an \verb|\hbox|.  The rest of the
code is simply using \tex primitives to position a hook of height
0.2~times the \verb|\sqrt| height at the right of the \verb|\sqrt|.
See \TeXbook for more understanding of \tex ``boxes'' and ``dimens''.

\index{sqrt=\verb+\sqrt+ ($\blackacc{\sqrt}$)|)}


\subindex{arrows}{double-headed, diagonal|(}
\label{code:neswarrow}%
\newcommand{\neswarrow}{\mathrel{\text{$\nearrow$\llap{$\swarrow$}}}}
\newcommand{\nwsearrow}{\mathrel{\text{$\nwarrow$\llap{$\searrow$}}}}

Sometimes, however, \pkgname{amstext}'s \cmd{\text}\label{text-macro}
macro is all that is necessary to make composite symbols appear
correctly in subscripts and superscripts, as in the following
definitions of \cmdX{\neswarrow} (``$\neswarrow$'') and
\cmdX{\nwsearrow} (``$\nwsearrow$''):\footnote{Note that if your goal
is to typeset commutative\index{commutative diagrams} diagrams or
pushout\index{pushout diagrams}\slash pullback\index{pullback
diagrams} diagrams, then you should probably be using \xypic.}

\indexcommand[$\string\nearrow$]{\nearrow}
\indexcommand[$\string\swarrow$]{\swarrow}
\indexcommand[$\string\nwarrow$]{\nwarrow}
\indexcommand[$\string\searrow$]{\searrow}
\begin{verbatim}
   \newcommand{\neswarrow}{\mathrel{\text{$\nearrow$\llap{$\swarrow$}}}}
   \newcommand{\nwsearrow}{\mathrel{\text{$\nwarrow$\llap{$\searrow$}}}}
\end{verbatim}

\noindent
\cmd{\text} resembles \latex's \cmd{\mbox} command but shrinks its
argument appropriately when used within a subscript or superscript.
\cmd{\llap} (``left overlap'') and its counterpart,
\cmd{\rlap}\label{desc:rlap} (``right overlap''), appear frequently
when creating composite characters.  \cmd{\llap} outputs its argument
to the left of the current position, overlapping whatever text is
already there.  Similarly, \cmd{\rlap} overlaps whatever text would
normally appear to the right of its argument.  For example,
``\verb|A|\cmd{\llap}\verb|{B}|'' and ``\cmd{\rlap}\verb|{A}B|'' each
produce ``A\llap{B}''.  However, the result of the former is the width
of ``A'', and the result of the latter is the width of
``B''---\cmd{\llap}\verb|{|\dots\verb|}| and
\cmd{\rlap}\verb|{|\dots\verb|}| take up zero space.
\subindex{arrows}{double-headed, diagonal|)}

In a June~2002 post to \ctt, \person{Donald}{Arseneau} presented a
general macro for aligning an arbitrary number of symbols on their
horizontal centers and vertical baselines:

\indexcommand{\ialign}%
\begin{verbatim}
   \makeatletter
     \def\moverlay{\mathpalette\mov@rlay}
     \def\mov@rlay#1#2{\leavevmode\vtop{%
        \baselineskip\z@skip \lineskiplimit-\maxdimen
        \ialign{\hfil$#1##$\hfil\cr#2\crcr}}}
   \makeatother
\end{verbatim}

\noindent
The \cmd{\makeatletter} and \cmd{\makeatother} commands are needed to
coerce \latex{} into accepting ``\texttt{@}'' as part of a macro
name.  \cmd{\moverlay} takes a list of symbols separated by \verb|\cr|
(\tex's equivalent of \latex's \verb|\\|).  For example, the
\cmdX{\topbot} command defined \vpageref[above]{code:topbot} could
have been expressed as ``\verb|\moverlay{\top\cr\bot}|'' and the
\cmdX{\neswarrow} command defined \vpageref[above]{code:neswarrow}
could have been expressed as
``\verb|\moverlay{\nearrow\cr\swarrow}|''.%
\indexcommand[$\string\nearrow$]{\nearrow}%
\indexcommand[$\string\swarrow$]{\swarrow}

The basic concept behind \cmd{\moverlay}'s implementation is that
\cmd{\moverlay} typesets the given symbols in a table that utilizes a
zero \verb|\baselineskip|.  This causes every row to be typeset at the
same vertical position.  See \TeXbook for explanations of the \tex
primitives used by \cmd{\moverlay}.

\ifx\TSElesssimslant\relax
\else

\bigskip

\person{Steven B.}{Segletes} answered a question on \tex\ Stack Exchange,
``\href{https://tex.stackexchange.com/questions/429758/ams-inequalities-a-variant-of-gtrsim-and-lesssim}{AMS
  inequalities: a variant of \cmdX{\gtrsim} and \cmdX{\lesssim}}'' on
typesetting \cmdX{\gtrsim}~(``$\gtrsim$'') and \cmdX{\lesssim}~(``$\lesssim$'')
with the \cmdX{\sim} symbol slanted to match the angle of the
greater-than/less-than sign.  His solution incorporates the \pkgname{graphicx}
package's \cmd{\rotatebox} for rotating the ``$\sim$'', the
\pkgname{stackengine} package's \cmd{\stackengine} command for stacking two
symbols on top of each other, and the \pkgname{scalerel} package's
\cmd{\ThisStyle}, \cmd{\SavedStyle}, and \cmd{\LMex} commands for scaling the
symbol based on the surrounding context.  The following code due to Segletes
defines the \cmdI[$\TSEgtrsimslant$]{\gtrsimslant}~(``$\TSEgtrsimslant$'') and
\cmdI[$\TSElesssimslant$]{\lesssimslant}~(``$\TSElesssimslant$'')
symbols:\footnote{The code as posted on \tex\ Stack Exchange named these
  \texttt{\string\vargtrsim} and \texttt{\string\varlesssim}.  They are renamed
  here for naming consistency with symbols such as
  \cmdX{\geqslant}~(``$\geqslant$'').}

\begin{verbatim}
    \newcommand\lesssimslant{\mathrel{\ensurestackMath{\ThisStyle{%
      \stackengine{-.4\LMex}{\SavedStyle<}{%
        \rotatebox{-25}{$\SavedStyle\sim$}}{U}{r}{F}{T}{S}}}}}
    \newcommand\gtrsimslant{\mathrel{\ensurestackMath{\ThisStyle{%
      \stackengine{-.4\LMex}{\SavedStyle>}{%
        \rotatebox{25}{$\SavedStyle\sim$}}{U}{l}{F}{T}{S}}}}}
\end{verbatim}

\fi  % \TSElesssimslant


\subsection{Modifying \latex-generated symbols}

\index{dots (ellipses)|(}
\index{ellipses (dots)|(}
\index{dot symbols|(}
\index{symbols>dot|(}

Oftentimes, symbols composed in the \latexE source code can be
modified with minimal effort to produce useful variations.  For
example, \fontdefdtx composes the \cmdX{\ddots} symbol (see
\vref{dots}) out of three periods, raised~7\,pt., 4\,pt., and
1\,pt., respectively:

\begin{verbatim}
   \def\ddots{\mathinner{\mkern1mu\raise7\p@
       \vbox{\kern7\p@\hbox{.}}\mkern2mu
       \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu}}
\end{verbatim}

\noindent
\cmd{\p@} is a \latexE{} shortcut for ``\texttt{pt}'' or
``\texttt{1.0pt}''.  The remaining commands are defined in \TeXbook.
To\label{revddots} draw a version of \cmdX{\ddots} with the dots going
along the opposite diagonal, we merely have to reorder the
\verb|\raise7\p@|, \verb|\raise4\p@|, and \verb|\raise\p@|:

\begin{verbatim}
   \makeatletter
     \def\revddots{\mathinner{\mkern1mu\raise\p@
       \vbox{\kern7\p@\hbox{.}}\mkern2mu
       \raise4\p@\hbox{.}\mkern2mu\raise7\p@\hbox{.}\mkern1mu}}
   \makeatother
\end{verbatim}
    \makeatletter
      \def\revddots{\mathinner{\mkern1mu\raise\p@
        \vbox{\kern7\p@\hbox{.}}\mkern2mu
        \raise4\p@\hbox{.}\mkern2mu\raise7\p@\hbox{.}\mkern1mu}}
    \makeatother
\indexcommand[$\string\revddots$]{\revddots}

\noindent
\cmdX{\revddots} is essentially identical to the \MDOTS\
package's
\ifMDOTS
  \cmdI[$\MDOTSiddots$]{\iddots}
\else
  \cmd{\iddots}
\fi
command or the \YH\ package's
\ifYH
  \cmdX{\adots}
\else
  \cmd{\adots}
\fi
command.
\index{symbols>dot|)}
\index{dot symbols|)}
\index{ellipses (dots)|)}
\index{dots (ellipses)|)}


\subsection{Encircling symbols}

A simple, special case of combining existing symbols is to overlay a
circle atop a given symbol.  \latex's built-in \cmdW{\textcircled}
(\vref{text-accents}) does exactly that: \verb|\textcircled{A}|
produces ``\textcircled{A}''.  The \pkgname{circledsteps} package
enhances this capability by using \TikZ\ to draw circles---rather,
ovals---that extend to fit their content, that can be colored, and
that can align either the original symbol or the circled symbol on the
baseline.
\ifhavecircledsteps
  As a simple example, \verb|f\Circled{ghi}j| produces
  ``f\Circled{ghi}j'', in contrast with \verb|f\textcircled{ghi}j|,
  which produces ``f\textcircled{ghi}j''.
\fi


\subsection{Producing complex accents}

\ifx\diatop\undefined
% The following was copied verbatim from ipa.sty, from the wsuipa package.
\def\diatop[#1|#2]{%
    {\setbox1=\hbox{#1{}}% diacritic mark
     \setbox2=\hbox{#2{}}%  letter (the group {} in case it is a diacritic)
     \dimen0=\ifdim\wd1>\wd2\wd1\else\wd2\fi% compute the max width
        % the `natural height' of diacritics is 1ex;
        % \dimen1 is the shift upwards
     \dimen1=\ht2\advance\dimen1by-1ex%
        % center the diacritic mark on the width of the letter:
     \setbox1=\hbox to\dimen0{\hss#1{}\hss}%
     \leavevmode % force horizontal mode
     \rlap{\raise\dimen1\box1}% the raised diacritic mark
     \hbox to\dimen0{\hss#2\hss}% the letter
    }%
  }%
\fi

\index{accents|(}
\index{accents>multiple per character}
\index{multiple accents per character}
Accents\label{multiple-accents} are another special case of combining
existing symbols to make new symbols.  While various tables in this
document show how to add an accent to an existing symbol, some
applications, such as transliterations from non-Latin alphabets,
require \emph{multiple} accents per character.  For instance, the
creator of pdf\TeX\ writes his name as ``H\`an
Th\diatop[\'|\^e]\index{Thanh, Han The=\thanhhanthe} Th\`anh''.  The
\pkgname[pkg=vntex]{dblaccnt} package enables \latex{} to stack accents,
as in ``\verb|H\`an| \verb|Th\'{\^e}| \verb|Th\`anh|'' (albeit not in
the OT1 \fntenc[OT1]).  In addition, the \pkgname{wsuipa} package
defines \cmd{\diatop} and \cmd{\diaunder} macros for putting one or
more diacritics or accents above or below a given character.
\ifTIPA\ifWIPA
  For example,
  \verb+\diaunder[{\diatop[\'|\=]}|+\linebreak[0]\verb+\textsubdot{r}]+
  produces ``\diaunder[{\diatop[\'|\=]}|\textsubdot{r}]''.
\fi\fi
\seedocs{\pkgname{wsuipa}}.

\index{accents>any character as}
The \pkgname{accents} package facilitates the fabrication of accents
in math mode.  Its \cmd{\accentset} command enables \emph{any}
character to be used as an accent.
\ifACCENTS
  For instance, \cmd{\accentset}\verb+{+\cmdX{\star}\verb+}{f}+
  produces ``$\accentset{\star}{f}\,$'' and
  \cmd{\accentset}\verb+{e}{X}+ produces ``$\accentset{e}{X}$''.
\fi
\cmd{\underaccent} does the same thing, but places the accent beneath
the character.
\ifACCENTS
  This enables constructs like
  \cmd{\underaccent}\verb+{+\cmdI[$\string\blackacc{\string\ACCENTStilde}$]{\tilde}\verb+}{V}+,
  which produces ``$\underaccent{\ACCENTStilde}{V}$''.\index{tilde}
\fi
\pkgname{accents} provides other accent-related features as well; see
the documentation for more information.
\index{accents|)}


\subsection{Creating extensible symbols}

\index{symbols>extensible|(}
\index{extensible symbols>creating|(}

A relatively simple example of creating extensible symbols stems from
a \ctt post by \person{Donald}{Arseneau} (June~2003).  The following
code defines an equals sign that extends as far to the right as
possible, just like \latex's \verb|\hrulefill| command:

\makeatletter
   \def\equalsfill{$\m@th\mathord=\mkern-7mu
   \cleaders\hbox{$\!\mathord=\!$}\hfill
   \mkern-7mu\mathord=$}
\makeatother

\begin{verbatim}
   \makeatletter
   \def\equalsfill{$\m@th\mathord=\mkern-7mu
     \cleaders\hbox{$\!\mathord=\!$}\hfill
     \mkern-7mu\mathord=$}
   \makeatother
\end{verbatim}

\noindent
\tex's \verb|\cleaders| and \verb|\hfill| primitives are the key to
understanding \cmd{\equalsfill}'s extensibility.  Essentially,
\cmd{\equalsfill} repeats a box containing ``$=$'' plus some negative
space until it fills the maximum available horizontal space.
\cmd{\equalsfill} is intended to be used with \latex's \cmd{\stackrel}
command, which stacks one mathematical expression (slightly reduced in
size) atop another.  Hence, ``\cmd{\stackrel}\verb|{a}{\rightarrow}|''
produces ``$\stackrel{a}{\rightarrow}$'' and ``X
\cmd{\stackrel}\verb|{\text{definition}}{\hbox{|\cmd{\equalsfill}\verb|}}|
Y'' produces ``$X \stackrel{\text{definition}}{\hbox{\equalsfill}}
Y$''.\idxboth{definition}{symbols}\label{equalsfill-ex}

\index{symbols>actuarial|(}
\index{actuarial symbols|(}
\index{symbols>annuity|(}
\index{annuity symbols|(}
\index{symbols>life insurance|(}
\index{life-insurance symbols|(}
\index{symbols>present value|(}
\index{present-value symbols|(}

If all that needs to extend are horizontal and vertical lines---as
opposed to repeated symbols such as the ``$=$'' in the previous
example---\latex's \verb|array| or \verb|tabular| environments may
suffice.  Consider the following code (due to a February~1999 \ctt
post by \person{Donald}{Arseneau} and subsequent modifications by
\person{Billy}{Yu} and \person{Scott}{Pakin}) for typesetting annuity
and life-insurance symbols:

   \DeclareRobustCommand{\actuarial}[2][]{%
     \def\arraystretch{0}%
     \setlength\arraycolsep{0.5pt}%
     \setlength\arrayrulewidth{0.5pt}%
     \setbox0=\hbox{$\scriptstyle#1#2$}%
     \begin{array}[b]{*2{@{}>{\scriptstyle}c}|}
       \cline{2-2}%
       \rule[1.25pt]{0pt}{\ht0}%
       #1 & #2%
     \end{array}%
   }

\begin{verbatim}
   \DeclareRobustCommand{\actuarial}[2][]{%
     \def\arraystretch{0}%
     \setlength\arraycolsep{0.5pt}%
     \setlength\arrayrulewidth{0.5pt}%
     \setbox0=\hbox{$\scriptstyle#1#2$}%
     \begin{array}[b]{*2{@{}>{\scriptstyle}c}|}
       \cline{2-2}%
       \rule[1.25pt]{0pt}{\ht0}%
       #1 & #2%
     \end{array}%
   }
\end{verbatim}

\noindent
Using the preceding definition, one can type,
e.g.,~``\verb|$a_{\actuarial{n}}$|'' to produce
``$a_{\actuarial{n}}$'' and ``\verb|$a_{\actuarial[x:]{n}}$|'' to
produce
``$a_{\actuarial[x:]{n}}$''\indexaccent[$\string\blackacc\string\actuarial$]{\actuarial}.
\ifACTANG
  This is similar in concept to how the \ACTANG\ package defines its
  \verb|\actuarialangle|\indexaccent[\string\blackacc\string\actuarial]{\actuarialangle}
  command (\ref{actuarialangle}).
\fi   % ACTANG test
For a more complete solution for typesetting actuarial symbols see
the \pkgname{actuarialsymbol} package.

\index{symbols>actuarial|)}
\index{actuarial symbols|)}
\index{symbols>annuity|)}
\index{annuity symbols|)}
\index{symbols>life insurance|)}
\index{life-insurance symbols|)}
\index{symbols>present value|)}
\index{present-value symbols|)}

\index{accents|(}
\index{extensible accents|(}
\index{accents>extensible|(}

A more complex example of composing accents is the following
definition of extensible \cmdW{\overbracket}, \cmdW{\underbracket},
\cmdW{\overparenthesis}, and \cmdW{\underparenthesis} symbols, taken
from a May~2002 \ctt post by \person{Donald}{Arseneau}:

\indexcommand{\ialign}%
\makeatletter
\def\overbracket#1{\mathop{\vbox{\ialign{##\crcr\noalign{\kern3\p@}
      \DAdownbracketfill\crcr\noalign{\kern3\p@\nointerlineskip}
      $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
\def\underbracket#1{\mathop{\vtop{\ialign{##\crcr
      $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern3\p@\nointerlineskip}
      \DAupbracketfill\crcr\noalign{\kern3\p@}}}}\limits}
\def\overparenthesis#1{\mathop{\vbox{\ialign{##\crcr\noalign{\kern3\p@}
      \downparenthfill\crcr\noalign{\kern3\p@\nointerlineskip}
      $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
\def\underparenthesis#1{\mathop{\vtop{\ialign{##\crcr
      $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern3\p@\nointerlineskip}
      \upparenthfill\crcr\noalign{\kern3\p@}}}}\limits}
\def\downparenthfill{$\m@th\braceld\leaders\vrule\hfill\bracerd$}
\def\upparenthfill{$\m@th\bracelu\leaders\vrule\hfill\braceru$}
\def\DAupbracketfill{$\m@th\makesm@sh{\llap{\vrule\@height3\p@\@width.7\p@}}%
  \leaders\vrule\@height.7\p@\hfill
  \makesm@sh{\rlap{\vrule\@height3\p@\@width.7\p@}}$}
\def\DAdownbracketfill{$\m@th
  \makesm@sh{\llap{\vrule\@height.7\p@\@depth2.3\p@\@width.7\p@}}%
  \leaders\vrule\@height.7\p@\hfill
  \makesm@sh{\rlap{\vrule\@height.7\p@\@depth2.3\p@\@width.7\p@}}$}
\makeatother

\indexcommand{\displaystyle}%
\indexcommand{\ialign}%
\begin{verbatim}
   \makeatletter
   \def\overbracket#1{\mathop{\vbox{\ialign{##\crcr\noalign{\kern3\p@}
         \downbracketfill\crcr\noalign{\kern3\p@\nointerlineskip}
         $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
   \def\underbracket#1{\mathop{\vtop{\ialign{##\crcr
         $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern3\p@\nointerlineskip}
         \upbracketfill\crcr\noalign{\kern3\p@}}}}\limits}
   \def\overparenthesis#1{\mathop{\vbox{\ialign{##\crcr\noalign{\kern3\p@}
         \downparenthfill\crcr\noalign{\kern3\p@\nointerlineskip}
         $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
   \def\underparenthesis#1{\mathop{\vtop{\ialign{##\crcr
         $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern3\p@\nointerlineskip}
         \upparenthfill\crcr\noalign{\kern3\p@}}}}\limits}
   \def\downparenthfill{$\m@th\braceld\leaders\vrule\hfill\bracerd$}
   \def\upparenthfill{$\m@th\bracelu\leaders\vrule\hfill\braceru$}
   \def\upbracketfill{$\m@th\makesm@sh{\llap{\vrule\@height3\p@\@width.7\p@}}%
     \leaders\vrule\@height.7\p@\hfill
     \makesm@sh{\rlap{\vrule\@height3\p@\@width.7\p@}}$}
   \def\downbracketfill{$\m@th
     \makesm@sh{\llap{\vrule\@height.7\p@\@depth2.3\p@\@width.7\p@}}%
     \leaders\vrule\@height.7\p@\hfill
     \makesm@sh{\rlap{\vrule\@height.7\p@\@depth2.3\p@\@width.7\p@}}$}
   \makeatother
\end{verbatim}

\noindent
\ref{manual-extensible-accents} showcases these accents.
\TeXbook or another book on \tex primitives is indispensible for
understanding how the preceding code works.  The basic idea is that
\cmd{\downparenthfill}, \cmd{\upparenthfill}, \cmd{\downbracketfill},
and \cmd{\upbracketfill} do all of the work; they output a left symbol
(e.g.,~\cmdX{\braceld} [``$\braceld$''] for \cmd{\downparenthfill}), a
horizontal rule that stretches as wide as possible, and a right symbol
(e.g.,~\cmdX{\bracerd} [``$\bracerd$''] for \cmd{\downparenthfill}).
\cmdW{\overbracket}, \cmdW{\underbracket}, \cmdW{\overparenthesis}, and
\cmdW{\underparenthesis} merely create a table whose width is
determined by the given text, thereby constraining the width of the
horizontal rules.

\begin{nonsymtable}{Manually Composed Extensible Accents}
\index{accents}
\idxboth{extensible}{accents}
\label{manual-extensible-accents}
\renewcommand{\arraystretch}{1.75}
\begin{tabular}{*2{ll}}
\W\overbracket{abc}  & \W\overparenthesis{abc}  \\
\W\underbracket{abc} & \W\underparenthesis{abc} \\
\end{tabular}
\end{nonsymtable}

Note that the \pkgname{simplewick} package provides mechanisms for
typesetting Wick\index{Wick contractions} contractions, which utilize
\cmdW{\overbracket}- and \cmdW{\underbracket}-like brackets of
variable width \emph{and} height (or depth).
\ifhavesimplewick
  For example, ``\cmd{\acontraction}\verb|{}{A}{B}{C}|\linebreak[0]%
  \cmd{\acontraction}\verb|[2ex]{A}{B}{C}{D}|\linebreak[0]%
  \cmd{\bcontraction}\verb|{}{A}{BC}{D}|\linebreak[0]\verb|ABCD|'' produces
  \[
    \acontraction{}{A}{B}{C}
    \acontraction[2ex]{A}{B}{C}{D}
    \bcontraction{}{A}{BC}{D}
    ABCD
    \qquad.
  \]
\fi    % simplewick test
\seedocs{\pkgname{simplewick}}.

\index{accents>extensible|)}
\index{extensible accents|)}
\index{accents|)}

\index{symbols>extensible|)}
\index{extensible symbols>creating|)}


\subsection{Developing new symbols from scratch}

Sometimes is it simply not possible to define a new symbol in terms of
existing symbols.  Fortunately, most, if not all, \tex distributions
are shipped with a tool called \metafont which is designed
specifically for creating fonts to be used with \tex.  The
\MFlogo{}book~\cite{Knuth:ct-c} is the authoritative text on
\metafont.  If you plan to design your own symbols with \metafont, The
\MFlogo{}book is essential reading.  You may also want to read the
freely available \MFlogo{} primer located at
\url{http://metafont.tutorial.free.fr/}.  The following is an
extremely brief tutorial on how to create a new \latex symbol using
\metafont.  Its primary purpose is to cover the \latex-specific
operations not mentioned in The \MFlogo{}book and to demonstrate that
symbol-font creation is not necessarily a difficult task.

Suppose we need a symbol to represent a light
bulb~(``\lightbulb'').\footnote{I'm not a very good artist; you'll
have to pretend that~``\lightbulb'' looks like a light bulb.}  The
first step is to draw this in \metafont.  It is common to separate the
font into two files: a size-dependent file, which specifies the design
size and various font-specific parameters that are a function of the
design size; and a size-independent file, which draws characters in
the given size.  \ref{mftoplevel} shows the \metafont code for
\filename{lightbulb10.mf}.  \filename{lightbulb10.mf} specifies
various parameters that produce a 10\,pt.\ light bulb then loads
\filename{lightbulb.mf}.  Ideally, one should produce
\texttt{lightbulb}\meta{size}\fileext{mf} files for a variety of
\meta{size}s.  This is called ``optical\idxboth{optical}{font scaling}
scaling''.  It enables, for example, the lines that make up the light
bulb to retain the same thickness at different font sizes, which looks
much nicer than the alternative---and
default---``mechanical\idxboth{mechanical}{font scaling} scaling''.
When a \texttt{lightbulb}\meta{size}\fileext{mf} file does not exist
for a given size \meta{size}, the computer mechanically produces a
wider, taller, thicker symbol:

\begin{center}
\begin{tabular}{*{13}c}
{\fontsize{10}{10}\lightbulb} & vs.\ &
{\fontsize{20}{20}\lightbulb} & vs.\ &
{\fontsize{30}{30}\lightbulb} & vs.\ &
{\fontsize{40}{40}\lightbulb} & vs.\ &
{\fontsize{50}{50}\lightbulb} & vs.\ &
{\fontsize{60}{60}\lightbulb} & vs.\ &
{\fontsize{70}{70}\lightbulb} \\[-0.5ex]
{\tiny 10\,pt.} & &
{\tiny 20\,pt.} & &
{\tiny 30\,pt.} & &
{\tiny 40\,pt.} & &
{\tiny 50\,pt.} & &
{\tiny 60\,pt.} & &
{\tiny 70\,pt.} \\
\end{tabular}
\end{center}

\begin{figure}[htbp]
\centering
\begin{codesample}
% The following are derived from mftmac.tex.
\def\\#1{\textit{#1}} % italic type for identifiers
\def\2#1{\mathop{\textbf{#1}\/\kern.05em}} % operator, in bold type
\def\9{\hfill$\%} % comment separator
% Matching `$' for Emacs font-lock mode
\def\SH{\raise.7ex\hbox{$\scriptstyle\#$}} % sharp sign for sharped units
\let\BL=\medskip % space for empty line
\def\frac#1/#2{\leavevmode\kern.1em
  \raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em
  /\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}}

% The following are modified from mft's output.
$\2{font\_identifier}:=\verb+"LightBulb10"+;\ \9 Name the font.\par
$\2{font\_size}10\\{pt}\SH ;\ \9 Specify the design size.\par
\BL
$\\{em}\SH :=10\\{pt}\SH ;\ \9 ``M'' width is 10 points.\par
$\\{cap}\SH :=7\\{pt}\SH ;\ \9 Capital letter height is 7 points above the
baseline.\par
$\\{sb}\SH :=\frac1/{4}\\{pt}\SH ;\ \9 Leave this much space on the side of
each character.\par
$o\SH :=\frac1/{16}\\{pt}\SH ;\ \9 Amount that curves overshoot borders.\par
\BL
$\2{input}\hbox{\tt lightbulb}\9 Load the file that draws the actual glyph.\par
% Matching `$' for Emacs font-lock mode
\end{codesample}
\caption{Sample \metafont size-specific file (\filename{lightbulb10.mf})}
\label{mftoplevel}
\end{figure}

\filename{lightbulb.mf}, shown in \ref{mfmain}, draws a light
bulb using the parameters defined in \filename{lightbulb10.mf}.  Note
that the the filenames ``\filename{lightbulb10.mf}'' and
``\filename{lightbulb.mf}'' do not follow the Berry font-naming
scheme~\cite{Berry:fontname}; the Berry font-naming scheme is largely
irrelevant for symbol fonts, which generally lack bold, \italic,
small-caps, slanted, and other such variants.

\begin{figure}[htbp]
\centering
\begin{codesample}
% The following are derived from mftmac.tex.
\def\\#1{\textit{#1}} % italic type for identifiers
\def\1#1{\mathop{\textrm{#1}}} % operator, in roman type
\def\2#1{\mathop{\textbf{#1}\/\kern.05em}} % operator, in bold type
\def\3#1{\,\mathclose{\textbf{#1}}} % `fi' and `endgroup'
\def\5#1{\textbf{#1}} % `true' and `nullpicture'
\def\6#1{\mathbin{\rm#1}} % `++' and `scaled'
\def\8#1{\mathrel{\mathcode`\.="8000 \mathcode`\-="8000
  #1\unkern}} % `..' and `--'
\def\9{\hfill$\%} % comment separator
% Matching `$' for Emacs font-lock mode
\def\SH{\raise.7ex\hbox{$\scriptstyle\#$}} % sharp sign for sharped units
\let\BL=\medskip % space for empty line
\def\frac#1/#2{\leavevmode\kern.1em
  \raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em
  /\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}}
\mathchardef\period=`\.
\newbox\shorthyf \setbox\shorthyf=\hbox{-\kern-.05em}
{\catcode`\-=\active \global\def-{\copy\shorthyf\mkern3.9mu}
 \catcode`\.=\active \global\def.{\period\mkern3mu}}

% The following are modified from mft's output.
$\5{mode\_setup};\ \9 Target a given printer.\par
\BL
$\2{define\_pixels}(\\{em},\\{cap},\\{sb});\ \9 Convert to device-specific
units.\par
$\2{define\_corrected\_pixels}(o);\ \9 Same, but add a device-specific fudge
factor.\par
\BL
\%\% Define a light bulb at the character position for ``A''\par
\%\% with width $\frac1/{2}\\{em}\SH$, height $\\{cap}\SH$, and depth $1\\{pt}\SH$.\par
$\2{beginchar}(\verb+"A"+,\frac1/{2}\\{em}\SH ,\\{cap}\SH ,1\\{pt}\SH );\ \verb+"A light bulb"+;$\par
\quad\quad$\2{pickup}\5{pencircle}\6{scaled}\frac1/{2}\\{pt};\ \9 Use a pen
with a small, circular tip.\par
\BL
\quad\quad\%\% Define the points we need.\par
\quad\quad$\\{top}\,z_{1}=(w/2,h+o);\ \9 $z_1$ is at the top of a circle.\par
\quad\quad$\\{rt}\,z_{2}=(w+\\{sb}+o-x_{4},y_{4});\ \9 $z_2$ is at the same
height as $z_4$ but the opposite side.\par
\quad\quad$\\{bot}\,z_{3}=(z_{1}-(0,w-\\{sb}-o));\ \9 $z_3$ is at the bottom of
the circle.\par
\quad\quad$\\{lft}\,z_{4}=(\\{sb}-o,\frac1/{2}[y_{1},y_{3}]);\ \9 $z_4$ is on the
left of the circle.\par
\quad\quad$\2{path}\\{bulb};\ \9 Define a path for the bulb itself.\par
\quad\quad$\\{bulb}=z_{1}\8{..}z_{2}\8{..}z_{3}\8{..}z_{4}\8{..}\1{cycle};\ \9
The bulb is a closed path.\par
\BL
\quad\quad$z_{5}=\2{point}2-\frac1/{3}\2{of}\\{bulb};\ \9 $z_5$ lies on the
bulb, a little to the right of $z_3$.\par
\quad\quad$z_{6}=(x_{5},0);\ \9 $z_6$ is at the bottom, directly under $z_5$.\par
\quad\quad$z_{7}=(x_{8},0);\ \9 $z_7$ is at the bottom, directly under $z_8$.\par
\quad\quad$z_{8}=\2{point}2+\frac1/{3}\2{of}\\{bulb};\ \9 $z_8$ lies on the
bulb, a little to the left of $z_3$.\par
\quad\quad$\\{bot}\,z_{67}=(\frac1/{2}[x_{6},x_{7}],\\{pen\_bot}-o-\frac1/{8}%
\\{pt});\ \9 $z_{67}$ lies halfway between $z_6$ and $z_7$ but a jot lower.\par
\BL
\quad\quad\%\% Draw the bulb and the base.\par
\quad\quad$\2{draw}\\{bulb};\ \9 Draw the bulb proper.\par
\quad\quad$\2{draw}z_{5}\8{--}z_{6}\8{..}z_{67}\8{..}z_{7}\8{--}z_{8};\ \9
Draw the base of the bulb.\par
\BL
\quad\quad\%\% Display key positions and points to help us debug.\par
\quad\quad$\\{makegrid}(0,\\{sb},w/2,w-\\{sb})(0,-1\\{pt},y_{2},h);\ \9 Label
``interesting'' $x$ and $y$ coordinates.\par
\quad\quad$\\{penlabels}(1,2,3,4,5,6,67,7,8);\ \9 Label control points for
debugging.\par
$\!\3{endchar};$\par
$\!\3{end}$\par
% Matching `$' for Emacs font-lock mode
\end{codesample}
\caption{Sample \metafont size-independent file (\filename{lightbulb.mf})}
\label{mfmain}
\end{figure}

The code in Figures~\ref{mftoplevel} and~\ref{mfmain} is heavily
commented and should demonstrate some of the basic concepts behind
\metafont usage: declaring variables, defining points, drawing lines
and curves, and preparing to debug or fine-tune the output.  Again,
The \MFlogo{}book~\cite{Knuth:ct-c} is the definitive reference on
\metafont programming.

\metafont can produce ``proofs'' of fonts---large, labeled versions
that showcase the logical structure of each character.  In fact, proof
mode is \metafont's default mode.  To produce a proof of
\filename{lightbulb10.mf}, issue the following commands at the
operating-system prompt:

\bigskip
\noindent
\begingroup
\let\usercmd=\textbf
\newlength{\commentlen}%
\settowidth{\commentlen}{Produces \filename{lightbulb10.2602gf}}%
\leftskip=\parindent \parindent=0pt \obeylines
\osprompt \usercmd{mf lightbulb10.mf} \hfill $\Leftarrow$\quad%
  \makebox[\commentlen][l]{Produces \filename{lightbulb10.2602gf}}
\osprompt \usercmd{gftodvi lightbulb10.2602gf} \hfill $\Leftarrow$\quad%
  \makebox[\commentlen][l]{Produces \filename{lightbulb10.dvi}}
\endgroup
\bigskip

\noindent
You can then view \filename{lightbulb10.dvi} with any DVI\index{DVI}
viewer.  The result is shown in \ref{lightbulb10-proof}.
Observe how the grid defined with \textit{makegrid} at the bottom of
\ref{mfmain} draws vertical lines at positions~0, \textit{sb},
$w/2$, and $w - \textit{sb}$ and horizontal lines at positions~0,
$-1$\textit{pt}, $y_2$, and $h$.  Similarly, observe how the
\textit{penlabels} command labels all of the important coordinates:
$z_1, z_2, \ldots, z_8$ and $z_{67}$, which \filename{lightbulb.mf}
defines to lie between $z_6$ and $z_7$.

\begin{figure}[htbp]
  \centering
  \includegraphics[height=6cm]{lightbulb}
  \caption{Proof diagram of \filename{lightbulb10.mf}}
  \label{lightbulb10-proof}
\end{figure}

Most, if not all, \tex distributions include a Plain \tex file called
\testfonttex that is useful for testing new fonts in a variety of
ways.  One useful routine produces a table of all of the characters in
the font:

\bigskip
\noindent
\begingroup
\newcommand*{\usercmd}[1]{\textrm{\textbf{#1}}}%
\leftskip=\parindent \parindent=0pt \ttfamily \obeylines \obeyspaces%
\osprompt \usercmd{tex testfont}
This is TeX, Version 3.14159 (Web2C 7.3.1)
(/usr/share/texmf/tex/plain/base/testfont.tex
Name of the font to test = \usercmd{lightbulb10}
Now type a test command (\string\help for help):)
*\usercmd{\textbackslash{}table}
\vspace{\baselineskip}
*\usercmd{\textbackslash{}bye}
[1]
Output written on testfont.dvi (1 page, 1516 bytes).
Transcript written on testfont.log.
\endgroup
\bigskip

\noindent
The resulting table, stored in \filename{testfont.dvi} and illustrated
in \ref{font-table}, shows every character in the font.  To
understand how to read the table, note that the character code
for~``A''---the only character defined by
\filename{lightbulb10.mf}---is 41 in hexadecimal (base~16) and 101 in
octal (base~8).

\begin{figure}[htbp]
\centering
\fbox{%
\begin{minipage}{0.9\linewidth}
\centering
\vspace*{\baselineskip}
\begin{minipage}{0.95\linewidth}
{\tiny Test of lightbulb10 on March 11, 2003 at 1127}
\vspace{2\baselineskip}

\renewcommand{\tabularxcolumn}[1]{>{\mbox{}\hfill}p{#1}<{\hfill\mbox{}}}%
% The following two lines are modified from testfont.tex
\def\oct#1{\hbox{\normalfont\'{}\kern-.2em\itshape#1\/\kern.05em}} % octal constant
\def\hex#1{\hbox{\normalfont\H{}\ttfamily#1}} % hexadecimal constant

\begin{tabularx}{\linewidth}{@{}*9{X|}X@{}}
      & \oct{0} & \oct{1} & \oct{2} & \oct{3} &
        \oct{4} & \oct{5} & \oct{6} & \oct{7} & \\ \hline
 \oct{10x}
      &    & \lightbulb & & & & & & &
      \raisebox{-0.5\baselineskip}[0pt][0pt]{\hex{4x}} \\ \cline{1-9}
 \oct{11x}
      &    &            & & & & & & & \\ \hline
      & \hex{8} & \hex{9} & \hex{A} & \hex{B} &
        \hex{C} & \hex{D} & \hex{E} & \hex{F} & \\
\end{tabularx}
\end{minipage}
\vspace*{\baselineskip}
\end{minipage}}
\caption{Font table produced by \testfonttex}
\label{font-table}
\end{figure}

The LightBulb10 font is now usable by \tex.  \latexE, however, needs
more information before documents can use the font.  First, we create
a font-description file that tells \latexE how to map fonts in a given
\fntfam\ and encoding to a particular font in a particular font size.
For symbol fonts, this mapping is fairly simple.  Symbol fonts almost
always use the ``U''~(``Unknown'') font encoding and frequently occur
in only one variant: normal weight and non-\italic[italicized].  The
filename for a font-description file is important; it must be of the
form ``\meta{encoding}\meta{family}\fileext{fd}'', where
\meta{encoding} is the lowercase version of the encoding name
(typically~``u'' for symbol fonts) and \meta{family} is the name of
the \fntfam.  For LightBulb10, let's call this ``bulb''.
\ref{bulb-fd-file} lists the contents of \filename{ubulb.fd}.  The
document ``\latexE Font Selection''~\cite{fntguide} describes
\cmd{\DeclareFontFamily} and \cmd{\DeclareFontShape} in detail, but
the gist of \filename{ubulb.fd} is first to declare a
\texttt{U}-encoded version of the \texttt{bulb} \fntfam[bulb] and then
to specify that a \latexE request for a \texttt{U}-encoded version of
\texttt{bulb} with a (\texttt{m})edium font series (as opposed to,
e.g.,~(\texttt{b})old) and a (\texttt{n})ormal font shape (as opposed
to, e.g.,~\italic[(\texttt{it})alic]) should translate into a \tex
request for \filename{lightbulb10.tfm}
mechanically\idxboth{mechanical}{font scaling} scaled to the current
font size.

\begin{figure}[htbp]
\centering
\begin{tabular}{@{}|l|@{}}
  \hline
  \verb+\DeclareFontFamily{U}{bulb}{}+ \\
  \verb+\DeclareFontShape{U}{bulb}{m}{n}{<-> lightbulb10}{}+ \\
  \hline
\end{tabular}
\caption{\latexE font-description file (\filename{ubulb.fd})}
\label{bulb-fd-file}
\end{figure}

The final step is to write a \latexE style file that defines a name
for each symbol in the font.  Because we have only one symbol our
style file, \filename{lightbulb.sty} (\ref{bulb-sty-file}), is rather
trivial.  Note that instead of typesetting ``\texttt{A}'' we could
have had \cmdI{\lightbulb} typeset ``\cmd{\char}\texttt{65}'',
``\cmd{\char}\verb+"41+'', or ``\cmd{\char}\verb+'101+''
(respectively, decimal, hexadecimal, and octal character offsets into
the font).  For a simple, one-character symbol font such as
LightBulb10 it would be reasonable to merge \filename{ubulb.fd} into
\filename{lightbulb.sty} instead of maintaining two separate files.
In either case, a document need only include
``\verb+\usepackage{lightbulb}+'' to make the \verb+\lightbulb+ symbol
available.

\begin{figure}[htbp]
\centering
\begin{tabular}{@{}|l|@{}}
  \hline
  \verb+\newcommand{\lightbulb}{{\usefont{U}{bulb}{m}{n}A}}+ \\
  \hline
\end{tabular}
\caption{\latexE style file (\filename{lightbulb.sty})}
\label{bulb-sty-file}
\end{figure}

\bigskip

\metafont normally produces bitmapped fonts.  However, it is also
possible, with the help of some external tools, to produce \postscript
\PSfont{Type~1} fonts.  These have the advantages of rendering better
in Adobe\regtm\index{Adobe Acrobat} Acrobat\regtm (at least in
versions prior to~6.0) and of being more memory-efficient when handled
by a \postscript interpreter.  See \TeXFAQ{textrace} for pointers to
tools that can produce \PSfont{Type~1} fonts from \metafont.


\section{Math-mode spacing}
\label{math-spacing}

Terms such as ``binary operators'', ``relations'', and ``punctuation''
in \ref{math-symbols} primarily regard the surrounding
spacing.  (See the Short Math Guide for \latex~\cite{Downes:smg} for a
nice exposition on the subject.)  To use a symbol for a different
purpose, you can use the \tex commands \cmd{\mathord}, \cmd{\mathop},
\cmd{\mathbin}, \cmd{\mathrel}, \cmd{\mathopen}, \cmd{\mathclose}, and
\cmd{\mathpunct}.  For example, if you want to use \cmd{\downarrow} as
a variable (an ``ordinary'' symbol) instead of a delimiter, you can
write ``\verb|$3 x + \mathord{\downarrow}$|'' to get the properly
spaced ``$3 x + \mathord{\downarrow}$'' rather than the
awkward-looking ``$3 x + \downarrow$''.  Similarly, to create a
dotted-union\index{dotted union=dotted union ($\dot\cup$)} symbol
(``$\dot\cup$'') that spaces like the ordinary set-union symbol
(\cmdX{\cup}) it must be defined with \cmd{\mathbin}, just as
\cmdX{\cup} is.  Contrast ``\verb|$A \dot{\cup} B$|'' (``$A {\dot\cup}
B$'') with ``\verb|$A \mathbin{\dot{\cup}} B$|'' (``$A
\mathbin{\dot{\cup}} B$'').  See \TeXbook for the definitive
description of math-mode spacing.

The purpose of the ``log-like symbols'' in
\ifAMS
  \ref{log} and~\ref{ams-log}
\else
  \ref{log}
\fi
is to provide the correct amount of spacing around and within
multiletter function names.  \vref{log-spacing} contrasts the
output of the log-like symbols with various, na\"{\i}ve alternatives.
In addition to spacing, the log-like symbols also handle subscripts
properly.  For example, ``\verb|\max_{p \in P}|'' produces ``$\max_{p
\in P}$'' in text, but ``$\displaystyle\max_{p \in P}$'' as part of a
displayed formula.

\begin{nonsymtable}{Spacing Around/Within Log-like Symbols}
\label{log-spacing}
\setlength{\tabcolsep}{1em}
\begin{tabular}{@{}ll@{}} \toprule
\latex{} expression & Output \\ \midrule
\verb|$r \sin \theta$|         & $r \sin \theta$ \rlap{\quad (best)} \\
\verb|$r sin \theta$|          & $r sin \theta$          \\
\verb|$r \mbox{sin} \theta$|   & $r \mbox{sin} \theta$   \\
\verb|$r \mathrm{sin} \theta$| & $r \mathrm{sin} \theta$ \\
\bottomrule
\end{tabular}
\end{nonsymtable}

The \pkgname{amsmath} package makes it straightforward to define new
log-like symbols:

\begin{verbatim}
   \DeclareMathOperator{\atan}{atan}
   \DeclareMathOperator*{\lcm}{lcm}
\end{verbatim}
\ifAMS
  \indexcommand[$\string\atan$]{\atan}%
  \indexcommand[$\string\lcm$]{\lcm}
\else
  \indexcommand{\atan}%
  \indexcommand{\lcm}
\fi   % AMS test

\noindent
The difference between \cmd{\DeclareMathOperator} and
\cmd{\DeclareMathOperator*} involves the handling of subscripts.  With
\cmd{\DeclareMathOperator*}, subscripts are written beneath log-like
symbols in display style and to the right in text style.  This is
useful for limit operators (e.g.,~\cmdX{\lim}) and functions that tend
to map over a set (e.g.,~\cmdX{\min}).  In contrast,
\cmd{\DeclareMathOperator} tells \tex that subscripts should always be
displayed to the right of the operator, as is common for functions
that take a single parameter (e.g.,~\cmdX{\log} and~\cmdX{\cos}).
\ref{new-log-likes} contrasts symbols declared with
\cmd{\DeclareMathOperator} and \cmd{\DeclareMathOperator*} in both
text style~(\texttt{\$}$\ldots$\texttt{\$}) and
display~style~(\texttt{\string\[}$\ldots$\texttt{\string\]}).\footnote{Note
that \cmd{\displaystyle} can be used to force display style
within~\texttt{\$}$\ldots$\texttt{\$} and \cmd{\textstyle} can be used
to force text style
within~\texttt{\string\[}$\ldots$\texttt{\string\]}.}

\begin{nonsymtable}{Defining new log-like symbols}
\label{new-log-likes}
\renewcommand{\tabcolsep}{1em}
\begin{tabular}{@{}lll@{}}
  \toprule
  Declaration function &
  \texttt{\$\string\newlogsym\_\string{p \string\in~P\string}\$} &
  \texttt{\string\[~\string\newlogsym\_\string{p \string\in~P\string}~\string\]} \\
  \midrule

  \texttt{\string\DeclareMathOperator} &
  $\newlogsym_{p \in P}$ &
  $\displaystyle\newlogsym_{p \in P}$ \\[1ex]

  \texttt{\string\DeclareMathOperator*} &
  $\newlogsymSTAR_{p \in P}$ &
  $\displaystyle\newlogsymSTAR_{p \in P}$ \\
  \bottomrule
\end{tabular}
\end{nonsymtable}

It is common to use a thin\idxboth{thin}{space} space~(\cmd{\,})
between the words of a multiword operators, as in
``\verb|\DeclareMathOperator*|\linebreak[0]\verb|{\argmax}|\linebreak[0]\verb|{arg\,max}|''.
\cmdX{\liminf}, \cmdX{\limsup}, and all of the
log-like\idxboth{log-like}{symbols}\index{atomic math objects} symbols
shown in \ref{ams-log} utilize this spacing convention.


\section{Bold mathematical symbols}
\label{bold-math}

\idxbothbegin{bold}{symbols}

\latex\ does not normally use bold symbols when typesetting mathematics.
However, bold symbols are occasionally needed, for example when naming
vectors.  Any of the approaches described at \TeXFAQ{boldgreek} can be
used to produce bold mathematical symbols.  \ref{bold-symbols}
contrasts the output produced by these various techniques.  As the
table illustrates, these techniques exhibit variation in their
formatting of Latin letters (upright vs.\ \italic), formatting of
Greek\index{Greek>bold}\index{Greek>letters} letters (bold
vs.\ normal), formatting of operators and relations (bold
vs.\ normal), and spacing.
\ifXFB
  \pkgname{xfakebold}'s \cmd{\setBold} command is unique in that it takes a
  thickness argument and supports arbitrary symbol thickness, although it
  works only with vector fonts, not bitmapped fonts.
\fi

% The following was copied verbatim from amsbsy.sty.
\makeatletter
\DeclareRobustCommand{\pmb}{%
  \ifmmode\else \expandafter\pmb@@\fi\mathpalette\pmb@}
\def\pmb@@#1#2#3{\leavevmode\setboxz@h{#3}%
   \dimen@-\wdz@
   \kern-.5\ex@\copy\z@
   \kern\dimen@\kern.25\ex@\raise.4\ex@\copy\z@
   \kern\dimen@\kern.25\ex@\box\z@
}
\newdimen\pmbraise@
\def\pmb@#1#2{\setbox8\hbox{$\m@th#1{#2}$}%
  \setboxz@h{$\m@th#1\mkern.5mu$}\pmbraise@\wdz@
  \binrel@{#2}%
  \dimen@-\wd8 %
  \binrel@@{%
    \mkern-.8mu\copy8 %
    \kern\dimen@\mkern.4mu\raise\pmbraise@\copy8 %
    \kern\dimen@\mkern.4mu\box8 }%
}
\makeatother

\begin{nonsymtable}{Producing bold mathematical symbols}
  \idxboth{bold}{symbols}
  \label{bold-symbols}
  \begin{tabular}{@{}lll@{}}
    \toprule
    Package & Code & Output \\
    \midrule

    \textit{none} &
    \verb!$\alpha + b = \Gamma \div D$! &
    $\alpha + b = \Gamma \div D$ \rlap{\qquad (no bold)} \\

    \textit{none} &
    \verb!$!\cmd{\mathbf}\verb!{\alpha + b = \Gamma \div D}$! &
    $\alpha + \textbf{b} = \bm{\Gamma} \div \textbf{D}$ \\

    \textit{none} &
    \cmd{\boldmath}\verb!$\alpha + b = \Gamma \div D$! &
    \boldmath$\alpha + b = \Gamma \div D$ \\

    \pkgname{amsbsy} &
    \verb!$!\cmd{\pmb}\verb!{\alpha + b = \Gamma \div D}$! &
    $\pmb{\alpha + b = \Gamma \div D}$ \rlap{\qquad (faked bold)} \\

    \pkgname{amsbsy} &
    \verb!$!\cmd{\boldsymbol}\verb!{\alpha + b = \Gamma \div D}$! &
    \boldmath$\alpha + b = \Gamma \div D$ \\

    \pkgname{bm} &
    \verb!$!\cmd{\bm}\verb!{\alpha + b = \Gamma \div D}$! &
    $\bm{\alpha + b = \Gamma \div D}$ \\

    \pkgname{fixmath} &
    \verb!$!\cmd{\mathbold}\verb!{\alpha + b = \Gamma \div D}$! &
    \def\GammaIt{\mathord{\usefont{OML}{cmm}{b}{it}\mathchar"7100}}%
    \boldmath$\alpha + b = \GammaIt \div D$ \\

\ifXFB
    \pkgname{xfakebold} &
    \cmd{\setBold}\texttt{[0.3]}
    & \setBold[0.3]$\alpha + b = \Gamma \div D$\unsetBold
    \rlap{\qquad\kern3pt (faked bold)} \\
    & \verb!  $\alpha + b = \Gamma \div D$! \\
    & \verb!\unsetBold! \\
\fi
    \bottomrule
  \end{tabular}
\end{nonsymtable}

\idxbothend{bold}{symbols}


\section{ASCII and Latin~1 quick reference}
\label{ascii-quickref}

\index{ASCII|(}

\vref{ascii-table} amalgamates data from various other tables in this
document into a convenient reference for \latexE typesetting of \ascii
characters, i.e., the characters available on a typical U.S. computer
keyboard.  The first two columns list the character's \ascii code in
decimal and hexadecimal.  The third column shows what the character
looks like.  The fourth column lists the \latexE command to typeset
the character as a text character.  And the fourth column lists the
\latexE command to typeset the character within a
\verb|\texttt{|$\ldots$\verb|}| command (or, more generally, when
\verb|\ttfamily| is in effect).

\index{ASCII|)}

\begin{nonsymtable}{\latexE ASCII Table}
  \index{ASCII>table}
  \index{quotation marks}
  \label{ascii-table}
  % Define an equivalent of \vdots that's the height of a "9".
  \newlength{\digitheight}
  \settoheight{\digitheight}{9}
  \newcommand{\digitvdots}{\raisebox{-1.5pt}[\digitheight]{$\vdots$}}

  % Replace all glyphs in a row with vertical dots.
  \makeatletter
  \newcommand{\skipped}{%
    \settowidth{\@tempdima}{99} \makebox[\@tempdima]{\digitvdots} &
    \settowidth{\@tempdima}{99} \makebox[\@tempdima]{\digitvdots} &
    \digitvdots &
    \digitvdots &
    \digitvdots \\
  }
  \makeatother

  % Typeset a symbol by prefixing it with a "\".
  \newcommand{\bscommand}[1]{#1 & \cmdI{#1} & \cmdI{#1}}

  \begin{adjustwidth}{-1em}{-1em}
    \begin{tabular}[t]{@{}*2{>{\ttfamily}r}c*2{>{\ttfamily}l}l@{}} \\ \toprule
      \multicolumn{1}{@{}c}{Dec} &
      \multicolumn{1}{c}{Hex} &
      \multicolumn{1}{c}{Char} &
      \multicolumn{1}{c}{Body text} &
      \multicolumn{1}{c@{}}{\ttfamily\string\texttt} \\ \midrule

      33 & 21 & ! & ! & ! \\
      34 & 22 & {\fontencoding{T1}\selectfont\textquotedbl} &
      \string\textquotedbl & " \\      % Not available in OT1
      35 & 23 & \bscommand{\#} \\
      36 & 24 & \bscommand{\$} \\
      37 & 25 & \bscommand{\%} \\
      38 & 26 & \bscommand{\&} \\
      39 & 27 & ' & ' & ' \\
      40 & 28 & ( & ( & ( \\
      41 & 29 & ) & ) & ) \\
      42 & 2A & * & * & * \\
      43 & 2B & + & + & + \\
      44 & 2C & , & , & , \\
      45 & 2D & - & - & - \\
      46 & 2E & . & . & . \\
      47 & 2F & / & / & / \\
      48 & 30 & 0 & 0 & 0 \\
      49 & 31 & 1 & 1 & 1 \\
      50 & 32 & 2 & 2 & 2 \\
      \skipped
      57 & 39 & 9 & 9 & 9 \\
      58 & 3A & : & : & : \\
      59 & 3B & ; & ; & ; \\
      60 & 3C & \textless & \cmdI{\textless} & < \\         % Or $<$
      61 & 3D & = & = & = \\ \bottomrule
    \end{tabular}
    \hfil
    \begin{tabular}[t]{@{}*2{>{\ttfamily}r}c*2{>{\ttfamily}l}l@{}} \\ \toprule
      \multicolumn{1}{@{}c}{Dec} &
      \multicolumn{1}{c}{Hex} &
      \multicolumn{1}{c}{Char} &
      \multicolumn{1}{c}{Body text} &
      \multicolumn{1}{c@{}}{\ttfamily\string\texttt} \\ \midrule

      62 & 3E & \textgreater & \cmdI{\textgreater} & > \\   % Or $>$
      63 & 3F & ? & ? & ? \\
      64 & 40 & @ & @ & @ \\
      65 & 41 & A & A & A \\
      66 & 42 & B & B & B \\
      67 & 43 & C & C & C \\
      \skipped
      90 & 5A & Z & Z & Z \\
      91 & 5B & [ & [ & [ \\
            92 & 5C & \textbackslash & \cmdI{\textbackslash} &
            \verb|\char`\\| \\   % \textbackslash works in non-OT1
            93 & 5D & ] & ] & ] \\
      94 & 5E & \textasciicircum & \verb|\textasciicircum| & \verb|\textasciicircum| \\   % Or \^{}
      95 & 5F & \_ & \verb|\_| & \verb|\char`\_| \\   % \_ works in non-OT1
      96 & 60 & ` & ` & ` \\
      97 & 61 & a & a & a \\
      98 & 62 & b & b & b \\
      99 & 63 & c & c & c \\
      \skipped
      122 & 7A & z & z & z \\
      123 & 7B & \{ & \verb|\{| & \verb|\char`\{| \\   % \{ works in non-OT1
      124 & 7C & \textbar & \cmdI{\textbar} & | \\     % Or $|$
      125 & 7D & \} & \verb|\}| & \verb|\char`\}| \\   % \} works in non-OT1
      126 & 7E & \textasciitilde & \verb|\textasciitilde| & \verb|\textasciitilde| \\   % Or \~{} ($\sim$?)
      \\
      \bottomrule
    \end{tabular}
  \end{adjustwidth}
\end{nonsymtable}

The following are some additional notes about the contents of
\ref{ascii-table}:

\begin{itemize}
  \item
  ``\indexcommand[\string\encone{\string\textquotedbl}]{\textquotedbl}{\encone{\textquotedbl}}''
  is not available in the OT1 \fntenc[OT1].

  \item \ref{ascii-table} shows a close quote for character~39 for
    consistency with the open quote shown for character~96.  A
    straight quote can be typeset using \cmdI{\textquotesingle}
    (cf.~\ref{tc-misc}).

  \item
  \index{symbols>upside-down|(}%
  \index{upside-down symbols|(}%
  \label{upside-down}%
  The characters ``\texttt{<}'', ``\texttt{>}'', and ``\texttt{|}'' do
  work as expected in math mode, although they produce, respectively,
  ``\encOone{<}'', ``\encOone{>}'', and ``\encOone{|}'' in text mode
  when using the OT1 \fntenc[OT1].\footnote{Donald\index{Knuth, Donald
    E.}  Knuth didn't think such symbols were important outside of
  mathematics so he omitted them from his text fonts.}  The following
  are some alternatives for typesetting ``\textless'',
  ``\textgreater'', and ``\textbar'':

  \begin{itemize}
    \item Specify a document \fntenc{} other than OT1 (as
    described~\vpageref[above]{altenc}).

    \item Use the appropriate symbol commands from
    \vref{text-predef}, viz.~\cmdI{\textless},
    \cmdI{\textgreater}, and \cmdI{\textbar}.

    \item Enter the symbols in math mode instead of text mode,
    i.e.,~\verb+$<$+, \verb+$>$+, and \verb+$|$+.
  \end{itemize}

  \noindent
  Note that for typesetting metavariables many people prefer
  \cmdI{\textlangle} and \cmdI{\textrangle} to \cmdI{\textless} and
  \cmdI{\textgreater}; i.e., ``\meta{filename}'' instead of
  ``$<$\textit{filename}$>$''.

  \index{symbols>upside-down|)}
  \index{upside-down symbols|)}

  \item Although ``\texttt{/}'' does not require any special
  treatment, \latex additionally defines a \cmdI{\slash} command which
  outputs the same glyph but permits a line~break afterwards.  That
  is, ``\texttt{increase/decrease}'' is always typeset as a single
  entity while ``\verb|increase\slash{}decrease|'' may be typeset with
  ``increase/'' on one line and ``decrease'' on the next.

  \item \label{page:tildes} \index{tilde|(} \cmdI{\textasciicircum}
  can be used instead of \cmdI[\string\^{}]{\^{}}\verb|{}|, and
  \cmdI{\textasciitilde} can be used instead of
  \cmdI[\string\~{}]{\~{}}\verb|{}|.  Note that
  \cmdI{\textasciitilde} and \cmdI[\string\~{}]{\~{}}\verb|{}|
  produce raised, diacritic tildes.  ``Text''
  (i.e.,~vertically\index{tilde>vertically centered} centered)
  tildes can be generated with either the math-mode \cmdX{\sim}
  command (shown in \vref{rel}), which produces a somewhat wide
  ``$\sim$'', or the \TC\ package's \cmdI{\texttildelow} (shown in
  \vref{tc-misc}), which produces a vertically centered
  ``{\fontfamily{ptm}\selectfont\texttildelow}'' in most fonts but a
  baseline-oriented ``\texttildelow'' in \PSfont{Computer Modern},
  \TX, \PX, and various other fonts originating from the
  \tex\ world.  If your goal is to typeset tildes in URLs or Unix
  filenames, your best bet is to use the \pkgname{url} package,
  which has a number of nice features such as proper line-breaking
  of such names.\index{tilde|)}

  \item The various \cmd{\char} commands within \verb|\texttt| are
  necessary only in the OT1 \fntenc[OT1].  In other encodings
  (e.g.,~T1)\subindex{font encodings}{T1}, commands such as
  \cmdIp{\{}, \cmdIp{\}}, \cmdI{\_}, and \cmdI{\textbackslash} all
  work properly.

  \item The code\index{code page 437} page~437 (IBM~PC\index{IBM PC})
  version of \ascii characters~1 to~31 can be typeset
  using the \ASCII\ package.
\ifASCII
  See \vref{ibm-ascii}.
\fi

  \item
    \begingroup
    \newcommand{\otexttt}[1]{{\usefont{OT1}{cmtt}{m}{n}#1}}%
    To replace~``\verb|`|'' and~``\verb|'|'' with the more
    computer-like (and more visibly distinct) ``\otexttt{\char18}''
    and~``\otexttt{\char13}'' within a \texttt{verbatim} environment,
    use the \pkgname{upquote} package.  Outside of \texttt{verbatim},
    you can use \cmd{\char}\texttt{18} and \cmd{\char}\texttt{13} to
    get the modified quote characters.  (The former is actually a
    grave accent.)
    \endgroup
\end{itemize}

\index{Latin 1|(}

Similar to \ref{ascii-table}, \vref{latin1-table} is an amalgamation
of data from other tables in this document.  While \ref{ascii-table}
shows how to typeset the 7-bit \ascii character set,
\ref{latin1-table} shows the Latin~1 (Western European) character set,
also known as ISO-8859-1.

\index{Latin 1|)}

\begin{nonsymtable}{\latexE Latin~1 Table}
  \index{Latin 1}
  \index{copyright}
  \index{trademark}
  \idxboth{registered}{trademark}
  \idxboth{legal}{symbols}
  \label{latin1-table}

  \newcommand{\accented}[2]{#1#2 & \texttt{\string#1\string{#2\string}}}
  \newcommand{\idxencone}[1]{\indexcommand[\string\encone{\string#1}]{#1}\encone{#1}}
  \begin{tabular}[t]{@{}*2{>{\ttfamily}r}c>{\ttfamily}lc@{}} \\ \toprule
    \multicolumn{1}{@{}c}{Dec} &
    \multicolumn{1}{c}{Hex} &
    \multicolumn{1}{c}{Char} &
    \multicolumn{2}{c@{}}{\latexE} \\ \midrule

    161 & A1 & !`                 & !{}` \\
    162 & A2 & \textcent          & \cmdI{\textcent} & (\textsf{tc}) \\
    163 & A3 & \pounds            & \cmdI{\pounds} \\
    164 & A4 & \textcurrency      & \cmdI{\textcurrency} & (\textsf{tc}) \\
    165 & A5 & \textyen           & \cmdI{\textyen} & (\textsf{tc}) \\
    166 & A6 & \textbrokenbar     & \cmdI{\textbrokenbar} & (\textsf{tc}) \\
    167 & A7 & \S                 & \cmdI{\S} \\
    168 & A8 & \textasciidieresis & \cmdI{\textasciidieresis} & (\textsf{tc}) \\
    169 & A9 & \textcopyright     & \cmdI{\textcopyright} \\
    170 & AA & \textordfeminine   & \cmdI{\textordfeminine}   \\
    171 & AB & \idxencone{\guillemetleft} & \string\guillemetleft & (T1) \\
    172 & AC & \textlnot          & \cmdI{\textlnot} & (\textsf{tc}) \\
    173 & AD & -                  & \cmdI[-]{\-} \\
    174 & AE & \textregistered    & \cmdI{\textregistered} \\
    175 & AF & \textasciimacron   & \cmdI{\textasciimacron} & (\textsf{tc}) \\
    176 & B0 & \textdegree        & \cmdI{\textdegree} & (\textsf{tc}) \\
    177 & B1 & \textpm            & \cmdI{\textpm} & (\textsf{tc}) \\
    178 & B2 & \texttwosuperior   & \cmdI{\texttwosuperior} & (\textsf{tc}) \\
    179 & B3 & \textthreesuperior & \cmdI{\textthreesuperior} & (\textsf{tc}) \\
    180 & B4 & \textasciiacute    & \cmdI{\textasciiacute} & (\textsf{tc}) \\
    181 & B5 & \textmu            & \cmdI{\textmu} & (\textsf{tc}) \\
    182 & B6 & \P                 & \cmdI{\P} \\
    183 & B7 & \textperiodcentered & \cmdI{\textperiodcentered} \\
    184 & B8 & \c{}               & \cmdI[\string\blackacchack{\string\c}]{\c}\verb|{}| \\
    185 & B9 & \textonesuperior   & \cmdI{\textonesuperior} & (\textsf{tc}) \\
    186 & BA & \textordmasculine  & \cmdI{\textordmasculine} \\
    187 & BB & \idxencone{\guillemetright} & \string\guillemetright & (T1) \\
    188 & BC & \textonequarter    & \cmdI{\textonequarter} & (\textsf{tc}) \\
    189 & BD & \textonehalf       & \cmdI{\textonehalf} & (\textsf{tc}) \\
    190 & BE & \textthreequarters & \cmdI{\textthreequarters} & (\textsf{tc}) \\
    191 & BF & ?`                 & ?{}` \\
    192 & C0 & \accented{\`}{A} \\
    193 & C1 & \accented{\'}{A} \\
    194 & C2 & \accented{\^}{A} \\
    195 & C3 & \accented{\~}{A} \\
    196 & C4 & \accented{\"}{A} \\
    197 & C5 & \usefont{OT1}{cmr}{m}{n}\AA
                                  & \string\AA \\
    198 & C6 & \AE                & \string\AE \\
    199 & C7 & \accented{\c}{C} \\
    200 & C8 & \accented{\`}{E} \\
    201 & C9 & \accented{\'}{E} \\
    202 & CA & \accented{\^}{E} \\
    203 & CB & \accented{\"}{E} \\
    204 & CC & \accented{\`}{I} \\
    205 & CD & \accented{\'}{I} \\
    206 & CE & \accented{\^}{I} \\
    207 & CF & \accented{\"}{I} \\
    208 & D0 & \idxencone{\DH}    & \string\DH & (T1) \\ \bottomrule
  \end{tabular}
  \hfil
  \begin{tabular}[t]{@{}*2{>{\ttfamily}r}c>{\ttfamily}lc@{}} \\ \toprule
    \multicolumn{1}{@{}c}{Dec} &
    \multicolumn{1}{c}{Hex} &
    \multicolumn{1}{c}{Char} &
    \multicolumn{2}{c@{}}{\latexE} \\ \midrule

    209 & D1 & \accented{\~}{N} \\
    210 & D2 & \accented{\`}{O} \\
    211 & D3 & \accented{\'}{O} \\
    212 & D4 & \accented{\^}{O} \\
    213 & D5 & \accented{\~}{O} \\
    214 & D6 & \accented{\"}{O} \\
    215 & D7 & \texttimes         & \string\texttimes & (\textsf{tc}) \\
    216 & D8 & \O                 & \string\O \\
    217 & D9 & \accented{\`}{U} \\
    218 & DA & \accented{\'}{U} \\
    219 & DB & \accented{\^}{U} \\
    220 & DC & \accented{\"}{U} \\
    221 & DD & \accented{\'}{Y} \\
    222 & DE & \idxencone{\TH}    & \string\TH & (T1) \\
    223 & DF & \ss                & \string\ss \\
    224 & E0 & \accented{\`}{a} \\
    225 & E1 & \accented{\'}{a} \\
    226 & E2 & \accented{\^}{a} \\
    227 & E3 & \accented{\~}{a} \\
    228 & E4 & \accented{\"}{a} \\
    229 & E5 & \usefont{OT1}{cmr}{m}{n}\aa
                                  & \string\aa \\
    230 & E6 & \ae                & \string\ae \\
    231 & E7 & \accented{\c}{c} \\
    232 & E8 & \accented{\`}{e} \\
    233 & E9 & \accented{\'}{e} \\
    234 & EA & \accented{\^}{e} \\
    235 & EB & \accented{\"}{e} \\
    236 & EC & \accented{\`}{\i} \\
    237 & ED & \accented{\'}{\i} \\
    238 & EE & \accented{\^}{\i} \\
    239 & EF & \accented{\"}{\i} \\
    240 & F0 & \idxencone{\dh}    & \string\dh & (T1) \\
    241 & F1 & \accented{\~}{n} \\
    242 & F2 & \accented{\`}{o} \\
    243 & F3 & \accented{\'}{o} \\
    244 & F4 & \accented{\^}{o} \\
    245 & F5 & \accented{\~}{o} \\
    246 & F6 & \accented{\"}{o} \\
    247 & F7 & \textdiv           & \string\textdiv & (\textsf{tc}) \\
    248 & F8 & \o                 & \string\o \\
    249 & F9 & \accented{\`}{u} \\
    250 & FA & \accented{\'}{u} \\
    251 & FB & \accented{\^}{u} \\
    252 & FC & \accented{\"}{u} \\
    253 & FD & \accented{\'}{y} \\
    254 & FE & \idxencone{\th}    & \string\th & (T1) \\
    255 & FF & \accented{\"}{y} \\ \bottomrule
  \end{tabular}
\end{nonsymtable}

The following are some additional notes about the contents of
\ref{latin1-table}:

\begin{itemize}
  \item A ``(\textsf{tc})'' after a symbol name means that the \TC\
  package must be loaded to access that symbol.  A ``(T1)'' means that
  the symbol requires the T1 \fntenc[T1].  The \pkgname{fontenc}
  package can change the \fntenc[document] document-wide.

  \item Many of the \verb|\text|\dots\ accents can also be produced
  using the accent commands shown in \vref{text-accents} plus an
  empty argument.  For instance,
  \verb|\={}|\index{_=\magicequalname{}\verb+{}+ (\magicequal{})}
  is essentially the same as \cmd{\textasciimacron}.

  \item The commands in the ``\latexE'' columns work both in body text
  and within a \verb|\texttt{|$\ldots$\verb|}| command (or, more
  generally, when \verb|\ttfamily| is in effect).

  \item The ``\pounds'' and ``\$'' glyphs occupy the same slot~(36) of
  the OT1 \fntenc[OT1], with ``\pounds'' appearing in \italic\ fonts
  and ``\$'' appearing in roman fonts.  Until the 2020/02/02 release
  of \latex, a problem with \latex's default handling of this
  double-mapping was that
  ``\texttt{\string{\string\sffamily\linebreak[0]\string\slshape\linebreak[0]\string\pounds\string}}''
  produced
  ``{\fontencoding{OT1}\sffamily\slshape\selectfont\textdollar}'', not
  ``{\fontencoding{T1}\sffamily\slshape\selectfont\textsterling}''.
  Other \fntenc{}s use separate slots for the two characters and
  therefore always have been robust to the problem of
  ``\pounds''/''\$'' conflicts.

  \item Character~173, \cmdI[-]{\-}, is shown as ``-'' but is actually
  a discretionary\index{discretionary hyphen}\index{hyphen,
  discretionary} hyphen; it appears only at the end of a line.
\end{itemize}

\index{code page 1252|(}
Microsoft\regtm\index{Microsoft Windows=Microsoft Windows}
Windows\regtm\index{Windows=Windows\regtm} normally uses a superset of
Latin~1 called ``Code Page~1252'' or ``CP1252'' for short.  CP1252
introduces symbols in the Latin~1 ``invalid'' range
(characters~128--159).  \ref{cp1252-table} presents the characters
with which CP1252 augments the standard Latin~1\index{Latin 1} table.
\index{code page 1252|)}

\begin{nonsymtable}{\latexE Code Page~1252 Table}
  \index{code page 1252>table}
  \index{quotation marks}
  \index{trademark}
  \index{dots (ellipses)} \index{ellipses (dots)}
  \label{cp1252-table}
  \newcommand{\accented}[2]{#1#2 & \texttt{\string#1\string{#2\string}}}
  \newcommand{\idxencone}[1]{\indexcommand[\string\encone{\string#1}]{#1}\encone{#1}}

  \begin{tabular}[t]{@{}*2{>{\ttfamily}r}c>{\ttfamily}lc@{}} \\ \toprule
    \multicolumn{1}{@{}c}{Dec} &
    \multicolumn{1}{c}{Hex} &
    \multicolumn{1}{c}{Char} &
    \multicolumn{2}{c@{}}{\latexE} \\ \midrule
    128 & 80 & \texteuro          & \cmdI{\texteuro} & (\textsf{tc}) \\
    130 & 82 & \idxencone{\quotesinglbase} & \string\quotesinglbase & (T1) \\
    131 & 83 & \textit{f}         & \verb|\textit{f}| \\
    132 & 84 & \idxencone{\quotedblbase}   & \string\quotedblbase & (T1) \\
    133 & 85 & \dots              & \cmdI{\dots} \\
    134 & 86 & \dag               & \cmdI{\dag} \\
    135 & 87 & \ddag              & \cmdI{\ddag} \\
    136 & 88 & \^{}               & \verb|\^{}| \\
    137 & 89 & \textperthousand   & \cmdI{\textperthousand} & (\textsf{tc}) \\
    138 & 8A & \accented{\v}{S}   \\
    139 & 8B & \idxencone{\guilsinglleft}  & \string\guilsinglleft & (T1) \\
    140 & 8C & \OE                & \cmdI{\OE} \\
    142 & 8E & \accented{\v}{Z}   \\
    \bottomrule
  \end{tabular}
  \hfil
  \begin{tabular}[t]{@{}*2{>{\ttfamily}r}c>{\ttfamily}lc@{}} \\ \toprule
    \multicolumn{1}{@{}c}{Dec} &
    \multicolumn{1}{c}{Hex} &
    \multicolumn{1}{c}{Char} &
    \multicolumn{2}{c@{}}{\latexE} \\ \midrule
    145 & 91 & `                  & ` \\
    146 & 92 & '                  & ' \\
    147 & 93 & ``                 & `` \\
    148 & 94 & ''                 & '' \\
    149 & 95 & \textbullet        & \cmdI{\textbullet} \\
    150 & 96 & --                 & -- \\
    151 & 97 & ---                & --- \\
    152 & 98 & \~{}               & \verb|\~{}| \\
    153 & 99 & \texttrademark     & \cmdI{\texttrademark} \\
    154 & 9A & \accented{\v}{s}   \\
    155 & 9B & \idxencone{\guilsinglright}  & \string\guilsinglright & (T1) \\
    156 & 9C & \oe                & \cmdI{\oe} \\
    158 & 9E & \accented{\v}{z}   \\
    159 & 9F & \accented{\"}{Y}   \\
    \bottomrule
  \end{tabular}
\end{nonsymtable}

The following are some additional notes about the contents of
\ref{cp1252-table}:

\begin{itemize}
  \item As in \ref{latin1-table}, a ``(\textsf{tc})'' after a
  symbol name means that the \TC\ package must be loaded to access
  that symbol.  A ``(T1)'' means that the symbol requires the T1
  \fntenc[T1].  The \pkgname{fontenc} package can change the
  \fntenc[document] document-wide.

  \item Not all characters in the 128--159 range are defined.

  \item Look up ``euro'' in the index for alternatives to
  \cmdI{\texteuro}.
\end{itemize}

\index{ISO character entities|(}
\setpkgnameopts{isoent}{link=https://www.bitjungle.com/isoent/}
While too large to incorporate into this document, a listing of
ISO~8879:1986 SGML\index{SGML}/XML\index{XML} character entities and
their \latex{} equivalents is available from
\url{https://www.bitjungle.com/isoent/}.  Some of the characters
presented there make use of \pkgname{isoent}, a \latexE{} package
(available from the same URL) that fakes certain missing ISO glyphs
using the \latex\ \texttt{picture}
environment.\footnote{\pkgname{isoent} is not featured in this
document, because it is not available from \CTAN and because the faked
symbols are not ``true'' characters; they exist in only one size,
regardless of the body text's font size.}  \index{ISO character
  entities|)}


\section{Unicode characters}
\label{unicode-chars}

\index{Unicode|(}

\href{https://www.unicode.org/}{Unicode} is a ``universal character
set''---a standard for encoding (i.e.,~assigning unique numbers to)
the symbols appearing in many of the world's languages.  While \ascii
can represent 128 symbols and Latin~1 can represent 256 symbols,
Unicode can represent an astonishing 1,114,112 symbols.

Because \tex and \latex{} predate the Unicode standard and Unicode
fonts by almost a decade, support for Unicode has had to be added to
the base \tex{} and \latex{} systems.  Note that \latex{}
distinguishes between \emph{input} encoding---the characters that
appear in the \fileext{tex} source file---and \emph{output}
encoding---the characters that appear in the generated \fileext{dvi},
\fileext{pdf}, etc.\ file.

By way of terminology, a Unicode \emph{code point} is a number that
indexes into the list of all Unicode symbols to uniquely identify one.
The convention is to notate code points as ``U+\meta{hexadecimal
  number}'', commonly padding the number to at least four hexits.
\ifTWEM
  For example, the code point U+0041 is the index for ``A'', U+03C9 is
  the index for ``$\omega$'', and U+1F60E is the index for
  ``\texttwemoji{1f60e}''.
\else
  For example, the code point U+0041 is the index for ``A'', and
  U+03C9 is the index for ``$\omega$''.
\fi


\subsection{Inputting Unicode characters}

The easiest way to include Unicode characters in a \fileext{tex} file
is to enter them directly and build your document using either
\lualatex or \xelatex.

The process is more involved for other \latex engines such as
\pdflatex\@.  Load the \pkgname[pkg=unicode]{ucs} package, and load
the \pkgname{inputenc} package with the \optname{inputenc}{utf8x}
(``\utfviii extended'') option.\footnote{\utfviii is the 8-bit Unicode
Transformation Format, a popular mechanism for representing Unicode
code points as sequences of one to four bytes.}  These packages
enable \latex{} to translate \utfviii sequences to \latex{} commands,
which subsequently are processed as normal.  For example, the \utfviii
text
``\texttt{Copyright~\textcopyright\ \the\year}''---``\texttt{\textcopyright}''
is not an \ascii character and therefore cannot be input directly
without packages such as
\pkgname[pkg=unicode]{ucs}/\pkgname{inputenc}---is converted
internally by \pkgname{inputenc} to ``\texttt{Copyright}
\verb+\textcopyright{}+ \texttt{\the\year}'' and therefore typeset as
``Copyright~\textcopyright\ \the\year''.

The \pkgname[pkg=unicode]{ucs}\slash\pkgname{inputenc} combination
supports only a tiny subset of Unicode's million-plus symbols.
Additional symbols can be added manually using the
\cmd{\DeclareUnicodeCharacter} command.
\cmd{\DeclareUnicodeCharacter} takes two arguments: a Unicode code
point and a \latex{} command to execute when the corresponding Unicode
character is encountered in the input.  For example, the Unicode
character ``degree celsius''~(``\,\textcelsius\,'') appears at code
point U+2103.  However, ``\,\texttt{\textcelsius}\,'' is not one of
the characters that \pkgname[pkg=unicode]{ucs} and \pkgname{inputenc}
recognize.  The following document shows how to use
\cmd{\DeclareUnicodeCharacter} to tell \latex{} that the
``\,\texttt{\textcelsius}\,'' character should be treated as a synonym
for \cmdI{\textcelsius}:

\begin{verbatim}
   \documentclass{article}
   \usepackage{ucs}
   \usepackage[utf8x]{inputenc}
   \usepackage{textcomp}

   \DeclareUnicodeCharacter{"2103}{\textcelsius}   % Enable direct input of U+2103.
\end{verbatim}
\noindent
\verb|   \begin{document}| \\
\verb|   |\texttt{It was a balmy 21\textcelsius.} \\
\verb|   \end{document}|

\bigskip

\noindent
which produces

\begin{quotation}
  It was a balmy 21\textcelsius.
\end{quotation}

\seedocs{\pkgname[pkg=unicode]{ucs}} and for descriptions of the various
options that control \pkgname[pkg=unicode]{ucs}'s behavior.


\subsection{Outputting Unicode characters}

Orthogonal to the ability to include Unicode characters in a
\latex\ input file is the ability to include a given Unicode character
in the corresponding output file.  By far the easiest approach is to
use \lualatex or \xelatex instead of \pdflatex or ordinary \latex.
\lualatex and \xelatex handle Unicode input and output natively and
can utilize system fonts directly without having to expose them via
\fileext{tfm}, \fileext{fd}, and other such files.  To output a
Unicode character, a \lualatex or \xelatex document can either include
that character directly as \utfviii text or use \tex's \cmd{\char}
primitive, which \lualatex/\xelatex extends to accept numbers larger
than~255.

\ifJUNI
  \newcommand{\versicleIDX}{\index{versicle=versicle (\versicle)}}
  \newcommand{\responseIDX}{\index{response=response (\response)}}
\else
  \newcommand{\versicleIDX}{\index{versicle}}
  \newcommand{\responseIDX}{\index{response}}
\fi

Suppose we want to output the symbols for
\ifJUNI
  versicle\versicleIDX~(``\versicle'') and response\responseIDX~(``\response'')
\else
  versicle\versicleIDX{} and response\responseIDX{}
\fi
in a document.  The \href{https://www.unicode.org/charts/}{Unicode
  charts} list ``versicle\versicleIDX'' at code point~U+2123 and
``response\responseIDX'' at position~U+211F\@.  We therefore need to
install a font that contains those characters at their proper
positions.  One such font that is freely available from \CTAN is
Junicode
(\hfilename{https://mirror.ctan.org/fonts/junicode/fonts/Junicode.ttf}{Junicode.ttf})
from the \JUNI\ package.  The \pkgname{fontspec} package makes it easy
for a \lualatex/\xelatex document to utilize a system font.  The
following example defines a \texttt{\string\textjuni} command that
uses \pkgname{fontspec} to typeset its argument in Junicode:

\begin{verbatim}
   \documentclass{article}
   \usepackage{fontspec}

   \newcommand{\textjuni}[1]{{\fontspec{Junicode}#1}}

   \begin{document}
   We use ``\textjuni{\char"2123}'' for a versicle
   and ``\textjuni{\char"211F}'' for a response.
   \end{document}
\end{verbatim}

\ifJUNI
  \noindent
  which produces

  \begin{quotation}
    We use ``\versicle'' for a versicle\versicleIDX\ and ``\response''
    for a response\responseIDX.
  \end{quotation}
\fi

\noindent
(Typesetting the entire document in Junicode would be even easier.
\seedocs{\pkgname{fontspec}} regarding font selection.)  Note how the
preceding example uses \cmd{\char} to specify a Unicode character by
code point.  The double quotes before the number indicate that the
number is represented in hexadecimal instead of decimal.


\subsection{Finding fonts providing a Unicode character}

\index{albatross=\texttt{albatross}|(}

Operating systems and \tex distributions may provide a large number of
fonts, but most fonts provide only a very small subset of the
characters defined by the Unicode standard.  The
\href{https://gitlab.com/islandoftex/albatross/}{\texttt{albatross}}
command-line program, which is included in many \tex distributions,
takes a list of Unicode code points and outputs the names all
installed fonts that include every character in that list.  As an
example, \ref{fig:albatross} presents a list of installed fonts that
include code point U+1F601%
\ifTWEM
~(``\texttwemoji{1f600}'')%
\fi.
Note that you likely will observe a different list on your computer.

\begin{figure}[htbp]
  \centering
  \includegraphics[width=0.75\linewidth]{albatross}
  \caption{Example output from \texttt{albatross -\kern0pt-include-tex-fonts 0x1F601}}
  \label{fig:albatross}
\end{figure}


\index{albatross=\texttt{albatross}|)}

\index{Unicode|)}


\section{About this document}
\label{about-doc}

\paragraph{History}
\person{David}{Carlisle} wrote the first version of this document in
October, 1994.  It originally contained all of the native \latex{}
symbols (\ref{bin}, \ref{op}, \ref{rel}, \ref{arrow}, \ref{log},
\ref{greek}, \ref{dels}, \ref{ldels}, \ref{math-accents},
\ref{extensible-accents}, \ref{ord}, and a few tables that have since
been reorganized) and was designed to be nearly identical to the
tables in Chapter~3 of Leslie\index{Lamport, Leslie} Lamport's
book~\cite{Lamport:latex}.  Even the table captions and the order of
the symbols within each table matched!  The \AMS\ symbols
(\ref{ams-bin}, \ref{ams-rel}, \ref{ams-nrel}, \ref{ams-arrows},
\ref{ams-narrows}, \ref{ams-greek}, \ref{ams-hebrew}, \ref{ams-del},
and \ref{ams-misc}) and an initial Math Alphabets table
(\ref{alphabets}) were added thereafter.  Later,
\person{Alexander}{Holt} provided the \ST\ tables (\ref{st-bin},
\ref{st-large}, \ref{st-rel}, \ref{st-arrows}, \ref{st-ext}, and
\ref{st-del}).

In January, 2001, \person{Scott}{Pakin} took responsibility for
maintaining the symbol list and has since implemented a complete
overhaul of the document.  The result, now called, ``The \doctitle'',
includes the following new features:

\begin{itemize}
  \item the addition of a handful of new math alphabets, dozens of new
  font tables, and thousands of new symbols

  \item the categorization of the symbol tables into body-text
  symbols, mathematical symbols, science and technology symbols,
  dingbats, ancient languages, and other symbols, to provide a more
  user-friendly document structure

  \item an index, table of contents, hyperlinks, and a
  frequently-requested symbol list, to help users quickly locate
  symbols

  \item symbol tables rewritten to list the symbols in alphabetical
  order

  \item appendices providing additional information relevant to using
  symbols in \latex{}

  \item tables showing how to typeset all of the characters in the
    \ascii and Latin~1\index{Latin 1}
    \fntenc[ASCII]s\subindex{font encodings}{Latin 1}
\end{itemize}

\noindent
Furthermore, the internal structure of the document has been
completely altered from \person{David}{Carlisle}'s original version.
Most of the changes are geared towards making the document easier to
extend, modify, and reformat.


\paragraph{Build characteristics}
\vref{doc-characteristics} lists some of this document's build
characteristics.  Most important is the list of packages that \latex{}
couldn't find, but that \selftex otherwise would have been able to
take advantage of.  Complete, prebuilt versions of this document are
available from \CTAN\ via
\url{https://www.ctan.org/pkg/comprehensive/}.  \ref{package-dates}
shows the package date (specified in the \verb|.sty|~file with
\cmd{\ProvidesPackage}) for each package that was used to build this
document and that specifies a package date.
\ifluatex
  % Sort the two package lists.
  \makeatletter
  \edef\foundpkgs{\luadirect{sortlist(\luastring{\foundpkgs})}}
  \edef\missingpkgs{\luadirect{sortlist(\luastring{\missingpkgs})}}
  \makeatother
\else
  Packages are not listed in any particular order in either
  \ref{doc-characteristics} or~\ref{package-dates}.
\fi

\begin{nonsymtable}{Document Characteristics}
\label{doc-characteristics}
\bgroup
  \sffamily
  \xdef\orighyphenchar{\the\hyphenchar\font}
  \hyphenchar\font=-1
\egroup
\begin{tabular}{@{}l>{\raggedright\arraybackslash}p{0.5\textwidth}@{}}
  \toprule
  Characteristic      & Value \\
  \midrule
  Source file:        & \selftex \\
  Build date:         & \today \\
  Symbols documented: & \approxcount\prevtotalsymbols \\
  Packages included:  & \makeatletter
                          \def\@elt#1{\pkgname{#1}\xspace}
                          \foundpkgs
                        \makeatother \\
  Packages omitted:   & \makeatletter
                          \ifcomplete
                            \emph{none}
                          \else
                            \def\@elt#1{\pkgname{#1}\xspace}
                            \missingpkgs
                          \fi
                        \makeatother \\
\bottomrule
\end{tabular}
\bgroup
  \sffamily
  \hyphenchar\font=\orighyphenchar
\egroup
\end{nonsymtable}


% Automatically generate a table of package version numbers.
\ifhaveplaceins
  \FloatBarrier
\else
  \clearpage
\fi
\makeatletter
\begingroup
  % Given a package name, output the package's date in ISO (YYYY-MM-DD) format.
  \def\show@package@date#1-#2-#3#4#5!!!{%
    \ifnum#1<100 19\fi% ogonek, e.g.
    #1-#2-#3#4%
  }
  \newcommand{\showpackagedate}[1]{{%
    \catcode`\&=12% yfonts.sty obnoxiously uses an unescaped "&" in the package description.
    \xdef\package@date@string{\csname ver@#1.sty\endcsname}%
    \StrSubstitute{\package@date@string}{/}{-}[\package@date@string]%
    \expandafter\show@package@date\package@date@string!!!
  }}

  % Toggle between "&" and "\\".
  \global\newcount\pkg@column
  \gdef\pkg@end@entry{%
    \global\advance\pkg@column by 1\relax
    \ifnum\pkg@column=3\relax
      \let\next=\LT@tabularcr
      \global\pkg@column=0\relax
    \else
      \def\next{&&}%
    \fi
    \next
  }

  % If available, use LuaLaTeX to re-sort the package list so the
  % table's columns appear in alphabetical order.
  \ifluatex
    \edef\foundpkgs{%
      \luadirect{sort_list_columns(\luastring{\foundpkgs}, 3)}%
    }
  \fi

  % Produce the entire table body as a token list.
  \newtoks\pkg@date@toks
  \def\no@date{\multicolumn{1}{c}{\emph{no date}}}
  \def\table@padding{TABLE-PADDING}
  \ExplSyntaxOn
  \def\@elt#1{%
    \str_if_eq:nVTF{#1}{\table@padding}{%
      & \pkg@end@entry
    }{%
      \expandafter\ifx\csname ver@#1.sty\endcsname\relax
        \pkgname{#1} & \no@date \pkg@end@entry
      \else
        \expandafter\ifx\csname ver@#1.sty\endcsname\@empty
          \pkgname{#1} & \no@date \pkg@end@entry
        \else
          \pkgname{#1} & \showpackagedate{#1} \pkg@end@entry
        \fi
      \fi
    }
  }
  \ExplSyntaxOff
  \expandafter\pkg@date@toks\expandafter=\expandafter{\foundpkgs}

  % Output a formatted table that contains the previously defined token list.
  \begin{longnonsymtable}{Package versions used in the preparation of this document}
  \label{package-dates}
  \begin{longtable}{@{}lr*2{clr}@{}}
    \multicolumn{8}{@{}l@{}}{%
      \makebox[0pt][l]{\small\textit{(continued from previous page)}}} \\[3ex]
    \toprule
    Name & \multicolumn{1}{l}{Date} & \qquad &
    Name & \multicolumn{1}{l}{Date} & \qquad &
    Name & \multicolumn{1}{l@{}}{Date} \\
    \cmidrule(r){1-2}\cmidrule(lr){4-5}\cmidrule(l){7-8}
    \endhead
    \toprule
    Name & \multicolumn{1}{l}{Date} & \qquad &
    Name & \multicolumn{1}{l}{Date} & \qquad &
    Name & \multicolumn{1}{l@{}}{Date} \\
    \cmidrule(r){1-2}\cmidrule(lr){4-5}\cmidrule(l){7-8}
    \endfirsthead
    \bottomrule
    \\[1ex]
    \multicolumn{8}{@{}r@{}}{%
      \makebox[0pt][r]{\small\textit{(continued on next page)}}}
    \endfoot
    \endlastfoot
    \the\pkg@date@toks
    \ifnum\pkg@column>0\relax
      \\
    \fi
    \bottomrule
  \end{longtable}
  \end{longnonsymtable}
\endgroup
\makeatother


\section{Copyright and license}
\label{copyright-license}

\noindent
\begin{tabular}{@{}l@{}}
  The \doctitle \\
  Copyright~\copyright\ 2007--\number\year, Scott Pakin \\
\end{tabular}

\bigskip

\noindent
This work may be distributed and/or modified under the conditions of
the \latex\ Project Public License, either version~1.3c of this license
or (at your option) any later version.  The latest version of this
license is in

\begin{center}
  \url{https://www.latex-project.org/lppl.txt}
\end{center}

\noindent
and version~1.3c or later is part of all distributions of \latex\
version 2006/05/20 or later.

\bigskip

This work has the LPPL maintenance status ``maintained''.

\bigskip

The current maintainer of this work is Scott Pakin.

\ifTWEM
  \bigskip

  The Twitter emoji graphics provided by \TWEM\ are licensed under
  \href{https://creativecommons.org/licenses/by/4.0/}{CC-BY 4.0}.
  Copyright~\copyright\ 2019 Twitter, Inc.\ and other contributors.
\fi
