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

Re: fontinst/mathptm: bug in OMX.etx



Sebastian Rahtz:

> i suggest that if R&R has the time, he should go ahead and try and
> produce a revised documentation set (asking questions on this list or
> the fontinst list if it still exists), and i will make changes to the
> code as required

While we are at it, I'd like to point out that the recent work on 
math fonts also produced a few small extensions to fontinst (by 
Matthias Clasen) which facilitate writing .etx and .mtx files.  
It would be nice if those extensions, at least the essential ones,
could find their way into the primary fontinst distrubtion as well.

As for documentation, the code below allows to write something like

  \useexamplefont{<font_containing_new_symbols>}

  \setdefaultslotcomment{The symbol `\slotexample'.}
  \setslot{<some_symbol>}\endsetslot
  \setslot{<another_symbol>}\endsetslot
  \setslot{<some letter>}[The letter `\slotexample'.]\endsetslot
  \setslot{<yet_another_symbol>}\endsetslot

instead of the more tedious

  \usepackage{<package_to_access_symbols>}

  \setslot{<some_symbol>}
     \comment{The symbol `$\somesymbol$'.}
  \endsetslot
  \setslot{<another_symbol>}
     \comment{The symbol `$\anothersymbol$'.}
  \endsetslot
  \setslot{<some_symbol>}
     \comment{The letter `\letter'.}
  \endsetslot

I hope the basic idea of this should be clear.

Cheers, Ulrik,


- - - - - - - - - - - - - - - - 
\RequirePackage{fontdoc}
\ProvidesPackage{emfntdoc}[1997/04/03 small extensions to fontdoc]

\newcommand{\useexamplefont}[1]{\def\fontname{#1}\font\@examplefont=#1}
\newcommand{\setdefaultslotcomment}[1]{\def\default@slotcomment{#1}}
\newcommand{\slotexample}{{\@examplefont\char\the\slot@number}}
\newcommand{\setslot@comment}[1][\default@slotcomment]{\comment{#1}}
\let\setslotorig=\setslot \let\endsetslotorig=\endsetslot
\renewcommand{\setslot}[1]{\setslotorig{#1}\setslot@comment}
\renewcommand{\endsetslot}{\endsetslotorig}

\useexamplefont{cmr10}
\setdefaultslotcomment{The symbol `\slotexample'.}

- - - - - - - - - - - - - - - - 
\RequirePackage{fontinst}
\ProvidesPackage{emfninst}[1997/04/03 small extensions to fontinst]

\newcommand{\slotexample}{}
\newcommand{\useexamplefont}[1]{}
\newcommand{\setdefaultslotcomment}[1]{}
\newcommand{\setslot@comment}[1][]{}
\let\setslot@orig=\setslot
\renewcommand{\setslot}[1]{\setslot@orig{#1}\setslot@comment}

\newcommand{\missingglyph}[1]{
  \setglyph{#1}
      \glyphrule{666}{666}
      \resetheight{0}  % avoid problems with too many depths or heights
      \resetdepth{0}
      \glyphwarning{missing glyph}
  \endsetglyph
}
\newcommand{\controlglyph}[1]{
  \setglyph{#1}
     \glyphrule{333}{333}
      \resetheight{0}  % avoid problems with too many depths or heights
      \resetdepth{0}
      \glyphwarning{control glyph}
  \endsetglyph
}
\newcommand{\emptyglyph}[1]{\setglyph{#1}\endsetglyph}
\newcommand{\replaceglyph}[2]{\setglyph{#1}\glyph{#2}{1000}\endsetglyph}

% the proposed encodings
\declareencoding{MATH CORE}{MC}
\declareencoding{MATH EXTENSION 1}{MX1}
\declareencoding{MATH EXTENSION 2}{MX2}
\declareencoding{MATH SYMBOL PRIVILEDGE}{MSP}
\declareencoding{MATH SYMBOL 1}{MS1}
\declareencoding{MATH SYMBOL 2}{MS2}

% additional encodings
\declareencoding{LATEX SYMBOLS}{lasy}             % for lasy fonts
\declareencoding{TEX MATH ITALIC SUBSET}{eurm}    % for Euler roman fonts
\declareencoding{TEX TEXT SUBSET}{eufrak}         % for Euler fraktur fonts
\declareencoding{TEX MATH SYMBOLS SUBSET}{euscr}  % for Euler script fonts
\declareencoding{EULER SUBSTITUTIONS ONLY}{euex}  % for Euler extension fonts

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