ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug in math accents
@ 2004-09-21 16:27 Leif Albers
  2004-09-23  9:12 ` Taco Hoekwater
  2004-10-28 11:14 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Leif Albers @ 2004-09-21 16:27 UTC (permalink / raw)



Two years ago I already posted about following bug. I am
amazed it still occurs in the present (beta) version of
ConTeXt.

When I use math accents (like \tilde) on top of italic
characters in subscripts, they appear displaced.

A trivial example is

-------------------- SNIPP --------------------
\starttext
  $ E_{\tilde s} $
\stoptext
-------------------- SNIPP --------------------

Compare the output to the plain TeX output of
"$ E_{\tilde s} $ \end", and you will see the
difference - watch the position of the accent.

I really like the design of ConTeXt. But as long as this bug
occurs, ConTeXt is useless to me.

Dear developers: *please* send me a reply of some
sort. Writing bug reports is time consuming and should at
least be rewarded with a single line response. Even a
"RTFM - you idiot" is better than no reaction at all.

Thanks,

Leif Albers

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

* Re: Bug in math accents
  2004-09-21 16:27 Bug in math accents Leif Albers
@ 2004-09-23  9:12 ` Taco Hoekwater
  2004-10-28 11:14 ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2004-09-23  9:12 UTC (permalink / raw)



Hi Leif,

On Tue, 21 Sep 2004 18:27:33 +0200, Leif wrote:

I can see this is a bug, but  do not understand exactly how&why it appears.
\tilde expands into \mathaccent as in plain (that expansion is correct), and
the used font metrics files are the same as well. Therefore, it almost certainly 
has to be a \skewchar bug. However, the ConTeXt source looks fine to me,
so I am stuck.


-- 
groeten,

Taco

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

* Re: Bug in math accents
  2004-09-21 16:27 Bug in math accents Leif Albers
  2004-09-23  9:12 ` Taco Hoekwater
@ 2004-10-28 11:14 ` Hans Hagen
  2004-10-28 17:01   ` Taco Hoekwater
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2004-10-28 11:14 UTC (permalink / raw)


Leif Albers wrote:

> Two years ago I already posted about following bug. I am
> amazed it still occurs in the present (beta) version of
> ConTeXt.
> 
> When I use math accents (like \tilde) on top of italic
> characters in subscripts, they appear displaced.
> 
> A trivial example is
> 
> -------------------- SNIPP --------------------
> \starttext
>   $ E_{\tilde s} $
> \stoptext
> -------------------- SNIPP --------------------
> 
> Compare the output to the plain TeX output of
> "$ E_{\tilde s} $ \end", and you will see the
> difference - watch the position of the accent.


hm, it depends on the definition of \tilde; i must look into that

\starttext

$ E_{\tilde s} $

$ E_{\def\tilde{\mathaccent"707E }\tilde s} $

{\~s}

\stoptext

Maybe some italic correction is needed here; or a tilde from an italic 
font : question for Taco, btw, in contex, \tilde in this case expands to

\mathaccent "0\purefamilyhex {mr}7E

which is the plain definition, so i wonder what goes wrong there.

> I really like the design of ConTeXt. But as long as this bug
> occurs, ConTeXt is useless to me.
> 
> Dear developers: *please* send me a reply of some
> sort. Writing bug reports is time consuming and should at
> least be rewarded with a single line response. Even a
> "RTFM - you idiot" is better than no reaction at all.

(this mail ended up at the wrong date in my mailbox, so i only see it now)

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
-----------------------------------------------------------------

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

* Re: Bug in math accents
  2004-10-28 11:14 ` Hans Hagen
@ 2004-10-28 17:01   ` Taco Hoekwater
       [not found]     ` <418655A4.9060105@elvenkind.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2004-10-28 17:01 UTC (permalink / raw)


On Thu, 28 Oct 2004 13:14:46 +0200
Hans Hagen <pragma@wxs.nl> wrote:

> 
> Maybe some italic correction is needed here; or a tilde from an italic 
> font : question for Taco, btw, in contex, \tilde in this case expands to
> 
> \mathaccent "0\purefamilyhex {mr}7E
> 
> which is the plain definition, so i wonder what goes wrong there.

My initial feeling is that the relevant font parameters are perhaps wrong or 
even non-existant. (this would not show up in the expansion debug info, of 
course). I cannot investigate a.t.m., but if nobody else is able and willing,
I look into it next week.

Greetings, Taco

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

* Re: [dev-context] Re: Bug in math accents (analyzed)
       [not found]     ` <418655A4.9060105@elvenkind.com>
@ 2004-11-01 15:59       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2004-11-01 15:59 UTC (permalink / raw)
  Cc: dev-context, mailing list for ConTeXt users

Taco has found the reason why \mathaccents may get dislocated in slanted 
or italic fonts

> The problem is that your code does not set \skewchar for the \scriptfont
> and \scriptscriptfont of the relevant math families. You need to make sure
> you set all three of \textfont X, \scriptfont X and \scriptscriptfont X.
> 
> This requires some minor rewriting of a few macros in font-ini.tex.
> I could do that for you, but my coding style is not even remotely
> similar to yours so I wager you'd rather do it yourself. ;-)
> 

font-ini needs the following patch

\appendtoks
\dosetmathfamily\mrfam\textface\scriptface\scriptscriptface\c!mr\mrfallback
   \dosetmathfamily\mifam\textface\scriptface\scriptscriptface\c!mi\empty
   \dosetmathfamily\syfam\textface\scriptface\scriptscriptface\c!sy\empty
   \dosetmathfamily\exfam\textface\textface  \textface        \c!ex\empty
   \dosetmathfamily\mafam\textface\scriptface\scriptscriptface\c!ma\empty
   \dosetmathfamily\mbfam\textface\scriptface\scriptscriptface\c!mb\empty
   \dosetmathfamily\mcfam\textface\scriptface\scriptscriptface\c!mc\empty
   \dosetmathfamily\nnfam\textface\scriptface\scriptscriptface\c!nn\empty
\to \mathstrategies

\appendtoks
   \dosetskewchar\mifam\defaultskewcharmi % implemented later on
   \dosetskewchar\syfam\defaultskewcharsy % implemented later on
\to \mathstrategies

\def\dosetskewchar#1#2%
   {\ifx\@@fontskewchar\empty
      \skewchar\textfont        #1#2%
      \skewchar\scriptfont      #1#2%
      \skewchar\scriptscriptfont#1#2%
    \else
      \skewchar\textfont        #1\@@fontskewchar
      \skewchar\scriptfont      #1\@@fontskewchar
      \skewchar\scriptscriptfont#1\@@fontskewchar
    \fi}

i'll patch the distribution

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
-----------------------------------------------------------------

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

end of thread, other threads:[~2004-11-01 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-21 16:27 Bug in math accents Leif Albers
2004-09-23  9:12 ` Taco Hoekwater
2004-10-28 11:14 ` Hans Hagen
2004-10-28 17:01   ` Taco Hoekwater
     [not found]     ` <418655A4.9060105@elvenkind.com>
2004-11-01 15:59       ` [dev-context] Re: Bug in math accents (analyzed) Hans Hagen

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).