Hi,

I defined some extra math symbols based on the help of David Munger.
David posted a question 2 years ago, asking the group how to define extra math symbols. He found a solution himself (see below) and what I am trying to do is to put this into a math collection like math-eul.tex
but I am not successfull.

I used his solution to define a module math-extra.tex based on math-eul.tex but I am getting errors like

! \textfont 14 is undefined (character).
\stopdisplaymath ->\stopinnermath $$
\ifgridsnapping \egroup \afterdisplayspa...

\dostopformula ...eter \c!alternative \v!formula }
\resetlastlinewidth \nonoi...
l.18 \stopformula

I don't know what I am doing wrong, hope someone can help me
Attached my test files.

Kind regards

W. Neimeijer

David's solution

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definebodyfont [28pt,24pt,18pt,
 17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [
 ex=txex sa 1,
 mc=txexa sa 1,
 mrbf=cmbx10 sa 1,
 exbf=cmex10  sa 1,
 mibf=cmmib10 sa 1,
 sybf=cmbsy10 sa 1,
 mabf=msam10  sa 1]
\setupbodyfont [12pt]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% txfonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definemathsymbol [oiint]               [op] [mc] ["08] [mc] ["09]
\definemathsymbol [oiiint]              [op] [mc] ["29] [mc] ["2a]
\definemathsymbol [ointctrclockwise]    [op] [mc] ["0A] [mc] ["0B]
\definemathsymbol [ointclockwise]       [op] [mc] ["0C] [mc] ["0D]
\definemathsymbol [varointctrclockwise] [op] [mc] ["2B] [mc] ["2C]
\definemathsymbol [varointclockwise]    [op] [mc] ["2D] [mc] ["2E]

\definemathsymbol [iint]                [op] [mc] ["21] [mc] ["22]
\definemathsymbol [iiint]               [op] [mc] ["23] [mc] ["24]
\definemathsymbol [iiiint]              [op] [mc] ["25] [mc] ["26]
\definemathsymbol [idotsint]            [op] [mc] ["27] [mc] ["28]

\definemathsymbol [oiintctrclockwise]   [op] [mc] ["40] [mc] ["41]
\definemathsymbol [oiintclockwise]      [op] [mc] ["48] [mc] ["49]
\definemathsymbol [varoiintctrclockwise][op] [mc] ["4A] [mc] ["4B]
\definemathsymbol [varoiintclockwise]   [op] [mc] ["42] [mc] ["43]

\definemathsymbol [oiiintctrclockwise]  [op] [mc] ["44] [mc] ["45]
\definemathsymbol [oiiintclockwise]     [op] [mc] ["4C] [mc] ["4D]
\definemathsymbol [varoiiintctrclockwise][op] [mc] ["4E] [mc] ["4F]
\definemathsymbol [varoiiintclockwise]  [op] [mc] ["46] [mc] ["47]


\starttext
The integral equation
\startformula
 \frac{d}{dt} \iiint_{\Omega} f \,dV
  = \iiint_{\Omega} Q \,dV
   - \oiint_{\partial\Omega} \vec J \cdot \vec{da}
\stopformula
can be written under the differential form
\startformula
 \frac{\partial f}{\partial t}
  = Q - \vec\nabla\cdot\vec J.
\stopformula

\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\usemodule[math-extra]

\def\X#1{$#1$ \space {\rm{\string#1}}}
\def\Y#1{$#1$ \space \rm{\string#1}}

\usetypescript[wim]
\enablemathcollection[wim]
\usemathcollection[wim]
\usemathcollection[ams]

%\usetypescript[wim]
%\switchtobodyfont[wim]

\starttext
\startformula
\oiint , \oiiint, \ointctrclockwise,
\ointclockwise, \varointctrclockwise
\stopformula

\stoptext























\placetable{Binary Operators}
\starttable[|l|l|l|l|]
\NC \X\amalg           \NC \X\cup          \NC \X\oplus    \NC \X\times           \NC\NR
\NC \X\ast             \NC \X\dagger       \NC \X\oslash   \NC \X\triangleleft    \NC\NR
\NC \X\bigcirc         \NC \X\ddagger      \NC \X\otimes   \NC \X\triangleright   \NC\NR
\NC \X\bigtriangledown \NC \X\diamond      \NC \X\pm       \NC \X\unlhd       \NC\NR
\NC \X\bigtriangleup   \NC \X\div          \NC \X\rhd  \NC \X\unrhd       \NC\NR
\NC \X\bullet          \NC \X\lhd      \NC \X\setminus \NC \X\uplus       \NC\NR
\NC \X\cap             \NC \X\mp           \NC \X\sqcap    \NC \X\vee     \NC\NR
\NC \X\cdot            \NC \X\odot         \NC \X\sqcup    \NC \X\wedge   \NC\NR
\NC \X\circ            \NC \X\ominus       \NC \X\star     \NC \X\wr      \NC\NR
\stoptable

\blank

\placetable{AMS Binary Operators}
\starttable[|l|l|l|]
\NC \X\barwedge        \NC \X\circledcirc     \NC \X\intercal        \NC\NR
\NC \X\boxdot          \NC \X\circleddash     \NC \X\leftthreetimes  \NC\NR
\NC \X\boxminus        \NC \X\Cup             \NC \X\ltimes          \NC\NR
\NC \X\boxplus         \NC \X\curlyvee        \NC \X\rightthreetimes \NC\NR
\NC \X\boxtimes        \NC \X\curlywedge      \NC \X\rtimes          \NC\NR
\NC \X\Cap             \NC \X\divideontimes   \NC \X\smallsetminus   \NC\NR
\NC \X\centerdot       \NC \X\dotplus         \NC \X\veebar          \NC\NR
\NC \X\circledast      \NC \X\doublebarwedge  \NC  \NC\NR
\stoptable

\blank

\placetable{AMS Negated Binary Operators}
\starttable[|l|l|l|]
\NC \X\ncong     \NC \X\nshortparallel \NC \X\nVDash      \NC\NR
\NC \X\nmid      \NC \X\nsim           \NC \X\precnapprox \NC\NR
\NC \X\nparallel \NC \X\nsucc          \NC \X\precnsim    \NC\NR
\NC \X\nprec     \NC \X\nsucceq        \NC \X\succnapprox \NC\NR
\NC \X\npreceq   \NC \X\nvDash         \NC \X\succnsim    \NC\NR
\NC \X\nshortmid \NC \X\nvdash         \NC                 \NC\NR
\stoptable
\showfont[stmary10]
\showfont[wasy10]
\placetable{Wasysym Binary Operators}
\starttable[|l|l|l|l|]
\NC \X\lhd \NC \X\ocircle \NC \X\RHD   \NC \X\unrhd \NC\NR
\NC \X\LHD \NC \X\rhd     \NC \X\unlhd \NC          \NC\NR
\stoptable


\placetable{{\tt stmaryrd} Binary Operators}
\starttable[|l|l|l|]
\NC \Y\baro                \NC \Y\interleave          \NC \Y\varoast             \NC\NR
\NC \Y\bbslash             \NC \Y\leftslice           \NC \Y\varobar             \NC\NR
\NC \Y\binampersand        \NC \Y\merge               \NC \Y\varobslash          \NC\NR
\NC\Y\bindnasrepma        \NC \Y\minuso              \NC \Y\varocircle          \NC\NR
\NC\Y\boxast              \NC \Y\moo                 \NC \Y\varodot             \NC\NR
\NC\Y\boxbar              \NC \Y\nplus               \NC \Y\varogreaterthan     \NC\NR
\NC\Y\boxbox              \NC \Y\obar                \NC \Y\varolessthan        \NC\NR
\NC\Y\boxbslash           \NC \Y\oblong              \NC \Y\varominus           \NC\NR
\NC\Y\boxcircle           \NC \Y\obslash             \NC \Y\varoplus            \NC\NR
\NC\Y\boxdot              \NC \Y\ogreaterthan        \NC \Y\varoslash           \NC\NR
\NC\Y\boxempty            \NC \Y\olessthan           \NC \Y\varotimes           \NC\NR
\NC\Y\boxslash            \NC \Y\ovee                \NC \Y\varovee             \NC\NR
\NC\Y\curlyveedownarrow   \NC \Y\owedge              \NC \Y\varowedge           \NC\NR
\NC\Y\curlyveeuparrow     \NC \Y\rightslice          \NC \Y\vartimes            \NC\NR
\NC\Y\curlywedgedownarrow \NC \Y\sslash              \NC \Y\Ydown               \NC\NR
\NC\Y\curlywedgeuparrow   \NC \Y\talloblong          \NC \Y\Yleft               \NC\NR
\NC\Y\fatbslash           \NC \Y\varbigcirc          \NC \Y\Yright              \NC\NR
\NC\Y\fatsemi             \NC \Y\varcurlyvee         \NC \Y\Yup                 \NC\NR
\NC\Y\fatslash            \NC \Y\varcurlywedge       \NC \NC\NR

\stoptable

\stoptext
%D \module
%D   [       file=math-extra,
%D        version=2006.03.06,
%D          title=Extra Math Macros,
%D       subtitle=Extra Math Symbols,
%D         author={Wim Neimeijer},
%D           date=\currentdate,
%D      copyright=none]
%C
\unprotect

\loadmapfile[original-youngryu-tx.map]

\starttypescript [math] [wim] [size]

\definebodyfont [28pt,24pt,18pt,
  17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [
  ex=txex sa 1,
  mc=txexa sa 1,
  mrbf=cmbx10 sa 1,
  exbf=cmex10  sa 1,
  mibf=cmmib10 sa 1,
  sybf=cmbsy10 sa 1,
  mabf=msam10  sa 1]

\stoptypescript

\setupbodyfont [12pt]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% txfonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\startmathcollection [wim]

\definemathsymbol [oiint]               [op] [mc] ["08] [mc] ["09]
\definemathsymbol [oiiint]              [op] [mc] ["29] [mc] ["2a]
\definemathsymbol [ointctrclockwise]    [op] [mc] ["0A] [mc] ["0B]
\definemathsymbol [ointclockwise]       [op] [mc] ["0C] [mc] ["0D]
\definemathsymbol [varointctrclockwise] [op] [mc] ["2B] [mc] ["2C]
\definemathsymbol [varointclockwise]    [op] [mc] ["2D] [mc] ["2E]

\definemathsymbol [iint]                [op] [mc] ["21] [mc] ["22]
\definemathsymbol [iiint]               [op] [mc] ["23] [mc] ["24]
\definemathsymbol [iiiint]              [op] [mc] ["25] [mc] ["26]
\definemathsymbol [idotsint]            [op] [mc] ["27] [mc] ["28]

\definemathsymbol [oiintctrclockwise]   [op] [mc] ["40] [mc] ["41]
\definemathsymbol [oiintclockwise]      [op] [mc] ["48] [mc] ["49]
\definemathsymbol [varoiintctrclockwise][op] [mc] ["4A] [mc] ["4B]
\definemathsymbol [varoiintclockwise]   [op] [mc] ["42] [mc] ["43]

\definemathsymbol [oiiintctrclockwise]  [op] [mc] ["44] [mc] ["45]
\definemathsymbol [oiiintclockwise]     [op] [mc] ["4C] [mc] ["4D]
\definemathsymbol [varoiiintctrclockwise][op] [mc] ["4E] [mc] ["4F]
\definemathsymbol [varoiiintclockwise]  [op] [mc] ["46] [mc] ["47]

\stopmathcollection

\protect \endinput
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to