ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: how to define a new math symbol
@ 2006-10-25  9:35 M.J. Kallen
  0 siblings, 0 replies; 5+ messages in thread
From: M.J. Kallen @ 2006-10-25  9:35 UTC (permalink / raw)


Great, it works! Running "texexec --pdf test-prodint" worked immediately, but "xdvi test-prodint.dvi" gave me an error relating to mktexpk not being able to create a bitmap font. Solved this problem by running "updmap --enable Map prodint.map". 

I don't think I could have done this myself, as I do not understand some of the steps in your solution.

Thank you very much!

Maarten-Jan

----- Original Message ----
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Sent: Wednesday, October 25, 2006 10:40:10 AM
Subject: Re: [NTG-context] how to define a new math symbol


M.J. Kallen wrote:
> Taco,
> 
> 
> I'm not sure I understand your question. I'm using TexLive on a linux
> system. I do not use any other fonts other than CM.

That last bit of information is crucial, because there is a difference
between font handling between CM/Lm and commercial fonts.

I've been skyping with Hans and he came up with the code below.
You can use the font files from the LaTeX zip, you just have to
make sure that pdftex can find the (map) file, of course.


Cheers, taco

% test-prodint.tex

\definefontsynonym [MathGamma]  [prodint]

\definefamilysynonym [default]  [xop]   [mc]

\startmathcollection [default]

\definemathsymbol [prodi]  [op]  [xop] [80]  %80 prodinttext
\definemathsymbol [Prodi]  [op]  [xop] [82]  %82 prodintdisplay
\definemathsymbol [PRODI]  [op]  [xop] [84]  %84 prodintbig

\stopmathcollection

\loadmapfile[prodint]


\starttypescript [math] [modern,computer-modern,latin-modern,ams] [size]
   \definebodyfont 
[17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [mc=prodint]
\stoptypescript

\definetypeface [modern] [mm] [math]  [modern]
                 [computer-modern][encoding=default]

\setupbodyfont[reset,modern,10pt]

\enablemathcollection[prodint]

\starttext

$\prodi$

\stoptext

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how to define a new math symbol
  2006-10-25  8:18 M.J. Kallen
@ 2006-10-25  8:40 ` Taco Hoekwater
  0 siblings, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2006-10-25  8:40 UTC (permalink / raw)




M.J. Kallen wrote:
> Taco,
> 
> 
> I'm not sure I understand your question. I'm using TexLive on a linux
> system. I do not use any other fonts other than CM.

That last bit of information is crucial, because there is a difference
between font handling between CM/Lm and commercial fonts.

I've been skyping with Hans and he came up with the code below.
You can use the font files from the LaTeX zip, you just have to
make sure that pdftex can find the (map) file, of course.


Cheers, taco

% test-prodint.tex

\definefontsynonym [MathGamma]  [prodint]

\definefamilysynonym [default]  [xop]   [mc]

\startmathcollection [default]

\definemathsymbol [prodi]  [op]  [xop] [80]  %80 prodinttext
\definemathsymbol [Prodi]  [op]  [xop] [82]  %82 prodintdisplay
\definemathsymbol [PRODI]  [op]  [xop] [84]  %84 prodintbig

\stopmathcollection

\loadmapfile[prodint]


\starttypescript [math] [modern,computer-modern,latin-modern,ams] [size]
   \definebodyfont 
[17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [mc=prodint]
\stoptypescript

\definetypeface [modern] [mm] [math]  [modern]
                 [computer-modern][encoding=default]

\setupbodyfont[reset,modern,10pt]

\enablemathcollection[prodint]

\starttext

$\prodi$

\stoptext

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how to define a new math symbol
@ 2006-10-25  8:18 M.J. Kallen
  2006-10-25  8:40 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: M.J. Kallen @ 2006-10-25  8:18 UTC (permalink / raw)


Taco,

I'm not sure I understand your question. I'm using TexLive on a linux system. I do not use any other fonts other than CM. 

The file prodint.afm has the following contents:

StartFontMetrics 4.0
Comment This is prodint.afm created from prodint.pfb by t1lib V. 1.0.0.
Comment File creation date: Thu Mar  8 00:02:51 2001
Comment t1lib is copyright (c) Rainer Menzner, 1996, 1997, 1998.
Comment t1lib is distributed under the GNU General Public Library License (LGPL)
FontName prodint
FullName prodint
FamilyName prodint
Weight Plain
ItalicAngle 0
IsFixedPitch false
FontBBox 0 -53 2581 2298
UnderlinePosition 0
UnderlineThickness 0
Version 000.001
Notice 2001, JC Loredo-Osti. Based in R. Gill's `pi.ps'. Right to use, copy, distribute and modify this file is granted.
EncodingScheme FontSpecific
StdHW 47
StdVW 47
StartCharMetrics 7
C  80 ; WX  785 ; N prodinttext          ; B     0     0   713   999 ;
C  82 ; WX 1255 ; N prodintdisplay       ; B     0     0  1141  1599 ;
C  84 ; WX 1804 ; N prodintbig           ; B     0     0  1640  2298 ;
C 120 ; WX 1205 ; N oldpitext            ; B    13   -33  1237   966 ;
C 122 ; WX 1928 ; N oldpidisplay         ; B    23   -53  1982  1547 ;
C 160 ; WX 1637 ; N ancientpitext        ; B    50   -27  1611   974 ;
C 162 ; WX 2619 ; N ancientpidisplay     ; B    81   -40  2581  1561 ;
EndCharMetrics
EndFontMetrics

End of file prodint.afm

So based on some of the symb-xxx.tex files, I tried

\loadmapfile[prodint.map]
\definefontsynonym [Prodint] [prodint]
\def\ProdintSymbol#1{\getglyph{Prodint}{\char#1}}

\startsymbolset
    \definesymbol[prodi] [\ProdintSymbol{80}]
    \definesymbol[Prodi] [\ProdintSymbol{82}]
    \definesymbol[PRODI] [\ProdintSymbol{84}]
\stopsymbolset

but texexec stops when mktexfm cannot find the file 'prodint' or it says the TFM file is missing. Another problem with this approach is the fact that this does not define a MATH symbol, which is really what I would want. Based on the LaTeX style file prodint.sty, I'm guessing I'll at least need a command like:

\definemathsymbol [prodi] [op] [prodint] ["xx]

but I can't figure out the usage of this command. I also suspect that I can not used the prodint.tfm file, supplied with the LaTeX package, but need to run Texfont to create one for ConTeXt. Can you confirm this?

I greatly appreciate any help!

Maarten-Jan

----- Original Message ----
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Sent: Tuesday, October 24, 2006 5:31:10 PM
Subject: Re: [NTG-context] how to define a new math symbol


MJK wrote:
> Hi,
> 
> I would like to use of the product integral (a curly \prod-like
> symbol which is to \prod what \int is to \sum) in Context. There is a
> LaTeX package (not official) available from Richard Gill's website
> (http://www.math.uu.nl/people/gill/, all the way at the bottom),
> which supplies a .sty file with the following contents:

What font setup do you use in ConTeXt?

Taco
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how to define a new math symbol
  2006-10-24  9:43 MJK
@ 2006-10-24 15:31 ` Taco Hoekwater
  0 siblings, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2006-10-24 15:31 UTC (permalink / raw)




MJK wrote:
> Hi,
> 
> I would like to use of the product integral (a curly \prod-like
> symbol which is to \prod what \int is to \sum) in Context. There is a
> LaTeX package (not official) available from Richard Gill's website
> (http://www.math.uu.nl/people/gill/, all the way at the bottom),
> which supplies a .sty file with the following contents:

What font setup do you use in ConTeXt?

Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how to define a new math symbol
@ 2006-10-24  9:43 MJK
  2006-10-24 15:31 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: MJK @ 2006-10-24  9:43 UTC (permalink / raw)


Hi,

I would like to use of the product integral (a curly \prod-like symbol which is to \prod what \int is to \sum) in Context. There is a LaTeX package (not official) available from Richard Gill's website (http://www.math.uu.nl/people/gill/, all the way at the bottom), which supplies a .sty file with the following contents:

\ProvidesPackage{prodint}
\DeclareFontFamily{U}{ProdInt}{}
\DeclareFontShape{U}{ProdInt}{m}{n}{<-> prodint}{}
\DeclareSymbolFont{Prodint}{U}{ProdInt}{m}{n}
\DeclareMathSymbol{\prodi}{\mathop}{Prodint}{80}    %80 prodinttext
\DeclareMathSymbol{\Prodi}{\mathop}{Prodint}{82}    %82 prodintdisplay
\DeclareMathSymbol{\PRODI}{\mathop}{Prodint}{84}    %84 prodintbig
\endinput

It also supplies a bunch of fontfiles, i.e. prodint.{afm,pfa,pfb,tfm}, and a map file prodint.map. As you can see, the package supplies three commands: \prodi, \Prodi and \PRODI, corresponding to three sizes.

My question(s): how can I define similar commands (I'm guessing \definemathsymbol would be required) to use this symbol in Context? Is it possible to use the fontfiles supplied in the LaTeX package or should Texfont be used to enable the symbol in Context?

Thanks,

Maarten-Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-10-25  9:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-25  9:35 how to define a new math symbol M.J. Kallen
  -- strict thread matches above, loose matches on Subject: below --
2006-10-25  8:18 M.J. Kallen
2006-10-25  8:40 ` Taco Hoekwater
2006-10-24  9:43 MJK
2006-10-24 15:31 ` Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).