From: "Mikael P. Sundqvist" <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Position of prime for derivatives
Date: Wed, 7 Jun 2017 21:57:19 +0200 [thread overview]
Message-ID: <CAHy-LL9DDMzO+PaF-z9syWAtLZ_Vd+n2qKTShQ5qPo3Fqo2ddg@mail.gmail.com> (raw)
In-Reply-To: <49473519-17f5-9dff-5272-682e4f199cfb@wxs.nl>
[-- Attachment #1: Type: text/plain, Size: 3608 bytes --]
On Mon, Jun 5, 2017 at 11:00 PM, Hans Hagen <pragma@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 #2: ctx-listexample31.pdf --]
[-- Type: application/pdf, Size: 6455 bytes --]
[-- Attachment #3: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2017-06-07 19:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 6:35 Otared Kavian
2017-05-17 15:17 ` Hans Hagen
2017-05-18 7:12 ` Otared Kavian
2017-05-18 7:50 ` Mikael P. Sundqvist
2017-05-20 13:33 ` Mikael P. Sundqvist
2017-05-20 17:32 ` Mikael P. Sundqvist
2017-05-21 6:14 ` Mikael P. Sundqvist
2017-05-21 20:29 ` Otared Kavian
2017-05-22 6:51 ` Mikael P. Sundqvist
2017-05-22 7:50 ` Otared Kavian
2017-05-23 9:58 ` Mathias Schickel
2017-05-23 15:02 ` Mikael P. Sundqvist
2017-05-25 16:59 ` Mikael P. Sundqvist
2017-05-25 18:05 ` Mathias Schickel
2017-06-04 17:42 ` Mikael P. Sundqvist
2017-06-04 21:06 ` Otared Kavian
2017-06-05 21:00 ` Hans Hagen
2017-06-07 19:57 ` Mikael P. Sundqvist [this message]
2017-06-07 20:01 ` Mikael P. Sundqvist
2017-06-07 21:03 ` Hans Hagen
2017-06-08 7:52 ` Mikael P. Sundqvist
2017-06-08 8:17 ` luigi scarso
2017-06-08 8:28 ` Mikael P. Sundqvist
2017-06-08 8:39 ` Mikael P. Sundqvist
2017-06-08 8:42 ` luigi scarso
2017-06-08 11:14 ` Mikael P. Sundqvist
2017-06-08 14:29 ` Aditya Mahajan
2017-06-08 17:21 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHy-LL9DDMzO+PaF-z9syWAtLZ_Vd+n2qKTShQ5qPo3Fqo2ddg@mail.gmail.com \
--to=mickep@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).