On Mon, Jun 5, 2017 at 11:00 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 6/4/2017 11:06 PM, Otared Kavian wrote:
>>
>> Hi Mikael,
>>
>> Indeed your observation is correct, but using \over instead of \frac
>> yields the correct behavior. Please try the following sample:
>>
>> %%% begin derivatives-prime-4.tex
>> \setupbodyfont[lucidaot]
>>
>> \starttext
>>
>> Compare the position of the prime sign in $f'/g$ in these two expressions:
>> the first one using \type{{... \over ...}}
>> \startformula
>> \left({f \over g}\right)' = {f' \over g} - {f \over g^2}g'
>> \stopformula
>> (which yields a correct position of the prime for $f'$ in $f'/g$), and the
>> second using \type{\frac{...}{...}}
>> \startformula
>> \left(\frac{f}{g} \right)' = \frac{f'}{g} - \frac{f}{g^2} g'
>> \stopformula
>> which yields a prime sign for $f'$ a little bit lower.
>>
>> \stoptext
>> %%% end derivatives-prime-4.tex
>
> The problem with primes is that it's a real mess, conceptually as well as in
> fonts.
>
> - we need to deal with not only one prime but also with double, tripple and
> quadruple ones and they need to become proper unicode symbols too
>
> - fonts have one, two or three sizes, often inconsistent and with funny
> dimensions, onlyt the text size can be trusted
>
> - we cannot use prime as nuclues as it can be combined with a subscript
>
> - but it isn't designed as a script symbol and is already raised (somewhat)
>
> - so we have to deal with a good old tex / fonts / plain inheritance,
> unicode but also want to avoid active character and parsing mess etc.
>
> I tried several approaches and it's hard to come up with a general solution
> that suits all fonts.
>
> Now, the bad is that when we use a superscript with a smashed virtual
> characters we end up in script choice mess with primes being one step too
> small.
>
> So, I decided to follow a different route and extend luatex with a sizeless
> super/subscript feature so that we can handle such weird cases (there might
> be more).
>
> This also means that the primes get larger. I only use the text size prime
> and scale that down for the other sizes i.e. no stty for primes as they are
> such a mess) but we can live with that.
>
> The good news is that it gets better but the bad news is that you have to
> wait till we release luatex 1.0.5 (planned for the ctx meeting but we might
> do an intermediate garden release anyway).
>
> btw, with \frac you get cramped styles and these have different positioning.
> Such is life.
>
> Hans
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

Again, thanks.

In 2017.06.06 13:22 something is still not correct.

The input file

\startTEXpage[offset=3pt]
$f'(x)\hat{f}'(x)$
\stopTEXpage

gives the attached output. The prime of f'(x) looks wrong, the one of
\hat{f}'(x) looks correct.

/Mikael

Attachment: ctx-listexample31.pdf
Description: Adobe PDF document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to