From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82625 Path: news.gmane.org!not-for-mail From: "Mikael P. Sundqvist" Newsgroups: gmane.comp.tex.context Subject: Re: partial derivatives with bonum/pagella font Date: Wed, 22 May 2013 19:00:25 +0200 Message-ID: References: <519C9774.2060209@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1136749236==" X-Trace: ger.gmane.org 1369242054 22493 80.91.229.3 (22 May 2013 17:00:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 17:00:54 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 22 19:00:55 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UfCPC-00064w-KZ for gctc-ntg-context-518@m.gmane.org; Wed, 22 May 2013 19:00:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EA436101E8; Wed, 22 May 2013 19:00:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9SKivSeE-kV2; Wed, 22 May 2013 19:00:44 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0E82F101E4; Wed, 22 May 2013 19:00:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A3C05101E4 for ; Wed, 22 May 2013 19:00:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id n-aYUcmdTQt9 for ; Wed, 22 May 2013 19:00:37 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 76B70101E0 for ; Wed, 22 May 2013 19:00:27 +0200 (CEST) Original-Received: from mail-qe0-f45.google.com (mail-qe0-f45.google.com [209.85.128.45]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r4MH0Qet013546 for ; Wed, 22 May 2013 19:00:26 +0200 Original-Received: by mail-qe0-f45.google.com with SMTP id q19so1277191qeb.32 for ; Wed, 22 May 2013 10:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=6Ukj16xUd4+WcMc3x+9Gp7Uw2z4mugxOHORSRAmHtIc=; b=yMuye5uffUZSCuinmBiiVe3l5Ah5XPUdC/RkxGXvSazN1x/5wGP2CJTzm8KxX+rdBM acWdg2j/S3d1O/fdk6a1DOSVlH/N/WFicq1vddbDcCrRc+12sH+MdUgtdUDM6xyhG5DC j01cCReT/yNbHJmTCcufIlrKFKJYlXFF/OJjZIUBx+21Ln7/hHqU6lzpJvLafjpC2qCt taKH9KF/pukLs30Kh5L8FhBA3S/ngKbd2li27vJ9Ayz2XiWZY+ustBN9/VUFEPitipfZ 16FVnw0taJdCG3HYYhc2iBk0fRYogyivyQRF2LajJJ5BZoifMsfpBVYBxAIKf2PW5MuX 89SQ== X-Received: by 10.229.162.16 with SMTP id t16mr2941764qcx.130.1369242025881; Wed, 22 May 2013 10:00:25 -0700 (PDT) Original-Received: by 10.49.51.168 with HTTP; Wed, 22 May 2013 10:00:25 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.128.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJD50qxI - 3f85f2eb9af7 - 20130522 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82625 Archived-At: --===============1136749236== Content-Type: multipart/alternative; boundary=f46d0447858f90779904dd518036 --f46d0447858f90779904dd518036 Content-Type: text/plain; charset=ISO-8859-1 Thank you very much Sietse! This fits my needs for the students for tomorrow... I also defined \def\sprime{\myprime{\prime}} \def\dprime{\myprime{\prime\kern-0.1em\prime}} Then $f\sprime_x$ and $f\dprime_{xx}$ is not too hard to write :) /Mikael On Wed, May 22, 2013 at 2:22 PM, Sietse Brouwer wrote: > Hi Mikael, > > > is there a quick fix/hack that somehow allows me to get it look "almost > like > > it should" in a small document today with bonum? > > This might get you somewhere. I hope you don't have too many double > primes in your document... > > NB: `%macros=mkvi` has to be the first line in the file. > > Cheers, > Sietse > > % macros=mkvi > > \setupbodyfont[bonum] > > % This macro takes 1 arguments, #upper. It postfixes a negative kern just a > % bit larger than the width of #upper, so that #upper does not push > % the next content away to the right. > \def\myprime#upper% > {% 1. Store the width of the primes in a box, so we can get its width > \setbox\scratchbox=\hbox{$#upper$}% > % 2. We'll want to kern back by a bit more than > \scratchdimen=\dimexpr \wd\scratchbox + 0.3em \relax% > % The actual typesetting > \kern 0em #upper\kern -\scratchdimen} > > \starttext > % Quick and dirty 1: just pretend the prime is uppercased > $f'_x$, $f_x'$ $f^{\prime\prime}_x$. > > % Less quick, still dirty: the \myprime macro defined above > $f'_x$, $f_x'$ $f\myprime{\prime\prime}_x$. > > % Slow and dirty: add a kern between the \primes, > % because bonum pushes them apart a bit. > $f'_x$, $f_x'$ $f\myprime{\prime\kern -0.1em \prime}_x$. > \stoptext > > ___________________________________________________________________________________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ > --f46d0447858f90779904dd518036 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you very much Sietse! This fits my needs for th= e students for tomorrow...

I also defined
\def\sprime{\myprime{\p= rime}}
\def\dprime{\myprime{\prime\kern-0.1em\prime}}

Then $f\sprime_x$ and $f\dprime_{xx}$ is not too hard to write :)

/Mikael


On Wed, May 22, 2013 at 2:22 PM, Sietse Brouwer <sbbr= ouwer@gmail.com> wrote:
Hi Mikael,

> is there a quick fix/hack that somehow allows me to get it look "= almost like
> it should" in a small document today with bonum?

This might get you somewhere. I hope you don't have too many doub= le
primes in your document...

NB: `%macros=3Dmkvi` has to be the first line in the file.

Cheers,
Sietse

% macros=3Dmkvi

\setupbodyfont[bonum]

% This macro takes 1 arguments, #upper. It postfixes a negative kern just a=
% bit larger than the width of #upper, so that #upper does not push
% the next content away to the right.
\def\myprime#upper%
=A0 =A0{% 1. Store the width of the primes in a box, so we can get its widt= h
=A0 =A0 \setbox\scratchbox=3D\hbox{$#upper$}%
=A0 =A0 % 2. We'll want to kern back by a bit more than
=A0 =A0 \scratchdimen=3D\dimexpr \wd\scratchbox + 0.3em \relax%
=A0 =A0 % The actual typesetting
=A0 =A0 \kern 0em #upper\kern -\scratchdimen}

\starttext
=A0 =A0 % Quick and dirty 1: just pretend the prime is uppercased
=A0 =A0 $f'_x$, $f_x'$ $f^{\prime\prime}_x$.

=A0 =A0 % Less quick, still dirty: the \myprime macro defined above
=A0 =A0 $f'_x$, $f_x'$ $f\myprime{\prime\prime}_x$.

=A0 =A0 % Slow and dirty: add a kern between the \primes,
=A0 =A0 % because bonum pushes them apart a bit.
=A0 =A0 $f'_x$, $f_x'$ $f\myprime{\prime\kern -0.1em \prime}_x$. \stoptext
___________________________________= ________________________________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 : http:= //contextgarden.net
___________________________________________________________________________= ________

--f46d0447858f90779904dd518036-- --===============1136749236== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1136749236==--