%
% \iffalse
%%
%% Copyright 1995 1996 Sebastian Rahtz
%% Copyright 1997 Sebastian Rahtz, David Carlisle
%%
%
%
%<*dtx>
          \ProvidesFile{lucidabr.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}
%<lucidabright>\ProvidesPackage{lucidabr}
%<lucidbrb>\ProvidesPackage{lucidbrb}
%<lucidbry>\ProvidesPackage{lucidbry}
%<lucbmath&!lucidabright&!luctim>\ProvidesPackage{lucbmath}
%<lucmtime>\ProvidesPackage{lucidtim}
%<lucmin>\ProvidesPackage{lucmin}
%<lucid>\ProvidesPackage{lucid}
%<lucfont>\ProvidesFile{lucfont.tex}
%<driver>\ProvidesFile{lucida.drv}
% \fi
%         \ProvidesFile{lucidabr.dtx}
 [1997/04/17 v4.5 %
%<lucidabright> Lucida Bright +
%<lucidbrb> Lucida Bright (Compatibility, KB Names)
%<lucidbry> Lucida Bright (Compatibility, Y&Y Names)
%<lucbmath> Lucida New Math + Lucida Expert 
%<lucmtime> + Monotype Times
%<lucmin> + Minion
%<lucfont> Lucida Bright text font test
 (SPQR/DPC)]
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\usepackage[set]{longtable}% `set' in case an old copy of the package
\begin{document}
\DocInput{lucidabr.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{2057}
%
% \GetFileInfo{lucidabr.dtx}
%
% \title{The \textsf{lucidabr} package\thanks{This file
%        has version number \fileversion, last
%        revised \filedate.}}
% \author{Sebastian Rahtz, David Carlisle}
% \date{\filedate}
%
% \maketitle
%
% \section{Introduction}
% This file contains \LaTeXe\ package files needed to use
% Lucida Bright fonts, and \texttt{.fd} files for the fonts as
% named by Y\&Y. The \texttt{.fd} and metric files for the Berry-naming
% scheme are available in \texttt{fonts/metrics/bh} on CTAN.
%
% The Lucida Bright font families:
%
% Note that the `demi bold' Lucida fonts are classed as `b' (bold)
% in \LaTeX. The only `bold' font in the Lucida collection is
% the bold sans serif font, which is classed as `ub' (ultra bold).
%
% \begin{longtable}{llll}
% \multicolumn{2}{c}{Font File Name}&
%        \multicolumn{1}{c}{Font Name}
%                                    &\multicolumn{1}{c}{\LaTeX}\\
% Standard  & Original &   & \\ 
% \hline\hline
% \endhead
% hlxb8a   & lfd   & LucidaFax-Demi                   & hlx/b/n\\
% hlxbi8a  & lfdi  & LucidaFax-DemiItalic             & hlx/b/it\\
% hlxr8a   & lfr   & LucidaFax                        & hlx/m/n\\
% hlxri8a  & lfi   & LucidaFax-Italic                 & hlx/m/it\\[5pt]
%
% hlhb8a   & lbd   & LucidaBright-Demi                & hlh/b/n\\
% hlhbi8a  & lbdi  & LucidaBright-DemiItalic          & hlh/b/it\\
% hlhr8a   & lbr   & LucidaBright                     & hlh/m/n\\
% hlhri8a  & lbi   & LucidaBright-Italic              & hlh/m/it\\
% hlhro8a  & lbsl  & LucidaBrightSlanted              & hlh/m/sl\\
% hlhrc8a  & lbrsc & LucidaBrightSmallcaps            & hlh/m/sc\\
% hlhbc8a  & lbdsc & LucidaBrightSmallcaps-Demi       & hlh/b/sc\\[5pt]
%
% hlsbi8a  & lsdi  & LucidaSans-DemiItalic            & hls/b/it\\
% hlsb8a   & lsd   & LucidaSans-Demi                  & hls/b/n\\
% hlsri8a  & lsi   & LucidaSans-Italic                & hls/m/it\\
% hlsr8a   & lsr   & LucidaSans                       & hls/m/n\\
% hlsu8a   & lsb   & LucidaSans-Bold                  & hls/ub/n\\
% hlsui8a  & lsbi  & LucidaSans-BoldItalic            & hls/ub/it\\[5pt]
%
% hlcrf8a  & lbl   & LucidaBlackletter                & hlcf/m/n\\[5pt]
%
% hlcriw8a & lbh   & LucidaHandwriting-Italic         & hlcw/m/n\\[5pt]
%
% hlcrie8a & lbc   & LucidaCalligraphy-Italic         & hlce/m/it\\[5pt]
%
% hlcrn8a  & lbkr  & LucidaCasual                     & hlcn/m/n\\*
% hlcrin8a & lbki  & LucidaCasual-Italic              & hlcn/m/it\\[5pt]
%
% hlsrt8a  & lstr  & LucidaSans-Typewriter            & hlst/m/n\\
% hlsrot8a & lsto  & LucidaSans-TypewriterOblique     & hlst/m/sl\\
% hlsbot8a & lstbo & LucidaSans-TypewriterBoldOblique & hlst/b/sl\\
% hlsbt8a  & lstb  & LucidaSans-TypewriterBold        & hlst/b/n\\[5pt]
%
% hlcrt8a  & lbtr  & LucidaTypewriter                 & hlct/m/n\\
% hlcbt8a  & lbtb  & LucidaTypewriterBold             & hlct/b/n\\
% hlcrot8a & lbto  & LucidaTypewriterOblique          & hlct/m/sl\\
% hlcbot8a & lbtbo & LucidaTypewriterBoldOblique      & hlct/b/sl\\[5pt]
%
% hlcra    & lbma  & LucidaNewMath-Arrows             & hlcm/m/n\\
% hlcba    & lbmad & LucidaNewMath-Arrows-Demi        & hlcm/b/n\\
% hlcrv    & lbme  & LucidaNewMath-Extension          & hlcv/m/n\\
% hlcry    & lbms  & LucidaNewMath-Symbol             & hlcy/m/n\\
% hlcdy    & lbmsd & LucidaNewMath-Symbol-Demi        & hlcy/b/n\\
% hlcrim   & lbmi  & LucidaNewMath-Italic             & hlcm/m/itx\\
% hlcrima  & lbmo  & LucidaNewMath-AltItalic          & hlcm/m/it\\
% hlcdim   & lbmdi & LucidaNewMath-DemiItalic         & hlcm/b/itx\\
% hlcdima  & lbmdo & LucidaNewMath-AltDemiItalic      & hlcm/b/it\\
% hlcrm    & lbmr  & LucidaNewMath-Roman              & hlcm/m/n\\
% hlcdm    & lbmd  & LucidaNewMath-Demibold           & hlcm/b/n\\
% \hline
% \end{longtable}
%
% \StopEventually{}
%
% \section{Packages}
%
%
% \subsection{Lucmtime Package}
% Monotype Times with Lucida Math.
%    \begin{macrocode}
%<*lucmtime>
\def\rmdefault{mntx}
\def\sfdefault{cmss}
\def\ttdefault{cmtt}
\def\Mathdefault{mntluc}
\DeclareSymbolFont{letters}{OML}{mntluc}{m}{it}
\DeclareSymbolFont{operators}{OT1}{mntx}{m}{n}
\SetSymbolFont{letters}{normal}{OML}{mntluc}{m}{it}
\SetSymbolFont{letters}{bold}{OML}{mntluc}{b}{it}
\SetSymbolFont{operators}{bold}{OT1}{mntx}{b}{n}
\SetSymbolFont{operators}{normal}{OT1}{mntx}{m}{n}
%</lucmtime>
%    \end{macrocode}
%
% \subsection{Lucmin Package}
% Adobe Minion with Lucida Math.
%    \begin{macrocode}
%<*lucmin>
\def\rmdefault{zmn}
\def\sfdefault{zmy}
\def\ttdefault{hlct}
\renewcommand{\bfdefault}{b}
\def\Mathdefault{zmnluc}
\DeclareSymbolFont{letters}{OML}{zmnluc}{m}{it}
\DeclareSymbolFont{operators}{OT1}{zmn}{m}{n}
\SetSymbolFont{letters}{normal}{OML}{zmnluc}{m}{it}
\SetSymbolFont{letters}{bold}{OML}{zmnluc}{b}{it}
\SetSymbolFont{operators}{bold}{OT1}{zmn}{b}{n}
\SetSymbolFont{operators}{normal}{OT1}{zmn}{m}{n}
%</lucmin>
%    \end{macrocode}
%
% \subsection{Lucidbrb and lucidbry Packages}
% Compatibility with earlier releases.
%    \begin{macrocode}
%<*lucidbrb>
\RequirePackage[expert,vargreek]{lucidabr}
%</lucidbrb>
%<*lucidbry>
\RequirePackage[LY1]{fontenc}
\RequirePackage[expert,vargreek]{lucidabr}
%</lucidbry>
%    \end{macrocode}
%
% \subsection{Lucidbr and lucbmath Packages}
% Set text and math with Lucida Bright fonts.
% (Lucbmath package only sets the math fonts.)
%    \begin{macrocode}
%<*lucidabright|lucbmath>
\newif\iflucida@expert
\DeclareOption{expert}{\lucida@experttrue}
\DeclareOption{noexpert}{\lucida@expertfalse}
%    \end{macrocode}
% Set up the variant text and math sizes which Y\&Y
% suggest for Lucida. The figures for these two
% options actually come from Frank Mittelbach (oh great one).
%
% The default is to scale, but two options allow you to
% revert to normal behaviour, or get even smaller.
%    \begin{macrocode}
\DeclareOption{nolucidascale}{%
  \def\DeclareLucidaFontShape#1#2#3#4#5#6{%
     \DeclareFontShape{#1}{#2}{#3}{#4}{<->#5}{#6}}}
\DeclareOption{lucidascale}{%
 \def\DeclareLucidaFontShape#1#2#3#4#5#6{%
 \DeclareFontShape{#1}{#2}{#3}{#4}{%
  <-5.5>s*[1.04]#5%
  <5.5-6.5>s*[1.02]#5%
  <6.5-7.5>s*[.99]#5%
  <7.5-8.5>s*[.97]#5%
  <8.5-9.5>s*[.96]#5%
  <9.5-10.5>s*[.95]#5%
  <10.5-11.5>s*[.94]#5%
  <11.5-13>s*[.93]#5%
  <13-15.5>s*[.92]#5%
  <15.5-18.5>s*[.91]#5%
  <18.5-22.5>s*[.9]#5%
  <22.5->s*[.89]#5%
  }{#6}}}
\DeclareOption{lucidasmallscale}{%
 \def\DeclareLucidaFontShape#1#2#3#4#5#6{%
 \DeclareFontShape{#1}{#2}{#3}{#4}{%
  <-5.5>s*[.98]#5%
  <5.5-6.5>s*[.96]#5%
  <6.5-7.5>s*[.94]#5%
  <7.5-8.5>s*[.92]#5%
  <8.5-9.5>s*[.91]#5%
  <9.5-10.5>s*[.9]#5%
  <10.5-11.5>s*[.89]#5%
  <11.5-13>s*[.88]#5%
  <13-15.5>s*[.87]#5%
  <15.5-18.5>s*[.86]#5%
  <18.5-22.5>s*[.85]#5%
  <22.5->s*[.84]#5%
  }{#6}}}
%    \end{macrocode}
%
% Choose style of letters. Italic3 is not really italic at all,
% more a roman font with math spacing. Italic2 is not really
% slanted but a different style of italic, so use an `itx' shape.
%    \begin{macrocode}
\DeclareOption{mathitalic1}{\def\letters@shape{it}}
\DeclareOption{mathitalic2}{\def\letters@shape{itx}}
\DeclareOption{mathitalic3}{\def\letters@shape{n}}
%    \end{macrocode}
%
% Choose between slanted and upright lowercase Greek.
%    \begin{macrocode}
\DeclareOption{slantedgreek}{\def\lcgreek@alphabet{letters}}
\DeclareOption{uprightgreek}{\def\lcgreek@alphabet{mathupright}}
%    \end{macrocode}
%
% Enable use of |\upalpha| and |\varGamma|.
%    \begin{macrocode}
\DeclareOption{vargreek}{\let\upalpha\relax\let\varGamma\relax}
%    \end{macrocode}
%
% Stop the AMS symbol names being declared.
%    \begin{macrocode}
\DeclareOption{noamssymbols}{\let\blacksquare\endinput}
%    \end{macrocode}
%
% Set up the text encoding used in the operators font.
% \changes{v4.5}{1997/04/17}
%      {use \cs{edef} not \cs{let} to get rid of \cs{long}. psnfss/2441}
%    \begin{macrocode}
\edef\operator@encoding{\encodingdefault}
\DeclareOption{OT1}{\def\operator@encoding{OT1}}
\DeclareOption{T1}{\def\operator@encoding{T1}}
\DeclareOption{LY1}{\def\operator@encoding{LY1}}
%    \end{macrocode}
%
% Set up the text encodings (not in the \textsf{lucmath} package).
%    \begin{macrocode}
%<*lucidabright>
\renewcommand{\rmdefault}{hlh}
\renewcommand{\sfdefault}{hls}
\renewcommand{\ttdefault}{hlst}
\renewcommand{\bfdefault}{b}
\DeclareOption{seriftt}{\def\ttdefault{hlct}}
\DeclareOption{fax}{\def\rmdefault{hlx}}
\DeclareOption{casual}{\def\rmdefault{hlcn}}
\DeclareOption{calligraphic}{%
  \normalfont
  \DeclareFontShape\encodingdefault\rmdefault{m}{it}%
                                   {<->ssub*hlce/m/it}{}}
\DeclareOption{handwriting}{%
  \normalfont
  \DeclareFontShape\encodingdefault\rmdefault{m}{it}%
                                   {<->ssub*hlcw/m/it}{}%
  \DeclareFontShape\encodingdefault\rmdefault{b}{it}%
                                   {<->ssub*hlcw/m/it}{}}
%</lucidabright>
%    \end{macrocode}
%
% \changes{v4.4}{1997/03/12}
%      {Add font tracing options copied from mathtime}
%
% This package makes a lot of redefinitions. The warnings can be rather
% annoying so some package options control whether the information
% is printed to the terminal or log file. More control can be obtained
% by loading the \textsf{tracefnt} package.
%
% Just show font errors; Warning and info to the log file.
% The default for this package.
%    \begin{macrocode}
\DeclareOption{errorshow}{%
   \def\@font@info#1{%
         \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
                     {LaTeX Font Info: \space\space\space#1}}%
    \def\@font@warning#1{%
         \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
                        {LaTeX Font Warning: #1}}}
%    \end{macrocode}
%
% The normal \LaTeX\ default, Font Info to the log file and Font
% Warning to the terminal.
%    \begin{macrocode}
\DeclareOption{warningshow}{%
   \def\@font@info#1{%
         \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
                     {LaTeX Font Info: \space\space\space#1}}%
    \def\@font@warning#1{%
         \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
                        {LaTeX Font Warning: #1}}}
%    \end{macrocode}
%
% On some machines writing all the log info may slow things down
% so extra option not to log font changes at all.
%    \begin{macrocode}
\DeclareOption{nofontinfo}{%
   \let\@font@info\@gobble
   \let\@font@warning\@gobble}
%    \end{macrocode}
%
%    \begin{macrocode}
\ExecuteOptions{noexpert,lucidascale,slantedgreek,mathitalic1,errorshow} 
\ProcessOptions
%    \end{macrocode}
%
%    \begin{macrocode}
%</lucidabright|lucbmath>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*lucbmath>
%    \end{macrocode}
% New encoding scheme for Math Arrows font
%    \begin{macrocode}
 \DeclareFontEncoding{LMR}{}{}
 \DeclareFontSubstitution{LMR}{hlcm}{m}{n}
%<!luctim> \DeclareSymbolFont{letters}{OML}{hlcm}{m}{\letters@shape}
\iflucida@expert
 \DeclareSymbolFont{mathupright}{OML}{hlcm}{m}{n}
\fi
 \DeclareSymbolFont{symbols}{OMS}{hlcy}{m}{n}
 \DeclareSymbolFont{largesymbols}{OMX}{hlcv}{m}{n}
%    \end{macrocode}
% The new Expert set for bold math
%    \begin{macrocode}
\iflucida@expert
%<!luctim> \SetSymbolFont{letters}{bold}{OML}{hlcm}{b}{\letters@shape}
 \SetSymbolFont{mathupright}{bold}{OML}{hlcm}{b}{n}
 \SetSymbolFont{symbols}{bold}{OMS}{hlcy}{b}{n}
\fi
%    \end{macrocode}
%
%    \begin{macrocode}
% \DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}
 \DeclareSymbolFont{arrows}{LMR}{hlcm}{m}{n}
\iflucida@expert
% \DeclareSymbolFont{boldarrows}{LMR}{hlcm}{b}{n}
 \SetSymbolFont{arrows}{bold}{LMR}{hlcm}{b}{n}
\fi
%</lucbmath>
%<*lucbmath>
%<*!luctim>
\DeclareSymbolFont{operators}{\operator@encoding}{\rmdefault}{m}{n}
\SetSymbolFont{operators}{bold}{\operator@encoding}{\rmdefault}{b}{n}
\SetSymbolFont{operators}{normal}{\operator@encoding}{\rmdefault}{m}{n}
%    \end{macrocode}
% 
% Explicitly redeclare all the alphabets just in case, but differentiate
% between pure Lucida, and the Times mixture, since those have genuine
% OT1 mimics.
%    \begin{macrocode}
\DeclareMathAlphabet\mathbf  \operator@encoding{\rmdefault}{b}{n}
\DeclareMathAlphabet\mathrm  \operator@encoding{\rmdefault}{m}{n}
\DeclareMathAlphabet\mathsf  \operator@encoding{\sfdefault}{m}{n}
\DeclareMathAlphabet\mathit  \operator@encoding{\rmdefault}{m}{it}
\DeclareMathAlphabet\mathtt  \operator@encoding{\ttdefault}{m}{n}
\DeclareMathAlphabet\mathfrak\operator@encoding{hlcf}{m}{n}
\SetMathAlphabet{\mathbf}{bold}{\operator@encoding}{\rmdefault}{b}{n}
\SetMathAlphabet{\mathsf}{bold}{\operator@encoding}{\sfdefault}{b}{n}
\SetMathAlphabet{\mathrm}{bold}{\operator@encoding}{\rmdefault}{b}{n}
\SetMathAlphabet{\mathit}{bold}{\operator@encoding}{\rmdefault}{b}{it}
\SetMathAlphabet{\mathtt}{bold}{\operator@encoding}{\ttdefault}{b}{n}
%</!luctim>
%<*luctim>
\DeclareMathAlphabet      {\mathbf}{OT1}{\Mathdefault}{b}{n}
\DeclareMathAlphabet      {\mathrm}{OT1}{\Mathdefault}{m}{n}
\DeclareMathAlphabet      {\mathsf}{OT1}{\sfdefault}{m}{n}
\DeclareMathAlphabet      {\mathit}{OT1}{\Mathdefault}{m}{it}
\DeclareMathAlphabet      {\mathtt}{OT1}{\ttdefault}{m}{n}
\SetMathAlphabet{\mathbf}{bold}{OT1}{\Mathdefault}{b}{n}
\SetMathAlphabet{\mathsf}{bold}{OT1}{\sfdefault}{b}{n}
\SetMathAlphabet{\mathrm}{bold}{OT1}{\Mathdefault}{b}{n}
\SetMathAlphabet{\mathit}{bold}{OT1}{\Mathdefault}{b}{it}
\SetMathAlphabet{\mathtt}{bold}{OT1}{\ttdefault}{b}{n}
%</luctim>
\DeclareSymbolFontAlphabet{\mathbb}{arrows}
\DeclareSymbolFontAlphabet{\mathscr}{symbols}
\iflucida@expert
  \DeclareSymbolFontAlphabet{\mathup}{mathupright}
\fi
 \DeclareMathAccent\vec  {\mathord}{letters}{"7E}
%    \end{macrocode}
%
% Symbols taken from the operators font. Need to be careful
% here as different encodings may have been used.
%
% First check that the AMS have not been redefining |\colon|.
% If it does not have this original plain \TeX\ definition,
% don't redefine it below.
%    \begin{macrocode}
\mathchardef\@tempb"603A
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@tempa{T1}
\ifx\operator@encoding\@tempa
  \DeclareMathSymbol{!}{\mathclose}{operators}{"21}
  \DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
  \DeclareMathSymbol{;}{\mathpunct}{operators}{"3B}
  \DeclareMathSymbol{?}{\mathclose}{operators}{"3F}
  \ifx\colon\@tempb
    \DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
  \fi
  \DeclareMathAccent{\acute}{\mathalpha}{operators}{"1}
  \DeclareMathAccent{\grave}{\mathalpha}{operators}{"0}
  \DeclareMathAccent{\ddot}{\mathalpha}{operators}{"4}
  \DeclareMathAccent{\tilde}{\mathalpha}{operators}{"3}
  \DeclareMathAccent{\bar}{\mathalpha}{operators}{"9}
  \DeclareMathAccent{\breve}{\mathalpha}{operators}{"8}
  \DeclareMathAccent{\check}{\mathalpha}{operators}{"7}
  \DeclareMathAccent{\hat}{\mathalpha}{operators}{"2}
  \DeclareMathAccent{\dot}{\mathalpha}{operators}{"A}
%    \end{macrocode}
%
%    \begin{macrocode}
\else
\def\@tempa{OT1}
\ifx\operator@encoding\@tempa
  \DeclareMathSymbol{!}{\mathclose}{operators}{"21}
  \DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
  \DeclareMathSymbol{;}{\mathpunct}{operators}{"3B}
  \DeclareMathSymbol{?}{\mathclose}{operators}{"3F}
  \ifx\colon\@tempb
    \DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
  \fi
  \DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
  \DeclareMathAccent{\grave}{\mathalpha}{operators}{"12}
  \DeclareMathAccent{\ddot}{\mathalpha}{operators}{"7F}
  \DeclareMathAccent{\tilde}{\mathalpha}{operators}{"7E}
  \DeclareMathAccent{\bar}{\mathalpha}{operators}{"16}
  \DeclareMathAccent{\breve}{\mathalpha}{operators}{"15}
  \DeclareMathAccent{\check}{\mathalpha}{operators}{"14}
  \DeclareMathAccent{\hat}{\mathalpha}{operators}{"5E}
  \DeclareMathAccent{\dot}{\mathalpha}{operators}{"5F}
%    \end{macrocode}
%
%    \begin{macrocode}
\else
\def\@tempa{LY1}
\ifx\operator@encoding\@tempa
  \DeclareMathSymbol{!}{\mathclose}{operators}{"21}
  \DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
  \DeclareMathSymbol{;}{\mathpunct}{operators}{"3B}
  \DeclareMathSymbol{?}{\mathclose}{operators}{"3F}
  \ifx\colon\@tempb
      \DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
  \fi
  \DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
  \DeclareMathAccent{\grave}{\mathalpha}{operators}{"12}
  \DeclareMathAccent{\ddot}{\mathalpha}{operators}{"7F}
  \DeclareMathAccent{\tilde}{\mathalpha}{operators}{"7E}
  \DeclareMathAccent{\bar}{\mathalpha}{operators}{"16}
  \DeclareMathAccent{\breve}{\mathalpha}{operators}{"15}
  \DeclareMathAccent{\check}{\mathalpha}{operators}{"14}
  \DeclareMathAccent{\hat}{\mathalpha}{operators}{"5E}
  \DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
  \DeclareMathAccent{\dot}{\mathalpha}{operators}{"5}
%    \end{macrocode}
%
%    \begin{macrocode}
\else
  \PackageWarningNoLine{lucidabr}
    {Unknown Operator Encoding!\MessageBreak
     Math accents may be wrong: assuming OT1 positions}
\fi\fi\fi
%    \end{macrocode}
%
%
% This section derives mostly from  Berthold Horn's files
% |lcdmacro.tex| and |amssymblb.tex|
% \copyright 1991, 1992 Y\&Y. All Rights Reserved
% Original from Version 1.2, 1992 June 14; updated \emph{ad hoc}.
%    \begin{macrocode}
\@ifpackageloaded{amsmath}{%
%    \end{macrocode}
% (From M J Downes): it's possible the factors 1.5, 2, 2.5, 3, 3.5 
% should be adjusted
% for Lucida fonts. But that has to be determined by looking at
% printed tests which I cannot do at the moment. [mjd,24-Jun-1993]
%    \begin{macrocode}
  \def\biggg{\bBigg@\thr@@} 
  \def\Biggg{\bBigg@{3.5}}
}{% 
  \def\big#1{{\hbox{$\left#1\vbox to8.20\p@{}\right.\n@space$}}}
  \def\Big#1{{\hbox{$\left#1\vbox to10.80\p@{}\right.\n@space$}}}
  \def\bigg#1{{\hbox{$\left#1\vbox to13.42\p@{}\right.\n@space$}}}
  \def\Bigg#1{{\hbox{$\left#1\vbox to16.03\p@{}\right.\n@space$}}}
  \def\biggg#1{{\hbox{$\left#1\vbox to17.72\p@{}\right.\n@space$}}}
  \def\Biggg#1{{\hbox{$\left#1\vbox to21.25\p@{}\right.\n@space$}}}
  \def\n@space{\nulldelimiterspace\z@ \m@th}
}
%    \end{macrocode}
% Define some extra large sizes --- always done using extensible parts
%    \begin{macrocode}
\def\bigggl{\mathopen\biggg}
\def\bigggr{\mathclose\biggg}
\def\Bigggl{\mathopen\Biggg}
\def\Bigggr{\mathclose\Biggg}
%    \end{macrocode}
%  Following is only really needed if the roman text font is not
% LucidaBright.
%  Draw the small sizes of `[' and `]' from math italic instead of
% roman font
%    \begin{macrocode}
\DeclareMathSymbol{[}{\mathopen} {letters}{"86}
\DeclareMathDelimiter{[}{letters}{"86}{largesymbols}{"02}
\DeclareMathSymbol{]}{\mathclose}{letters}{"87}
\DeclareMathDelimiter{]}{letters}{"87}{largesymbols}{"03}
%    \end{macrocode}
%  Draw the small sizes of `(' and `)' from math italic instead
%  of roman font
%    \begin{macrocode}
\DeclareMathSymbol{(}{\mathopen} {letters}{"84}
\DeclareMathDelimiter{(}{letters}{"84}{largesymbols}{"00}
\DeclareMathSymbol{)}{\mathclose}{letters}{"85}
\DeclareMathDelimiter{)}{letters}{"85}{largesymbols}{"01}
%    \end{macrocode}
%  Draw  `=' and `+' from symbol font instead of roman
%    \begin{macrocode}
\DeclareMathSymbol{=}{\mathrel} {symbols}{"83}
\DeclareMathSymbol{+}{\mathbin} {symbols}{"82}
%    \end{macrocode}
% Draw small `/' from math italic instead of roman font
%    \begin{macrocode}
\DeclareMathSymbol{/}{\mathord} {letters}{"3D}
\DeclareMathDelimiter{/}{letters}{"3D}{largesymbols}{"0E}
%    \end{macrocode}
% Make open face brackets accessible, i.e. [[ and ]]
%    \begin{macrocode}
\DeclareMathDelimiter{\ldbrack}
  {\mathopen}{letters}{"82}{largesymbols}{"82}
\DeclareMathDelimiter{\rdbrack}
  {\mathclose}{letters}{"83}{largesymbols}{"83}
%    \end{macrocode}
% Provide access to surface integral signs
% (linked from text to display size)
%    \begin{macrocode}
\DeclareMathSymbol{\surfintop}{\mathop}{largesymbols}{"90}
\def\surfint{\surfintop\nolimits}
%    \end{macrocode}
% Make medium size integrals available (NOT linked to display size)
%    \begin{macrocode}
\DeclareMathSymbol{\midintop}{\mathop}{largesymbols}{"92} 
\def\midint{\midintop\nolimits}
\DeclareMathSymbol{\midointop}{\mathop}{largesymbols}{"93}
\def\midoint{\midointop\nolimits}
\DeclareMathSymbol{\midsurfintop}{\mathop}{largesymbols}{"94}
\def\midsurfint{\midsurfintop\nolimits}
%    \end{macrocode}
% Extensible integral
% (use with |\bigg|, |\Bigg|, |\biggg|, |\Biggg| etc)
%    \begin{macrocode}
\DeclareMathDelimiter{\largeint}
  {\mathop}{largesymbols}{"5A}{largesymbols}{"95}
%    \end{macrocode}
% To close up gaps in special math characters constructed from pieces
%    \begin{macrocode}
\def\joinrel{\mathrel{\mkern-4mu}} % \def\joinrel{\mathrel{\mkern-3mu}}
%    \end{macrocode}
% The |\mkern-2.5mu| undoes the bogus `italic correction'
% after joiners in LBMA
%    \begin{macrocode}
\DeclareMathSymbol{\relbar@}{\mathord}{arrows}{"2D}
\def\relbar{\mathrel{\smash\relbar@}\mathrel{\mkern-2.5mu}}
%    \end{macrocode}
% \changes{v4.4}{1997/03/12}
%      {Relbar is hex 3D not 2D}
%    \begin{macrocode}
\DeclareMathSymbol{\Relbar@}{\mathrel}{arrows}{"3D}
\def\Relbar{\Relbar@\mathrel{\mkern-2.5mu}}
%    \end{macrocode}
% The |\mkern4mu| undoes the overhang at the ends of the joiners
% (and more)
%    \begin{macrocode}
\def\longleftarrow{\leftarrow\relbar\mathrel{\mkern4mu}}
\def\longrightarrow{\mathrel{\mkern4mu}\relbar\rightarrow}
\def\Longleftarrow{\Leftarrow\Relbar\mathrel{\mkern4mu}}
\def\Longrightarrow{\mathrel{\mkern4mu}\Relbar\Rightarrow}
%    \end{macrocode}
%
% If \textsf{amsmath} is loaded, need to redefine the arrow fill commands
% as the relative spacing around |\relbar| and |\rightarrow| is not what
% the AMS code expects.
% \changes{v4.4}{1997/03/12}
%      {Modify AMS arrowfill commands}
%    \begin{macrocode}
\AtBeginDocument{%
  \@ifpackageloaded{amsmath}{%
    \def\rightarrowfill@#1{%
      \m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
      $#1\mkern4.5mu\mathrel{\copy\z@}%
      \kern-\wd\z@
      \cleaders\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill%
      \mkern-4.5mu %
      \rightarrow$}%
    \def\leftarrowfill@#1{%
      \m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
      $#1\leftarrow
      \mkern-4.5mu %
      \cleaders\hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill
      \kern-\wd\z@
      \mathrel{\box\z@}\mkern4.5mu$}
    \def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
      $#1\leftarrow
      \mkern-12mu %
      \cleaders\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
      \rightarrow$}}%
    {}}
%    \end{macrocode}
%
% Some characters that need construction in CM exist complete in math
% italic or math symbol font.
%    \begin{macrocode}
\let\bowtie\undefined
\let\models\undefined
\let\doteq\undefined
\let\cong\undefined
\let\angle\undefined
\DeclareMathSymbol{\bowtie}{\mathrel}{letters}{"F6}
\DeclareMathSymbol{\models}{\mathrel}{symbols}{"EE}
\DeclareMathSymbol{\doteq}{\mathrel}{symbols}{"C9}
\DeclareMathSymbol{\cong}{\mathrel}{symbols}{"9B}
\DeclareMathSymbol{\angle}{\mathord}{symbols}{"8B}
%    \end{macrocode}
% These need undefining so that we can redeclare them.
%    \begin{macrocode}
\let\Box\undefined
\let\Diamond\undefined
\let\leadsto\undefined
\let\neq\undefined
\let\hookleftarrow\undefined
\let\hookrightarrow\undefined
\let\mapsto\undefined
\let\notin\undefined
\let\rightleftharpoons\undefined
%    \end{macrocode}
% Other characters may be found in LucidaNewMath-Arrows
% (more negated later).
%    \begin{macrocode}
\DeclareMathSymbol{\neq}{\mathrel}{arrows}{"94}
\DeclareMathSymbol{\rightleftharpoons}{\mathrel}{arrows}{"7A}
\DeclareMathSymbol{\leftrightharpoons}{\mathrel}{arrows}{"79}
\DeclareMathSymbol{\hookleftarrow}{\mathrel}{arrows}{"3C}
\DeclareMathSymbol{\hookrightarrow}{\mathrel}{arrows}{"3E}
\DeclareMathSymbol{\mapsto}{\mathrel}{arrows}{"2C}
\def\longmapsto{\mapstochar\longrightarrow}
%    \end{macrocode}
% Special \LaTeX\ character definitions
% (originally from \LaTeX\ symbol font)
%    \begin{macrocode}
\let\Join\undefined
\let\rhd\undefined
\let\lhd\undefined
\let\unrhd\undefined
\let\unlhd\undefined
\DeclareMathSymbol{\Join}{\mathrel}{letters}{"F6}
\DeclareMathSymbol{\rhd}{\mathrel}{letters}{"2E}
\DeclareMathSymbol{\lhd}{\mathrel}{letters}{"2F}
\DeclareMathSymbol{\unlhd}{\mathrel}{symbols}{"F4}
\DeclareMathSymbol{\unrhd}{\mathrel}{symbols}{"F5}
\DeclareMathSymbol{\Box}{\mathord}{arrows}{"02} 
\DeclareMathSymbol{\Diamond}{\mathord}{arrows}{"08}
\DeclareMathSymbol{\leadsto}{\mathrel}{arrows}{"8E} 
\DeclareMathSymbol{\leadsfrom}{\mathrel}{arrows}{"8D}
\def\mathstrut{\vphantom{f}}
%    \end{macrocode}
% In n-th root, don't want the `n' to come too close to the radical
%    \begin{macrocode}
\def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\sqrt{#2}$}%
  \dimen@\ht\z@ \advance\dimen@-\dp\z@
  \mkern5mu\raise.6\dimen@\copy\rootbox \mkern-7.5mu\box\z@}
%    \end{macrocode}
% Here are some extra definitions of mathematical symbols and operators:
%    \begin{macrocode}
\DeclareMathSymbol{\defineequal}{\mathrel}{symbols}{"D6}
%\let\notleq\nleq
%\let\notgeq\ngeq
\DeclareMathSymbol{\notequiv}{\mathrel}{arrows}{"95}
%\let\notprec\nprec
%\let\notsucc\nsucc
\DeclareMathSymbol{\notapprox}{\mathrel}{arrows}{"98}
%\let\notpreceq\npreceq
%\let\notsucceq\nsucceq
\DeclareMathSymbol{\notasymp}{\mathrel}{arrows}{"F3}
\DeclareMathSymbol{\notsubset}{\mathrel}{arrows}{"C6}
\DeclareMathSymbol{\notsupset}{\mathrel}{arrows}{"C7}
\DeclareMathSymbol{\notsim}{\mathrel}{arrows}{"96}
\DeclareMathSymbol{\notsubseteq}{\mathrel}{arrows}{"C8}
\DeclareMathSymbol{\notsupseteq}{\mathrel}{arrows}{"C9}
\DeclareMathSymbol{\notsimeq}{\mathrel}{arrows}{"97}
\DeclareMathSymbol{\notsqsubseteq}{\mathrel}{arrows}{"D4}
\DeclareMathSymbol{\notsqsupseteq}{\mathrel}{arrows}{"D5}
\DeclareMathSymbol{\notcong}{\mathrel}{arrows}{"99}
\DeclareMathSymbol{\notin}{\mathrel}{arrows}{"1D}
\DeclareMathSymbol{\notni}{\mathrel}{arrows}{"1F}
%\let\notvdash\nvdash
%\let\notmodels\nvDash
%\let\notparallelparallel
%\let\noteq\neq
%\let\notless\nless
%\let\notgreater\ngtr
%\let\notmid\nmid
\let\Bbb\mathbb
%    \end{macrocode}
% Normal \LaTeX\ draws upper case (upright) Greek from cmr10 ---
% when using the Cork encoding, that isn't there.
%    \begin{macrocode}
\iflucida@expert
%    \end{macrocode}
% If we have the LucidaBright Expert set, we'll draw them from the
% upright math font.  That way we can get bold math to work on upright
% upper case Greek.
%
% Why doesn't this work?
%\begin{verbatim}
% \documentclass{article}
% \usepackage{lucidabr}
% $\mathbf{\Sigma}$
% \end{document}
%\end{verbatim}
% The answer lies in the meaning of |\mathbf|; as fntguide.tex says,
% it is for alphabetic switching. The straight lucida style says
%\begin{verbatim}
%  \DeclareMathSymbol{\Sigma}{\mathalpha}{largesymbols}{'326}
%\end{verbatim}
% and the |\mathalpha| signifies that the |\Sigma| can change with the
% alphabet; so this in fact looks for |\char'326| in the ``mathbf''
% alphabet when we ask for that. That is defined with
%\begin{verbatim}
% \SetMathAlphabet{\mathbf}{bold}{\operator@encoding}{\rmdefault}{b}{n}
%\end{verbatim}
% ie normal text Lucida bold. It all works in CMR because the text fonts
% have Greek, which is why the symbols are defined as \mathalpha; in
% addition, the alphabets like |\mathbf| \emph{explicitly} ask for OT1:
%\begin{verbatim}
%\DeclareMathAlphabet      {\mathbf}{OT1}{cmr}{bx}{n}
%\end{verbatim}
% so it works in T1 encoding too.
%
% When we get the symbols from other fonts in Lucida, we should no
% longer classify the fonts as |\mathalpha|, since the mechanism
% doesn't function. So we use |\mathord| instead, and you
% only get bold Greek if you change |\mathversion|.
% At least it's consistent.
%
% If, however, we are using the Times mixture, we can keep
% |\mathalpha|, as we have the right font layouts around.
%    \begin{macrocode}
%<*!luctim>
  \DeclareMathSymbol{\Gamma}{\mathord}{mathupright}{0}
  \DeclareMathSymbol{\Delta}{\mathord}{mathupright}{1}
  \DeclareMathSymbol{\Theta}{\mathord}{mathupright}{2}
  \DeclareMathSymbol{\Lambda}{\mathord}{mathupright}{3}
  \DeclareMathSymbol{\Xi}{\mathord}{mathupright}{4}
  \DeclareMathSymbol{\Pi}{\mathord}{mathupright}{5}
  \DeclareMathSymbol{\Sigma}{\mathord}{mathupright}{6}
  \DeclareMathSymbol{\Upsilon}{\mathord}{mathupright}{7}
  \DeclareMathSymbol{\Phi}{\mathord}{mathupright}{8}
  \DeclareMathSymbol{\Psi}{\mathord}{mathupright}{9}
  \DeclareMathSymbol{\Omega}{\mathord}{mathupright}{10}
\else
%    \end{macrocode}
% It's in the extension font (largesymbols)
%    \begin{macrocode}
  \DeclareMathSymbol{\Gamma}{\mathord}{largesymbols}{'320}
  \DeclareMathSymbol{\Delta}{\mathord}{largesymbols}{'321}
  \DeclareMathSymbol{\Theta}{\mathord}{largesymbols}{'322}
  \DeclareMathSymbol{\Lambda}{\mathord}{largesymbols}{'323}
  \DeclareMathSymbol{\Xi}{\mathord}{largesymbols}{'324}
  \DeclareMathSymbol{\Pi}{\mathord}{largesymbols}{'325}
  \DeclareMathSymbol{\Sigma}{\mathord}{largesymbols}{'326}
  \DeclareMathSymbol{\Upsilon}{\mathord}{largesymbols}{'327}
  \DeclareMathSymbol{\Phi}{\mathord}{largesymbols}{'330}
  \DeclareMathSymbol{\Psi}{\mathord}{largesymbols}{'331}
  \DeclareMathSymbol{\Omega}{\mathord}{largesymbols}{'332}
\fi
%</!luctim>
%<*luctim>
  \DeclareMathSymbol{\Gamma}{\mathalpha}{mathupright}{0}
  \DeclareMathSymbol{\Delta}{\mathalpha}{mathupright}{1}
  \DeclareMathSymbol{\Theta}{\mathalpha}{mathupright}{2}
  \DeclareMathSymbol{\Lambda}{\mathalpha}{mathupright}{3}
  \DeclareMathSymbol{\Xi}{\mathalpha}{mathupright}{4}
  \DeclareMathSymbol{\Pi}{\mathalpha}{mathupright}{5}
  \DeclareMathSymbol{\Sigma}{\mathalpha}{mathupright}{6}
  \DeclareMathSymbol{\Upsilon}{\mathalpha}{mathupright}{7}
  \DeclareMathSymbol{\Phi}{\mathalpha}{mathupright}{8}
  \DeclareMathSymbol{\Psi}{\mathalpha}{mathupright}{9}
  \DeclareMathSymbol{\Omega}{\mathalpha}{mathupright}{10}
\else
%    \end{macrocode}
% It's in the extension font (largesymbols)
%    \begin{macrocode}
  \DeclareMathSymbol{\Gamma}{\mathord}{largesymbols}{'320}
  \DeclareMathSymbol{\Delta}{\mathord}{largesymbols}{'321}
  \DeclareMathSymbol{\Theta}{\mathord}{largesymbols}{'322}
  \DeclareMathSymbol{\Lambda}{\mathord}{largesymbols}{'323}
  \DeclareMathSymbol{\Xi}{\mathord}{largesymbols}{'324}
  \DeclareMathSymbol{\Pi}{\mathord}{largesymbols}{'325}
  \DeclareMathSymbol{\Sigma}{\mathord}{largesymbols}{'326}
  \DeclareMathSymbol{\Upsilon}{\mathord}{largesymbols}{'327}
  \DeclareMathSymbol{\Phi}{\mathord}{largesymbols}{'330}
  \DeclareMathSymbol{\Psi}{\mathord}{largesymbols}{'331}
  \DeclareMathSymbol{\Omega}{\mathord}{largesymbols}{'332}
\fi
%</luctim>
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareMathSymbol{\alpha}{\mathord}{\lcgreek@alphabet}{"0B}
\DeclareMathSymbol{\beta}{\mathord}{\lcgreek@alphabet}{"0C}
\DeclareMathSymbol{\gamma}{\mathord}{\lcgreek@alphabet}{"0D}
\DeclareMathSymbol{\delta}{\mathord}{\lcgreek@alphabet}{"0E}
\DeclareMathSymbol{\epsilon}{\mathord}{\lcgreek@alphabet}{"0F}
\DeclareMathSymbol{\zeta}{\mathord}{\lcgreek@alphabet}{"10}
\DeclareMathSymbol{\eta}{\mathord}{\lcgreek@alphabet}{"11}
\DeclareMathSymbol{\theta}{\mathord}{\lcgreek@alphabet}{"12}
\DeclareMathSymbol{\iota}{\mathord}{\lcgreek@alphabet}{"13}
\DeclareMathSymbol{\kappa}{\mathord}{\lcgreek@alphabet}{"14}
\DeclareMathSymbol{\lambda}{\mathord}{\lcgreek@alphabet}{"15}
\DeclareMathSymbol{\mu}{\mathord}{\lcgreek@alphabet}{"16}
\DeclareMathSymbol{\nu}{\mathord}{\lcgreek@alphabet}{"17}
\DeclareMathSymbol{\xi}{\mathord}{\lcgreek@alphabet}{"18}
\DeclareMathSymbol{\pi}{\mathord}{\lcgreek@alphabet}{"19}
\DeclareMathSymbol{\rho}{\mathord}{\lcgreek@alphabet}{"1A}
\DeclareMathSymbol{\sigma}{\mathord}{\lcgreek@alphabet}{"1B}
\DeclareMathSymbol{\tau}{\mathord}{\lcgreek@alphabet}{"1C}
\DeclareMathSymbol{\upsilon}{\mathord}{\lcgreek@alphabet}{"1D}
\DeclareMathSymbol{\phi}{\mathord}{\lcgreek@alphabet}{"1E}
\DeclareMathSymbol{\chi}{\mathord}{\lcgreek@alphabet}{"1F}
\DeclareMathSymbol{\psi}{\mathord}{\lcgreek@alphabet}{"20}
\DeclareMathSymbol{\omega}{\mathord}{\lcgreek@alphabet}{"21}
\DeclareMathSymbol{\varepsilon}{\mathord}{\lcgreek@alphabet}{"22}
\DeclareMathSymbol{\vartheta}{\mathord}{\lcgreek@alphabet}{"23}
\DeclareMathSymbol{\varpi}{\mathord}{\lcgreek@alphabet}{"24}
\DeclareMathSymbol{\varrho}{\mathord}{\lcgreek@alphabet}{"25}
\DeclareMathSymbol{\varsigma}{\mathord}{\lcgreek@alphabet}{"26}
\DeclareMathSymbol{\varphi}{\mathord}{\lcgreek@alphabet}{"27}
%    \end{macrocode}
%
% `Individual' Upright lowercase Greek (not currently activated).
%    \begin{macrocode}
%<*upalpha>
\ifx\upalpha\relax
  \DeclareMathSymbol{\upalpha}{\mathord}{mathupright}{11}
  \DeclareMathSymbol{\upbeta}{\mathord}{mathupright}{12}
  \DeclareMathSymbol{\upgamma}{\mathord}{mathupright}{13}
  \DeclareMathSymbol{\updelta}{\mathord}{mathupright}{14}
  \DeclareMathSymbol{\upepsilon}{\mathord}{mathupright}{15}
  \DeclareMathSymbol{\upzeta}{\mathord}{mathupright}{16}
  \DeclareMathSymbol{\upeta}{\mathord}{mathupright}{17}
  \DeclareMathSymbol{\uptheta}{\mathord}{mathupright}{18}
  \DeclareMathSymbol{\upiota}{\mathord}{mathupright}{19}
  \DeclareMathSymbol{\upkappa}{\mathord}{mathupright}{20}
  \DeclareMathSymbol{\uplambda}{\mathord}{mathupright}{21}
  \DeclareMathSymbol{\upmu}{\mathord}{mathupright}{22}
  \DeclareMathSymbol{\upnu}{\mathord}{mathupright}{23}
  \DeclareMathSymbol{\upxi}{\mathord}{mathupright}{24}
  \DeclareMathSymbol{\uppi}{\mathord}{mathupright}{25}
  \DeclareMathSymbol{\uprho}{\mathord}{mathupright}{26}
  \DeclareMathSymbol{\upsigma}{\mathord}{mathupright}{27}
  \DeclareMathSymbol{\uptau}{\mathord}{mathupright}{28}
  \DeclareMathSymbol{\upupsilon}{\mathord}{mathupright}{29}
  \DeclareMathSymbol{\upphi}{\mathord}{mathupright}{30}
  \DeclareMathSymbol{\upchi}{\mathord}{mathupright}{31}
  \DeclareMathSymbol{\uppsi}{\mathord}{mathupright}{32}
  \DeclareMathSymbol{\upomega}{\mathord}{mathupright}{33}
  \DeclareMathSymbol{\upvarepsilon}{\mathord}{mathupright}{34}
\fi
%</upalpha>
%    \end{macrocode}
% Slanted upright Greek.
%    \begin{macrocode}
%<*varGamma>
\ifx\varGamma\relax
  \DeclareMathSymbol{\varGamma}{\mathord}{letters}{"00}
  \DeclareMathSymbol{\varDelta}{\mathord}{letters}{"01}
  \DeclareMathSymbol{\varTheta}{\mathord}{letters}{"02}
  \DeclareMathSymbol{\varLambda}{\mathord}{letters}{"03}
  \DeclareMathSymbol{\varXi}{\mathord}{letters}{"04}
  \DeclareMathSymbol{\varPi}{\mathord}{letters}{"05}
  \DeclareMathSymbol{\varSigma}{\mathord}{letters}{"06}
  \DeclareMathSymbol{\varUpsilon}{\mathord}{letters}{"07}
  \DeclareMathSymbol{\varPhi}{\mathord}{letters}{"08}
  \DeclareMathSymbol{\varPsi}{\mathord}{letters}{"09}
  \DeclareMathSymbol{\varOmega}{\mathord}{letters}{"0A}
\fi
%</varGamma>
%    \end{macrocode}
% Definitions for math symbols and operators 
% (normally found in the AMS symbol fonts)
% using LucidaNewMath fonts 
% MSAM* equivalents:
%
% Stop here if noamssymbols option given.
%    \begin{macrocode}
\ifx\blacksquare\endinput\endinput\fi
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareMathSymbol{\boxdot}{\mathbin}{symbols}{"ED}
\DeclareMathSymbol{\boxplus}{\mathbin}{symbols}{"EA}
\DeclareMathSymbol{\boxtimes}{\mathbin}{symbols}{"EC}
\DeclareMathSymbol{\square}{\mathord}{arrows}{"02}
\DeclareMathSymbol{\blacksquare}{\mathord}{arrows}{"03}
\DeclareMathSymbol{\centerdot}{\mathbin}{arrows}{"E1}
\DeclareMathSymbol{\lozenge}{\mathord}{arrows}{"08}
\DeclareMathSymbol{\blacklozenge}{\mathord}{arrows}{"09}
\DeclareMathSymbol{\circlearrowright}{\mathrel}{arrows}{"8C}
\DeclareMathSymbol{\circlearrowleft}{\mathrel}{arrows}{"8B}
\DeclareMathSymbol{\rightleftharpoons}{\mathrel}{arrows}{"7A}
\DeclareMathSymbol{\leftrightharpoons}{\mathrel}{arrows}{"79}
\DeclareMathSymbol{\boxminus}{\mathbin}{symbols}{"EB}
\DeclareMathSymbol{\Vdash}{\mathrel}{symbols}{"F0}
\DeclareMathSymbol{\Vvdash}{\mathrel}{letters}{"D3}
\DeclareMathSymbol{\vDash}{\mathrel}{symbols}{"EE}
\DeclareMathSymbol{\twoheadrightarrow}{\mathrel}{arrows}{"25}
\DeclareMathSymbol{\twoheadleftarrow}{\mathrel}{arrows}{"23}
\DeclareMathSymbol{\leftleftarrows}{\mathrel}{arrows}{"71}
\DeclareMathSymbol{\rightrightarrows}{\mathrel}{arrows}{"73}
\DeclareMathSymbol{\upuparrows}{\mathrel}{arrows}{"72}
\DeclareMathSymbol{\downdownarrows}{\mathrel}{arrows}{"74}
\DeclareMathSymbol{\upharpoonright}{\mathrel}{arrows}{"75}
\DeclareMathSymbol{\downharpoonright}{\mathrel}{arrows}{"77}
\DeclareMathSymbol{\upharpoonleft}{\mathrel}{arrows}{"76}
\DeclareMathSymbol{\downharpoonleft}{\mathrel}{arrows}{"78}
\DeclareMathSymbol{\rightarrowtail}{\mathrel}{arrows}{"29}
\DeclareMathSymbol{\leftarrowtail}{\mathrel}{arrows}{"28}
\DeclareMathSymbol{\leftrightarrows}{\mathrel}{arrows}{"6E}
\DeclareMathSymbol{\rightleftarrows}{\mathrel}{arrows}{"6D}
\DeclareMathSymbol{\Lsh}{\mathrel}{arrows}{"7B}
\DeclareMathSymbol{\Rsh}{\mathrel}{arrows}{"7D}
\DeclareMathSymbol{\rightsquigarrow}{\mathrel}{arrows}{"8E}
\DeclareMathSymbol{\leftsquigarrow}{\mathrel}{arrows}{"8D}
\DeclareMathSymbol{\leftrightsquigarrow}{\mathrel}{arrows}{"91}
\DeclareMathSymbol{\looparrowleft}{\mathrel}{arrows}{"3F}
\DeclareMathSymbol{\looparrowright}{\mathrel}{arrows}{"40}
\DeclareMathSymbol{\circeq}{\mathrel}{symbols}{"D0}
\DeclareMathSymbol{\succsim}{\mathrel}{symbols}{"E1}
\DeclareMathSymbol{\gtrsim}{\mathrel}{symbols}{"DD}
\DeclareMathSymbol{\gtrapprox}{\mathrel}{letters}{"DB}
\DeclareMathSymbol{\multimap}{\mathrel}{letters}{"C7}
\DeclareMathSymbol{\image}{\mathrel}{letters}{"C6}
\DeclareMathSymbol{\original}{\mathrel}{letters}{"C5}
\DeclareMathSymbol{\therefore}{\mathrel}{symbols}{"90}
\DeclareMathSymbol{\because}{\mathrel}{symbols}{"91}
\DeclareMathSymbol{\doteqdot}{\mathrel}{symbols}{"CA}
\DeclareMathSymbol{\triangleq}{\mathrel}{symbols}{"D5}
\DeclareMathSymbol{\precsim}{\mathrel}{symbols}{"E0}
\DeclareMathSymbol{\lesssim}{\mathrel}{symbols}{"DC}
\DeclareMathSymbol{\lessapprox}{\mathrel}{letters}{"DA}
\DeclareMathSymbol{\eqslantless}{\mathrel}{letters}{"E2}
\DeclareMathSymbol{\eqslantgtr}{\mathrel}{letters}{"E3}
\DeclareMathSymbol{\curlyeqprec}{\mathrel}{letters}{"E6}
\DeclareMathSymbol{\curlyeqsucc}{\mathrel}{letters}{"E7}
\DeclareMathSymbol{\preccurlyeq}{\mathrel}{letters}{"E4}
\DeclareMathSymbol{\leqq}{\mathrel}{symbols}{"DA}
\DeclareMathSymbol{\leqslant}{\mathrel}{letters}{"E0}
\DeclareMathSymbol{\lessgtr}{\mathrel}{symbols}{"DE}
\DeclareMathSymbol{\backprime}{\mathord}{letters}{"C8}
\DeclareMathSymbol{\axisshort}{\mathord}{arrows}{"39}
\DeclareMathSymbol{\risingdotseq}{\mathrel}{symbols}{"CC}
\DeclareMathSymbol{\fallingdotseq}{\mathrel}{symbols}{"CB}
\DeclareMathSymbol{\succcurlyeq}{\mathrel}{letters}{"E5}
\DeclareMathSymbol{\geqq}{\mathrel}{symbols}{"DB}
\DeclareMathSymbol{\geqslant}{\mathrel}{letters}{"E1}
\DeclareMathSymbol{\gtrless}{\mathrel}{symbols}{"DF}
\let\sqsubset\undefined
\let\sqsupset\undefined
\DeclareMathSymbol{\sqsubset}{\mathrel}{symbols}{"E4}
\DeclareMathSymbol{\sqsupset}{\mathrel}{symbols}{"E5}
\DeclareMathSymbol{\vartriangleright}{\mathrel}{letters}{"2E}
\DeclareMathSymbol{\vartriangleleft}{\mathrel}{letters}{"2F}
\DeclareMathSymbol{\trianglerighteq}{\mathrel}{symbols}{"F5}
\DeclareMathSymbol{\trianglelefteq}{\mathrel}{symbols}{"F4}
\DeclareMathSymbol{\bigstar}{\mathord}{arrows}{"AB}
\DeclareMathSymbol{\between}{\mathrel}{letters}{"F2}
\DeclareMathSymbol{\blacktriangledown}{\mathord}{arrows}{"07}
\DeclareMathSymbol{\blacktriangleright}{\mathrel}{letters}{"F1}
\DeclareMathSymbol{\blacktriangleleft}{\mathrel}{letters}{"F0}
\DeclareMathSymbol{\arrowaxisright}{\mathord}{arrows}{"37}
\DeclareMathSymbol{\arrowaxisleft}{\mathord}{arrows}{"36}
\DeclareMathSymbol{\vartriangle}{\mathrel}{arrows}{"04}
\DeclareMathSymbol{\blacktriangle}{\mathord}{arrows}{"05}
\DeclareMathSymbol{\triangledown}{\mathord}{arrows}{"06}
\DeclareMathSymbol{\eqcirc}{\mathrel}{symbols}{"CF}
\DeclareMathSymbol{\lesseqgtr}{\mathrel}{letters}{"E8}
\DeclareMathSymbol{\gtreqless}{\mathrel}{letters}{"E9}
\DeclareMathSymbol{\lesseqqgtr}{\mathrel}{letters}{"EA}
\DeclareMathSymbol{\gtreqqless}{\mathrel}{letters}{"EB}
\DeclareMathSymbol{\Rrightarrow}{\mathrel}{arrows}{"6C}
\DeclareMathSymbol{\Lleftarrow}{\mathrel}{arrows}{"6A}
\DeclareMathSymbol{\veebar}{\mathbin}{letters}{"D2}
\DeclareMathSymbol{\barwedge}{\mathbin}{symbols}{"F6}
\DeclareMathSymbol{\angle}{\mathord}{symbols}{"8B}
\DeclareMathSymbol{\measuredangle}{\mathord}{symbols}{"8C}
\DeclareMathSymbol{\sphericalangle}{\mathord}{symbols}{"8D}
\DeclareMathSymbol{\varpropto}{\mathrel}{symbols}{"2F} % ?
\DeclareMathSymbol{\smallsmile}{\mathrel}{letters}{"5E} % ? 
\DeclareMathSymbol{\smallfrown}{\mathrel}{letters}{"5F} % ?       
\DeclareMathSymbol{\Subset}{\mathrel}{symbols}{"F8}
\DeclareMathSymbol{\Supset}{\mathrel}{symbols}{"F9}
\DeclareMathSymbol{\Cup}{\mathbin}{symbols}{"FA}
\DeclareMathSymbol{\Cap}{\mathbin}{symbols}{"FB}
\DeclareMathSymbol{\curlywedge}{\mathbin}{symbols}{"84}
\DeclareMathSymbol{\curlyvee}{\mathbin}{symbols}{"85}
\DeclareMathSymbol{\leftthreetimes}{\mathbin}{letters}{"D0}
\DeclareMathSymbol{\rightthreetimes}{\mathbin}{letters}{"D1}
\DeclareMathSymbol{\subseteqq}{\mathrel}{letters}{"EE}
\DeclareMathSymbol{\supseteqq}{\mathrel}{letters}{"EF}
\DeclareMathSymbol{\bumpeq}{\mathrel}{symbols}{"C8}
\DeclareMathSymbol{\Bumpeq}{\mathrel}{symbols}{"C7}
\DeclareMathSymbol{\lll}{\mathrel}{letters}{"DE}
\DeclareMathSymbol{\ggg}{\mathrel}{letters}{"DF}
\DeclareMathSymbol{\circledS}{\mathord}{letters}{"CA}
\DeclareMathSymbol{\pitchfork}{\mathrel}{letters}{"F3}
\DeclareMathSymbol{\dotplus}{\mathbin}{symbols}{"89}
\DeclareMathSymbol{\backsim}{\mathrel}{letters}{"F8}
\DeclareMathSymbol{\backsimeq}{\mathrel}{letters}{"F9}
\DeclareMathSymbol{\complement}{\mathord}{letters}{"94}
\DeclareMathSymbol{\intercal}{\mathbin}{letters}{"D9}
\DeclareMathSymbol{\circledcirc}{\mathbin}{symbols}{"E6}
\DeclareMathSymbol{\circledast}{\mathbin}{symbols}{"E7}
\DeclareMathSymbol{\circleddash}{\mathbin}{letters}{"CC}
%    \end{macrocode}
% MSBM* equivalents
%    \begin{macrocode}
\DeclareMathSymbol{\lvertneqq}{\mathrel}{arrows}{"DE}
\DeclareMathSymbol{\gvertneqq}{\mathrel}{arrows}{"DF}
\DeclareMathSymbol{\nleq}{\mathrel}{arrows}{"9C}
\DeclareMathSymbol{\ngeq}{\mathrel}{arrows}{"9D}
\DeclareMathSymbol{\nless}{\mathrel}{arrows}{"9A}
\DeclareMathSymbol{\ngtr}{\mathrel}{arrows}{"9B}
\DeclareMathSymbol{\nprec}{\mathrel}{arrows}{"E5}
\DeclareMathSymbol{\nsucc}{\mathrel}{arrows}{"E6}
\DeclareMathSymbol{\lneqq}{\mathrel}{arrows}{"DC}
\DeclareMathSymbol{\gneqq}{\mathrel}{arrows}{"DD}
\DeclareMathSymbol{\nleqslant}{\mathrel}{arrows}{"D6}
\DeclareMathSymbol{\ngeqslant}{\mathrel}{arrows}{"D7}
\DeclareMathSymbol{\lneq}{\mathrel}{arrows}{"DA}
\DeclareMathSymbol{\gneq}{\mathrel}{arrows}{"DB}
\DeclareMathSymbol{\npreceq}{\mathrel}{arrows}{"E7}
\DeclareMathSymbol{\nsucceq}{\mathrel}{arrows}{"E8}
\DeclareMathSymbol{\precnsim}{\mathrel}{arrows}{"EB}
\DeclareMathSymbol{\succnsim}{\mathrel}{arrows}{"EC}
\DeclareMathSymbol{\lnsim}{\mathrel}{arrows}{"E0}
\DeclareMathSymbol{\gnsim}{\mathrel}{arrows}{"E2}
\DeclareMathSymbol{\nleqq}{\mathrel}{arrows}{"D8}
\DeclareMathSymbol{\ngeqq}{\mathrel}{arrows}{"D9}
\DeclareMathSymbol{\precneqq}{\mathrel}{arrows}{"E9}
\DeclareMathSymbol{\succneqq}{\mathrel}{arrows}{"EA}
\DeclareMathSymbol{\precnapprox}{\mathrel}{arrows}{"ED}
\DeclareMathSymbol{\succnapprox}{\mathrel}{arrows}{"EE}
\DeclareMathSymbol{\lnapprox}{\mathrel}{arrows}{"E3}
\DeclareMathSymbol{\gnapprox}{\mathrel}{arrows}{"E4}
\DeclareMathSymbol{\nsim}{\mathrel}{arrows}{"96}
\DeclareMathSymbol{\ncong}{\mathrel}{arrows}{"99}
\DeclareMathSymbol{\diagup}{\mathrel}{arrows}{"0B}
\DeclareMathSymbol{\diagdown}{\mathrel}{arrows}{"0C}
\DeclareMathSymbol{\varsubsetneq}{\mathrel}{arrows}{"D0}
\DeclareMathSymbol{\varsupsetneq}{\mathrel}{arrows}{"D1}
\DeclareMathSymbol{\nsubseteqq}{\mathrel}{arrows}{"CA}
\DeclareMathSymbol{\nsupseteqq}{\mathrel}{arrows}{"CB}
\DeclareMathSymbol{\subsetneqq}{\mathrel}{arrows}{"CE}
\DeclareMathSymbol{\supsetneqq}{\mathrel}{arrows}{"CF}
\DeclareMathSymbol{\varsubsetneqq}{\mathrel}{arrows}{"D2}
\DeclareMathSymbol{\varsupsetneqq}{\mathrel}{arrows}{"D3}
\DeclareMathSymbol{\subsetneq}{\mathrel}{arrows}{"CC}
\DeclareMathSymbol{\supsetneq}{\mathrel}{arrows}{"CD}
\DeclareMathSymbol{\nsubseteq}{\mathrel}{arrows}{"C8}
\DeclareMathSymbol{\nsupseteq}{\mathrel}{arrows}{"C9}
\DeclareMathSymbol{\nparallel}{\mathrel}{arrows}{"F7}
\DeclareMathSymbol{\nmid}{\mathrel}{arrows}{"F6}
\DeclareMathSymbol{\nshortmid}{\mathrel}{arrows}{"F4}
\DeclareMathSymbol{\nshortparallel}{\mathrel}{arrows}{"F5}
\DeclareMathSymbol{\nvdash}{\mathrel}{arrows}{"F8}
\DeclareMathSymbol{\nVdash}{\mathrel}{arrows}{"FA}
\DeclareMathSymbol{\nvDash}{\mathrel}{arrows}{"F9}
\DeclareMathSymbol{\nVDash}{\mathrel}{arrows}{"FB}
\DeclareMathSymbol{\ntrianglerighteq}{\mathrel}{arrows}{"F2}
\DeclareMathSymbol{\ntrianglelefteq}{\mathrel}{arrows}{"F1}
\DeclareMathSymbol{\ntriangleleft}{\mathrel}{arrows}{"EF}
\DeclareMathSymbol{\ntriangleright}{\mathrel}{arrows}{"F0}
\DeclareMathSymbol{\nleftarrow}{\mathrel}{arrows}{"32}
\DeclareMathSymbol{\nrightarrow}{\mathrel}{arrows}{"33}
\DeclareMathSymbol{\nLeftarrow}{\mathrel}{arrows}{"66}
\DeclareMathSymbol{\nRightarrow}{\mathrel}{arrows}{"68}
\DeclareMathSymbol{\nLeftrightarrow}{\mathrel}{arrows}{"67}
\DeclareMathSymbol{\nleftrightarrow}{\mathrel}{arrows}{"34}
\DeclareMathSymbol{\divideontimes}{\mathbin}{letters}{"F7}
\DeclareMathSymbol{\varnothing}{\mathord}{letters}{"9C}
\DeclareMathSymbol{\nexists}{\mathord}{arrows}{"20}
\DeclareMathSymbol{\Finv}{\mathord}{letters}{"90}
\DeclareMathSymbol{\Game}{\mathord}{letters}{"91}
\let\mho\undefined
\DeclareMathSymbol{\mho}{\mathord}{letters}{"92}
\DeclareMathSymbol{\simeq}{\mathrel}{symbols}{"27}
\DeclareMathSymbol{\eqsim}{\mathrel}{symbols}{"99}
\DeclareMathSymbol{\beth}{\mathord}{letters}{"95}
\DeclareMathSymbol{\gimel}{\mathord}{letters}{"96}
\DeclareMathSymbol{\daleth}{\mathord}{letters}{"97}
\DeclareMathSymbol{\lessdot}{\mathrel}{letters}{"DC}
\DeclareMathSymbol{\gtrdot}{\mathrel}{letters}{"DD}
\DeclareMathSymbol{\ltimes}{\mathbin}{letters}{"CE}
\DeclareMathSymbol{\rtimes}{\mathbin}{letters}{"CF}
\DeclareMathSymbol{\shortmid}{\mathrel}{letters}{"F4}
\DeclareMathSymbol{\shortparallel}{\mathrel}{letters}{"F5}
\DeclareMathSymbol{\smallsetminus}{\mathbin}{letters}{"D8} %?
\DeclareMathSymbol{\thicksim}{\mathrel}{symbols}{"18} %?
\DeclareMathSymbol{\thickapprox}{\mathrel}{symbols}{"19} %?      
\DeclareMathSymbol{\approxeq}{\mathrel}{symbols}{"9D}
\DeclareMathSymbol{\succapprox}{\mathrel}{letters}{"ED}
\DeclareMathSymbol{\precapprox}{\mathrel}{letters}{"EC}
\DeclareMathSymbol{\curvearrowleft}{\mathrel}{arrows}{"87}
\DeclareMathSymbol{\curvearrowright}{\mathrel}{arrows}{"88}
\DeclareMathSymbol{\digamma}{\mathord}{letters}{"46} %?
\DeclareMathSymbol{\varkappa}{\mathord}{letters}{"9B}
\DeclareMathSymbol{\Bbbk}{\mathord}{arrows}{"6B}
\DeclareMathSymbol{\hslash}{\mathord}{letters}{"9D}
\DeclareMathSymbol{\hbar}{\mathord}{arrows}{"1B}
\DeclareMathSymbol{\backepsilon}{\mathrel}{letters}{"FB} %?
\DeclareMathSymbol{\dashrightarrow}{\mathord}{arrows}{"3A}
\DeclareMathSymbol{\dashleftarrow}{\mathord}{arrows}{"38}
\DeclareMathSymbol{\dashuparrow}{\mathord}{arrows}{"39}
\DeclareMathSymbol{\dashdownarrow}{\mathord}{arrows}{"3B}
\DeclareMathDelimiter\ulcorner{\mathopen}{arrows}{"70}{arrows}{"70}
\DeclareMathDelimiter\urcorner{\mathclose}{arrows}{"71}{arrows}{"71}
\DeclareMathDelimiter\llcorner{\mathopen}{arrows}{"78}{arrows}{"78}
\DeclareMathDelimiter\lrcorner{\mathclose}{arrows}{"79}{arrows}{"79}
\edef\checkmark{\noexpand\mathhexbox{\hexnumber@\symarrows}AC}
\edef\circledR{\noexpand\mathhexbox{\hexnumber@\symletters}C9}
\edef\maltese{\noexpand\mathhexbox{\hexnumber@\symletters}CB}
%    \end{macrocode}
% Changes to default for |\Leftrightarrow|. I (SPQR) don't like 22C, so:
%    \begin{macrocode}
\let\Leftrightarrow\undefined
\DeclareMathSymbol{\Leftrightarrow}{\mathrel}{arrows}{"61}
%    \end{macrocode}
%
% Override AMS logo, just to ensure we don't use any CM fonts!
%    \begin{macrocode}
%\def\AmS{{\protect\AmSfont
%  A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
%    \end{macrocode}
%
%    \begin{macrocode}
%<lucidabright|lucbmath>%\def\AmSfont{\usefont{OMS}{hlcy}{m}{n}}
%</lucbmath>
%    \end{macrocode}
%
% \subsection{Lucfont test file}
% A test file for the Lucida fonts.

%    \begin{macrocode}
%<*lucfont>
\documentclass{article}
%<T1>\usepackage[T1]{fontenc}
%<LY1>\usepackage[LY1]{fontenc}
\begin{document}
\title{All the Lucida text fonts}
\author{prepared by Sebastian Rahtz}
\date{February 19th 1995}
\maketitle
\def\test#1#2#3#4#5{%
 \item[#1/#2/#3]#4 (#5):
 {\fontfamily{#1}\fontseries{#2}\fontshape{#3}\selectfont
 Animadversion for a giraffe costs \pounds123. Wa\ss\ ist 
 das f\"ur ein Klopf?
 We are often na{\"\i}ve vis-\`{a}-vis
the d{\ae}monic ph{\oe}nix's official r\^{o}le in fluffy souffl\'{e}s}
}

\begin{description}
\test{hlx}{b}{it}{hlxdi8t}{LucidaFax-DemiItalic}
\test{hlx}{b}{n}{hlxd8t}{LucidaFax-Demi}
\test{hlx}{m}{it}{hlxrir8t}{LucidaFax-Italic}
\test{hlx}{m}{n}{hlxr8t}{LucidaFax}

\test{hlh}{b}{it}{hlcdib8t}{LucidaBright-DemiItalic}
\test{hlh}{b}{n}{hlcdb8t}{LucidaBright-Demi}
\test{hlh}{m}{it}{hlcrib8t}{LucidaBright-Italic}
\test{hlh}{m}{n}{hlcrb8t}{LucidaBright}

\test{hlce}{m}{it}{hlcrie8t}{LucidaCalligraphy-Italic}

\test{hlcf}{m}{n}{hlcrf8t}{LucidaBlackletter}

\test{hlcn}{m}{it}{hlcrin8t}{LucidaCasual-Italic}
\test{hlcn}{m}{n}{hlcrn8t}{LucidaCasual}

\test{hlst}{b}{n}{hlsbt8t}{LucidaSans-TypewriterBold}
\test{hlst}{b}{sl}{hlsbot8t}{LucidaSans-TypewriterBoldOblique}

\test{hls}{ub}{it}{hlsbi8t}{LucidaSans-BoldItalic}
\test{hls}{ub}{n}{hlsb8t}{LucidaSans-Bold}
\test{hls}{b}{it}{hlsdi8t}{LucidaSans-DemiItalic}
\test{hls}{b}{n}{hlsd8t}{LucidaSans-Demi}
\test{hls}{m}{it}{hlsri8t}{LucidaSans-Italic}
\test{hls}{m}{n}{hlsr8t}{LucidaSans}

\test{hlct}{b}{n}{hlcbt8t}{LucidaTypewriterBold}
\test{hlct}{b}{sl}{hlcbot8t}{LucidaTypewriterOblique}
\test{hlcw}{m}{it}{hlcriw8t}{LucidaHandwriting-Italic}

\end{description}
\end{document}
%</lucfont>
%    \end{macrocode}
% \Finale
%

