[NTG-context] Missing math symbols (MK-IV)

gummybears oracleopp at gmail.com
Mon Mar 22 18:54:40 CET 2010


Hi,

In a previous email I commented that the integral symbols, when using the
unicode font Cambria or Asana,
don't look ok. It has to do with the way e.g \iint, \iiint etc are
constructed. Whether or
not the symbol is present in the unicode font, the tex macro \repeatintegral
is used
(fallback option). I don't want to use the Cambria or Asana font entirely,
as the other math typesetting
doesn't look nice. Just for the missing symbols.

Found an earlier post (Thomas A. Schmitz titled symbols in luatex date
2008-01-02) where
a solution was presented by Wolfgang Schuster. Basically I am using his
solution
and came up with the following (only works ok in text mode). Also looked at
definemathcharacter
but not sure how to make it work with unicode fonts (could not find any
documentation,
looked at the source files, but don't know what to fill in for the 6
parameters to definemathcharacter)

Question : what is the right way I can make this work (definemathcharacter,
something else) ?
Question : some of these symbols are defined in char-def.lua but missing in
math-vfu.lua.
What is needed to make them active ? Can I do it myself and send a list of
missing symbols with their unicode value ?

Thanks for the help.

% test of some math symbols
\starttypescript[serif][mathsymbols][name]
  \definefontsynonym [Serif] [name:asana][features=default]
\stoptypescript
\starttypescript[MathSymbols]
\definetypeface [MathSymbols] [rm] [serif] [mathsymbols] [default]
\stoptypescript
\usetypescript[MathSymbols]

% undefine iint, iiint, iiiint
\definemathcommand [iint]   {}
\definemathcommand [iiint]  {}
\definemathcommand [iiiint] {}
% define my own
\definecharacter integral
{\bgroup\switchtobodyfont[MathSymbols]\char"222B\egroup}
\definecharacter dblintegral
{\bgroup\switchtobodyfont[MathSymbols]\char"222C\egroup}
\definecharacter tripleintegral
{\bgroup\switchtobodyfont[MathSymbols]\char"222D\egroup}
\definecharacter contourintegral
{\bgroup\switchtobodyfont[MathSymbols]\char"222E\egroup}
\definecharacter surfaceintegral
{\bgroup\switchtobodyfont[MathSymbols]\char"222F\egroup}
\definecharacter volumeintegral
{\bgroup\switchtobodyfont[MathSymbols]\char"2230\egroup}
\starttext
integral \integral double integral \dblintegral triple integral
\tripleintegral
\startformula
\startalign[n=2]
\NC \text{integral} \NC \text{\integral}_{a}^{b} \NR
\NC \text{double integral} \NC \text{\dblintegral}_{a}^{b}\NR
\NC \text{triple integral} \NC \text{\tripleintegral}\NR
\NC \text{contour integral} \NC \text{\contourintegral}_{a}^{b} \NR
\NC \text{surface integral} \NC \text{\surfaceintegral}_{a}^{b} \NR
\NC \text{volume integral}  \NC \text{\volumeintegral}_{a}^{b} \NR
\stopalign
\stopformula
\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20100322/42db0abc/attachment.html>


More information about the ntg-context mailing list