Re: [NTG-context] \bar missing in euler

2006-09-15 Thread Taco Hoekwater
Hans Hagen wrote:
 Aditya Mahajan wrote:
 
I wish Hermann Zapf had added these accents in Euler.
  
 
 i'll pass the question when the occasion is there ...
 
Hans, why is mathring accent missing from all collections except 
fourier?
  
 
 dunno, and if taco does notknow it either, who knows -) 

Probably an oversight, because it is not defined in plain.tex.

Traditional TeX math fonts need:

   \definemathsymbol [mathring]   [accent] [mr] [17]

Cheers,
Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \bar missing in euler

2006-09-14 Thread Hans Hagen
Aditya Mahajan wrote:

 I wish Hermann Zapf had added these accents in Euler.
   
i'll pass the question when the occasion is there ...
 Hans, why is mathring accent missing from all collections except 
 fourier?
   
dunno, and if taco does notknow it either, who knows -) 
 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \bar missing in euler

2006-09-12 Thread Aditya Mahajan

On Fri, 21 Jul 2006, Aditya Mahajan wrote:


On Tue, 11 Jul 2006, Hans Hagen wrote:


Adam Lindsay wrote:

Makes sense. I'll look at the new definitions you just sent.

On the user side, what do you imagine it would look like:
\definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]



^^^ this one (actually it listens to the outer encoding)


I am missing something. I tried the following (with the alpha,
cont-new.tex contains the new definitions), but get not accent with
the following code.

\startmathcollection[euler:texnansi]
\definemathsymbol [breve] [accent] [tf] [15]
\stopmathcollection
\startmathcollection[euler:ec]
\definemathsymbol [breve] [accent] [tf] [08]
\stopmathcollection


\definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
\setupbodyfont[e,10pt]

\starttext
$\breve e$
\stoptext


I am restarting one of my old threads, so please be patient.

To restate the problem, some accents are missing from euler font. Adam 
suggested using a hack along the lines of latex to pull those accents 
from the text font, later Hans posted some code that took care of 
encoding and stuff. Hans added the code to cont-new.tex with a example 
usage in the comments.


I could never get the example to work.

Hans, the code in cont-new.tex is slightly differnt from the code that 
you posted on the ML. The code on the ML works, while the code in 
cont-new.tex does not.


The attached file compares the output of the code in cont-new.tex with 
the code posted on the ML. Can you look into it to see what is going 
on. Since euler is the only incomplete math font, the definitions for 
all the accents can be added to math-eul.tex.


Aditya\definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
\setupbodyfont[e,10pt]
\starttext

\startbuffer
\startmathcollection[euler:texnansi]
\definemathsymbol [breve] [accent] [tf] [15]
\stopmathcollection
\startmathcollection[euler:ec]
\definemathsymbol [breve] [accent] [tf] [08]
\stopmathcollection

$\breve e$
\stopbuffer

Testing for code in \filename{cont-new.tex}
\start
  \getbuffer\typebuffer 
\stop

\startbuffer
\unprotect

 \def\dohandlemathtoken#1%
   {\csname
  \ifmmode
[EMAIL PROTECTED]@\outerencoding#1\endcsname
  [EMAIL PROTECTED]@\outerencoding
[EMAIL PROTECTED]@\mathcollection#1\endcsname
  [EMAIL PROTECTED]@\mathcollection
[EMAIL PROTECTED]@\nomathcollection#1\endcsname
  [EMAIL PROTECTED]@\nomathcollection
\else\ifcsname\characterencoding#1\endcsname
  \characterencoding
\else
  \nocharacterencoding
\fi\fi\fi\fi
  \else
\ifcsname\characterencoding#1\endcsname
  \characterencoding
\else\ifcsname\nocharacterencoding#1\endcsname
  \nocharacterencoding
[EMAIL PROTECTED]@\outerencoding#1\endcsname
  [EMAIL PROTECTED]@\outerencoding
[EMAIL PROTECTED]@\mathcollection#1\endcsname
  \strippedcsname\mathematics
 [EMAIL PROTECTED]@\mathcollection
[EMAIL PROTECTED]@\nomathcollection#1\endcsname
  \strippedcsname\mathematics
 [EMAIL PROTECTED]@\nomathcollection
\else
  \nocharacterencoding
\fi\fi\fi\fi\fi
  \fi
#1\endcsname}
 \let\dohandlecommand\dohandlemathtoken

 \def\checkoutermathencoding
   {\ifx\outerencoding\empty
  \ifx\outerencoding\s!default\else
\edef\outerencoding{\currentencoding}%
  \fi
\fi}

 \startmathcollection[texnansi]
 \definemathsymbol [breve] [accent] [tf] [15]
 \stopmathcollection
 \startmathcollection[ec]
 \definemathsymbol [breve] [accent] [tf] [08]
 \stopmathcollection

 \prependtoks
\checkoutermathencoding
 \to \everymathematics

 \let\outerencoding\empty

 $\breve e$
\stopbuffer

\page

Testing for code sent by Hans on the mailing list
\start
  \getbuffer\typebuffer 
\stop



\stoptext

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


Re: [NTG-context] \bar missing in euler

2006-09-12 Thread Hans Hagen
Aditya Mahajan wrote:
 On Fri, 21 Jul 2006, Aditya Mahajan wrote:

it's eul


\startmathcollection[eul:texnansi]
\definemathsymbol [breve] [accent] [tf] [15]
\stopmathcollection
\startmathcollection[eul:ec]
\definemathsymbol [breve] [accent] [tf] [08]
\stopmathcollection

\definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
\setupbodyfont[e,10pt]

$\breve e$



 On Tue, 11 Jul 2006, Hans Hagen wrote:

 Adam Lindsay wrote:
 Makes sense. I'll look at the new definitions you just sent.

 On the user side, what do you imagine it would look like:
 \definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]


 ^^^ this one (actually it listens to the outer encoding)

 I am missing something. I tried the following (with the alpha,
 cont-new.tex contains the new definitions), but get not accent with
 the following code.

 \startmathcollection[euler:texnansi]
 \definemathsymbol [breve] [accent] [tf] [15]
 \stopmathcollection
 \startmathcollection[euler:ec]
 \definemathsymbol [breve] [accent] [tf] [08]
 \stopmathcollection


 \definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
 \setupbodyfont[e,10pt]

 \starttext
 $\breve e$
 \stoptext

 I am restarting one of my old threads, so please be patient.

 To restate the problem, some accents are missing from euler font. Adam 
 suggested using a hack along the lines of latex to pull those accents 
 from the text font, later Hans posted some code that took care of 
 encoding and stuff. Hans added the code to cont-new.tex with a example 
 usage in the comments.

 I could never get the example to work.

 Hans, the code in cont-new.tex is slightly differnt from the code that 
 you posted on the ML. The code on the ML works, while the code in 
 cont-new.tex does not.

 The attached file compares the output of the code in cont-new.tex with 
 the code posted on the ML. Can you look into it to see what is going 
 on. Since euler is the only incomplete math font, the definitions for 
 all the accents can be added to math-eul.tex.

 Aditya
 

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


-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \bar missing in euler

2006-09-12 Thread Aditya Mahajan
On Wed, 13 Sep 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 On Fri, 21 Jul 2006, Aditya Mahajan wrote:

 it's eul


 \startmathcollection[eul:texnansi]
\definemathsymbol [breve] [accent] [tf] [15]
 \stopmathcollection
 \startmathcollection[eul:ec]
\definemathsymbol [breve] [accent] [tf] [08]
 \stopmathcollection

 \definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
 \setupbodyfont[e,10pt]

 $\breve e$

Thanks... here is a list of all accents.

\startmathcollection[eul:texnansi]
   \definemathsymbol [acute][accent] [tf] [13]
   \definemathsymbol [grave][accent] [tf] [12]
   \definemathsymbol [ddot] [accent] [tf] [A8]
   \definemathsymbol [tilde][accent] [tf] [98]
   \definemathsymbol [bar]  [accent] [tf] [16]
   \definemathsymbol [breve][accent] [tf] [15]
   \definemathsymbol [check][accent] [tf] [14]
   \definemathsymbol [hat]  [accent] [tf] [88]
   \definemathsymbol [dot]  [accent] [tf] [5]
   % Why is mathring not defined??
   \definemathsymbol [mathring] [accent] [tf] [17]
\stopmathcollection

\startmathcollection[eul:ec]
   \definemathsymbol [acute][accent] [tf] [1]
   \definemathsymbol [grave][accent] [tf] [0]
   \definemathsymbol [ddot] [accent] [tf] [4]
   \definemathsymbol [tilde][accent] [tf] [3]
   \definemathsymbol [bar]  [accent] [tf] [9]
   \definemathsymbol [breve][accent] [tf] [8]
   \definemathsymbol [check][accent] [tf] [7]
   \definemathsymbol [hat]  [accent] [tf] [2]
   \definemathsymbol [dot]  [accent] [tf] [A]
   % Why is mathring not defined??
   \definemathsymbol [mathring] [accent] [tf] [6]
\stopmathcollection

Here I have replaced the \hat from the text fonts. math-eul.tex 
already redefines hat as

\definemathsymbol [hat]   [accent] [sy] [DE]

which appears to be too wide.


This method works for most fonts that I tested with, but the result is 
UGLY (as expected). Check out the output of

\definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
\setupbodyfont[e,10pt]

$
 \acute b
 \grave b
 \ddot  b
 \tilde b
 \bar   b
 \breve b
 \check b
 \hat   b
 \dot   b
$

I wish Hermann Zapf had added these accents in Euler.

Hans, why is mathring accent missing from all collections except 
fourier?

Aditya





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


Re: [NTG-context] \bar missing in euler

2006-07-21 Thread Aditya Mahajan
On Tue, 11 Jul 2006, Hans Hagen wrote:

 Adam Lindsay wrote:
 Makes sense. I'll look at the new definitions you just sent.

 On the user side, what do you imagine it would look like:
 \definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]


 ^^^ this one (actually it listens to the outer encoding)

I am missing something. I tried the following (with the alpha, 
cont-new.tex contains the new definitions), but get not accent with 
the following code.

\startmathcollection[euler:texnansi]
 \definemathsymbol [breve] [accent] [tf] [15]
\stopmathcollection
\startmathcollection[euler:ec]
 \definemathsymbol [breve] [accent] [tf] [08]
\stopmathcollection


\definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
\setupbodyfont[e,10pt]

\starttext
$\breve e$
\stoptext

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


Re: [NTG-context] \bar missing in euler

2006-07-11 Thread Hans Hagen
Aditya Mahajan wrote:
 I have no knowledge of how Context's font stuff works. The first 
 definition looks better to me, as one would not need to worry about 
 the encoding while defining symbols (one needs to worry about the 
 encoding while defining \textbreve etc, anyway). Though the second 
 does have the advantage that it works right away, so there is no need 
 to change the definition of \definemathsymbol.
   
what a mess

\unprotect

\def\dohandlemathtoken#1%
  {\csname
 \ifmmode
   [EMAIL PROTECTED]@\outerencoding#1\endcsname
 [EMAIL PROTECTED]@\outerencoding
   [EMAIL PROTECTED]@\mathcollection#1\endcsname
 [EMAIL PROTECTED]@\mathcollection
   [EMAIL PROTECTED]@\nomathcollection#1\endcsname
 [EMAIL PROTECTED]@\nomathcollection
   \else\ifcsname\characterencoding#1\endcsname
 \characterencoding
   \else
 \nocharacterencoding
   \fi\fi\fi\fi
 \else
   \ifcsname\characterencoding#1\endcsname
 \characterencoding
   \else\ifcsname\nocharacterencoding#1\endcsname
 \nocharacterencoding
   [EMAIL PROTECTED]@\outerencoding#1\endcsname
 [EMAIL PROTECTED]@\outerencoding
   [EMAIL PROTECTED]@\mathcollection#1\endcsname
 \strippedcsname\mathematics
[EMAIL PROTECTED]@\mathcollection
   [EMAIL PROTECTED]@\nomathcollection#1\endcsname
 \strippedcsname\mathematics
[EMAIL PROTECTED]@\nomathcollection
   \else
 \nocharacterencoding
   \fi\fi\fi\fi\fi
 \fi
   #1\endcsname}

\let\dohandlecommand\dohandlemathtoken

\def\checkoutermathencoding
  {\ifx\outerencoding\empty
 \ifx\outerencoding\s!default\else
   \edef\outerencoding{\currentencoding}%
 \fi
   \fi}

\startmathcollection[texnansi]
\definemathsymbol [breve] [accent] [tf] [15]
\stopmathcollection
\startmathcollection[ec]
\definemathsymbol [breve] [accent] [tf] [08]
\stopmathcollection

\prependtoks
   \checkoutermathencoding
\to \everymathematics

\let\outerencoding\empty

$\breve e$

\end

so ... up to you to define the missing pieces (maybe we should use 
\startmathencoding for this stuff) 

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \bar missing in euler

2006-07-11 Thread Hans Hagen
Aditya Mahajan wrote:
 I do not know what is the equivalent of 'operators' family in context. 
 Any idea how to pull them out of the text fonts?
   
if this is only euler, we may use something 

euler:ec

otherwise we end up with all other math encodings being messed up 

Hans  

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \bar missing in euler

2006-07-11 Thread Adam Lindsay
Hans Hagen wrote:
 Aditya Mahajan wrote:
 I do not know what is the equivalent of 'operators' family in context. 
 Any idea how to pull them out of the text fonts?
   
 if this is only euler, we may use something 

I believe this is euler only. The other math fonts I have dug into have 
been complete.

 euler:ec

Makes sense. I'll look at the new definitions you just sent.

On the user side, what do you imagine it would look like:
\definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
   or
\definetypeface [e] [mm] [math] [euler] [euler] [encoding=euler:ec]
   or
\starttypescript [math,boldmath] [euler] [ec]   # with the first one
   \usemathcollection[euler:ec]
\stoptypescript

?

 otherwise we end up with all other math encodings being messed up 

Yes, and that's the last thing I'd want to happen because of euler support.
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED]
  Lancaster University, InfoLab21+44(0)1524/510.514
  Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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


Re: [NTG-context] \bar missing in euler

2006-07-11 Thread Hans Hagen
Adam Lindsay wrote:
 Makes sense. I'll look at the new definitions you just sent.

 On the user side, what do you imagine it would look like:
 \definetypeface [e] [mm] [math] [euler] [euler] [encoding=ec]
   
   
^^^ this one (actually it listens to the outer encoding)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \bar missing in euler

2006-07-06 Thread Adam Lindsay
Aditya Mahajan wrote:

 gives just a. I do not get any bar over a.

Yup. You seem to be the first to have noticed (or complained), as well.

 This is how eulervm.sty defines these characters for T1 encoding.
 ...

That's the key, though, it apparently pulls in the text accents as well, 
and changes the math definitions depending on the text encoding. That 
seems rather opposite to how ConTeXt *should* work.

 I do not know what is the equivalent of 'operators' family in context. 
 Any idea how to pull them out of the text fonts?

Let's open this up to Hans and Taco: any idea? Much of the finer points 
of \definemathsymbol et al are voodoo to me.

The fourth/sixth arguments of \definemathsymbol insist on a (hex) number 
to be in that slot. Anything else (like \textmacron) is a no-go.

So right now, Euler is limited by the math mechanisms/the encoding of 
the font. I can imagine two solutions of differing hack-ish natures:

1) Allow further expansion in \definemathsymbol:
  \definemathsymbol [breve] [accent] [tf] [\textbreve]

2) Do a hack following LaTeX's imperfect lead:
  \definemathsymbol [breve] [accent] [tf] [15] % for texnansi
   % or
  \definemathsymbol [breve] [accent] [tf] [08] % for ec
  etc.

Advice?
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED]
  Lancaster University, InfoLab21+44(0)1524/510.514
  Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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


Re: [NTG-context] \bar missing in euler

2006-07-06 Thread Aditya Mahajan
On Thu, 6 Jul 2006, Adam Lindsay wrote:

 Aditya Mahajan wrote:

 gives just a. I do not get any bar over a.

 Yup. You seem to be the first to have noticed (or complained), as well.

 This is how eulervm.sty defines these characters for T1 encoding.
 ...

 That's the key, though, it apparently pulls in the text accents as well,
 and changes the math definitions depending on the text encoding. That
 seems rather opposite to how ConTeXt *should* work.

 I do not know what is the equivalent of 'operators' family in context.
 Any idea how to pull them out of the text fonts?

 Let's open this up to Hans and Taco: any idea? Much of the finer points
 of \definemathsymbol et al are voodoo to me.

 The fourth/sixth arguments of \definemathsymbol insist on a (hex) number
 to be in that slot. Anything else (like \textmacron) is a no-go.

 So right now, Euler is limited by the math mechanisms/the encoding of
 the font. I can imagine two solutions of differing hack-ish natures:

 1) Allow further expansion in \definemathsymbol:
  \definemathsymbol [breve] [accent] [tf] [\textbreve]

 2) Do a hack following LaTeX's imperfect lead:
  \definemathsymbol [breve] [accent] [tf] [15] % for texnansi
   % or
  \definemathsymbol [breve] [accent] [tf] [08] % for ec
  etc.

I have no knowledge of how Context's font stuff works. The first 
definition looks better to me, as one would not need to worry about 
the encoding while defining symbols (one needs to worry about the 
encoding while defining \textbreve etc, anyway). Though the second 
does have the advantage that it works right away, so there is no need 
to change the definition of \definemathsymbol.

Right now I will use

\definemathsymbol [bar] [accent] [tf] [09]

which seems to work with my present setup.

Thank you.

Aditya

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