% Filename: vpfcmrm.tex

\def\author{Alan Jeffrey}
\def\email{jeffrey@cs.chalmers.se}
\def\lastmodified{18 Dec 1991}
\def\versionnumber{1.03}
\def\description{Variant Computer Modern Roman Math-encoded}

% 12 Dec 1991: Finished V1.0.
%
% 18 Dec 1991, V1.03: Updated for V1.03 of makevpl.tex.

% This TeX program generates fcmrm10.vpl (the virtual property list for
% fake CMR math-encoded) from:
%
%    dcr10, cmmi10, cmsy10, cmex10, msam10, msbm10, rfcmrm10.
%
% rfcmrm10 is the only non-standard font---it contains the extra
% characters that Yannis and I proposed for inclusion, plus hacks for
% upright Greek.
%
% This font is a proposal for an 8-bit encoded math font.  It contains
% the math characters that are most dependent on the text font.  The
% `geometric' characters are kept in fcmry10 and fcmrv10, and the other letter
% forms, such as open, calligraphic, copperplate and black letter are
% in fcmrma10.  
%
% It uses makevpl.tex, a set of macros for producing vpl files.

\input makevpl
\newcount\source
\newcount\target

% Then we make the vpl file.

\makevpl{fcmrm10}

   \codingscheme Proposed 8-bit TeX math scheme;

   \designsize 10pt;

   \loadfont\dcroman=dcr10 at 10pt;
   \loadfont\cmsymbol=cmsy10 at 10pt;
   \loadfont\cmmathit=cmmi10 at 10pt;
   \loadfont\cmextensions=cmex10 at 10pt;
   \loadfont\amsA=msam10 at 10pt;
   \loadfont\amsB=msbm10 at 10pt;
   \loadfont\extras=rfcmrm10 at 10pt;
   \loadfont\cmsmall=cmr10 at 7pt;

% I've stolen the font dimens from dcr.  These would be altered for a
% real font.

   \dcroman
   \fontdimens
      1 : \fontdimen1\font
      \for\source\in2\to7\do ,\fontdimen\source\font \od;

% A real math font would also have a proper ligature and kerning
% table.  For the moment I'll just set up the ff, fi, fl, ffi, ffl
% ligatures.

   \ligtable "f": "i"=:\oct"034", "f"=:\oct"033", "l"=:\oct"035";
   \ligtable \oct"033": "i"=:\oct"036", "l"=:\oct"037";

% Then we load in the characters.

% Most of characters '000--'177 are the same as the Cork encoding.
% Exceptions are:
%
%    -- and --- are now vector and slur accents
%    * and - are now \ast and minus
% 
% We also use:
%
%    A, B, E, Z, H, I, K, M, N, O, P, T, X, Y as uppercase Greek
%    o as omicron
%    inverted-!, inverted-?, \S, \pounds
%    the various non-Latin upper and lower case letters

   \dcroman 
      \character
         '200='101, '201='102, '204='105, '205='132,  % Greek
         '206='110, '210='111, '211='113, '213='115,  % Greek
         '214='116, '217='117, '221='120, '223='124,  % Greek
         '226='130, '257='157,                        % Greek, omicron  
         '053, '054, '215, '236, '237, '255, '275,    % others
         '276, '277, '306, '320, '327, '330, '336,    % others
         '346, '360, '367, '370, '376, '377           % others
         \for\source\in'000\to'024\do ,\source \od
         \for\source\in'027\to'051\do ,\source \od
         \for\source\in'056\to'177\do ,\source \od;

% From cmmi we take:
%
%    the vector and slur accents
%    italic f for use as florin
%    \flat, \natural, \sharp, \wp, partial

   \cmmathit
      \character 
         '025='176, '026='177,            % vector, slur
         '235='175,                       % wp
         '307='100,                       % partial
         '317='146,                       % florin
         '343='133, '344='134, '345='135; % flat, natural, sharp

% From cmsy we take:
%
%    -, *
%    \amalg, \nabla, \aleph
%    the copyright circle, \propto, \infty
%    \dagger, \ddagger, \P
%    \emptyset
%    \neg
%    \cdot, \times, \div, \pm, \mp
%    \smallint

   \cmsymbol
      \character
         '055='000, '052='003,             % -, *
         '233='161, '234='162,             % amalg, nabla
         '310='100,                        % aleph
         '324='015, '325='057, '326='061,  % circle, propto, infty
         '331='171, '332='172, '333='173,  % dagger, ddagger, P
         '347='073,                        % emptyset         
         '337='072,                        % neg
         '353='001, '354='002, '355='004,  % cdot, times, div
         '356='006, '357='007,             % pm, mp
         '371='163;                        % smallint

% From cmex we take:
%
%    \sum, \prod, \coprod, \int, \oint in text and display sizes.

   \cmextensions
      \character
         '361='120, '362='130, '363='121, '364='131,  % sum, prod
         '365='140, '366='141,                        % coprod
         '372='122, '373='132, '374='110, '375='111;  % int, oint

% From msam we take:
%
%    empty tuple (), Yen, circle-R, circle-S, maltese cross

   \amsA
      \character
         '335='107, '316='125,             % empty tuple, Yen
         '322='162, '323='163, '334='172;  % circle-R, circle-S, maltese X

% From msbm we take:
%
%    Hebrew letters, mho, Digamma

   \amsB
      \character
         '311='151, '312='152, '313='153,  % Hebrew
         '232='146, '231='172;             % mho, Diagamma
		 
% From rfcmrm we take:
%
%    the Greek uprights, 
%    upright h-slashes
%    cent and currency symbols
%    the semantic brackets [[ and ]]
%    linear par &-inverted

   \extras
      \character
        '202='000, '203='001, '207='002,   % Greek
        '212='003, '216='004, '220='005,   % Greek
        '222='006, '224='007, '225='010,   % Greek
        '227='011, '230='012,              % Greek
        '256='030, '300='046, '301='047,   % greek
        '302='050, '303='051,              % greek
        '304='052, '305='053,              % h-slashes
        '314='054, '315='055,              % cents, currency
        '340='056, '341='057,              % [[ and ]]
        '342='060                          % &-inverted
        \for\source\in'013\to'027\do       % greek up to nj
           \target\source\advance\target by'225 ,\target=\source
        \od
        \for\source\in'031\to'045\do       % greek after omicron
           \target\source\advance\target by'227 ,\target=\source
        \od;

% The following symbols need manufactured `by hand'.

\dcroman
\newdimen\leftshift
\newdimen\upshift
\newdimen\downshift
\newdimen\width

% Copyright symbol

\setbox0\hbox{\cmsmall C}
\leftshift\wd0
\setbox0\hbox{\cmsymbol\char'015}
\advance\leftshift by \wd0
\divide\leftshift by 2

\raw
(COMMENT copyright symbol, generated by hand)
(CHARACTER O 321
   (CHARWD \real\wd0)
   (CHARHT \real\ht0)
   (CHARDP \real\dp0)
   (MAP
      (SELECTFONT D \cmsymbolnum)
      (SETCHAR O 015)
      (MOVELEFT \real\leftshift)
      (SELECTFONT D \cmsmallnum)
      (SETCHAR C C)
      )
   )
\endraw
\isdefined '321=\noexpand\copyright;

% Fractions

\setbox0\hbox{/}
\setbox1\hbox{\cmsmall 1}
\leftshift .5\wd0
\upshift\ht0 \advance\upshift by -\ht1
\downshift\dp0
\width 2\wd1

\raw
(COMMENT fraction 1/4, generated by hand)
(CHARACTER O 350
   (CHARWD \real\width)
   (CHARHT \real\ht0)
   (CHARDP \real\dp0)
   (MAP
      (MOVEUP \real\upshift)
      (SELECTFONT D \cmsmallnum)
      (SETCHAR C 1)
      (MOVEDOWN \real\upshift)
      (MOVELEFT \real\leftshift)
      (SELECTFONT D \dcromannum)
      (SETCHAR C /)
      (MOVELEFT \real\leftshift)
      (MOVEDOWN \real\downshift)
      (SELECTFONT D \cmsmallnum)
      (SETCHAR C 4)
      )
   )
(COMMENT fraction 1/2, generated by hand)
(CHARACTER O 351
   (CHARWD \real\width)
   (CHARHT \real\ht0)
   (CHARDP \real\dp0)
   (MAP
      (MOVEUP \real\upshift)
      (SELECTFONT D \cmsmallnum)
      (SETCHAR C 1)
      (MOVEDOWN \real\upshift)
      (MOVELEFT \real\leftshift)
      (SELECTFONT D \dcromannum)
      (SETCHAR C /)
      (MOVELEFT \real\leftshift)
      (MOVEDOWN \real\downshift)
      (SELECTFONT D \cmsmallnum)
      (SETCHAR C 2)
      )
   )
(COMMENT fraction 3/4, generated by hand)
(CHARACTER O 352
   (CHARWD \real\width)
   (CHARHT \real\ht0)
   (CHARDP \real\dp0)
   (MAP
      (MOVEUP \real\upshift)
      (SELECTFONT D \cmsmallnum)
      (SETCHAR C 3)
      (MOVEDOWN \real\upshift)
      (MOVELEFT \real\leftshift)
      (SELECTFONT D \dcromannum)
      (SETCHAR C /)
      (MOVELEFT \real\leftshift)
      (MOVEDOWN \real\downshift)
      (SELECTFONT D \cmsmallnum)
      (SETCHAR C 4)
      )
   )
\endraw

\def\fraction#1#2%
   {\raise\upshift\hbox{\cmsmall#1}%
      \kern-\leftshift{\dcroman/}\kern-\leftshift
      \lower\downshift\hbox{\cmsmall#2}}

\isdefined '350=\fraction14; 
\isdefined '351=\fraction12; 
\isdefined '352=\fraction34;

\endmakevpl

\end
