ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Andreas Harder <aharder@uni-koblenz.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Context and metapost: using \frac
Date: Tue, 26 Apr 2011 16:33:28 +0200	[thread overview]
Message-ID: <20D329EF-9BF9-4660-A709-DC69B4C9E42E@uni-koblenz.de> (raw)
In-Reply-To: <4DB6AE53.8020603@gmail.com>


Am 26.04.2011 um 13:36 schrieb Matthieu Stigler:

> 
> Le 26/04/2011 12:36, Hans Hagen a écrit :
>> On 26-4-2011 12:02, Matthieu Stigler wrote:
>>> Dear Hans
>>> 
>>> Thanks for your quick answer! I was however not able to produce the
>>> graph with the textext code... Should I actually then use another
>>> compiler? I tried with context and texexec (I thought texexec is the
>>> compiler for mkiv, right? I'm on linux ubuntu).
>> 
>> no, use the 'context' command as texexec is for mkii
>> 
> ok, so I was using the right compiler.... I get a mystake while trying to compile a file with the code you sent... you didn't? Would you be so nice and send complete file, so I can check what is wrong?
> 
> 
>>> I saw also that, as you mention, context has a \frac:
>>> http://wiki.contextgarden.net/Math_with_newmat
>> 
>> indeed, \frac is already there for a long time (ams compatible command)
> 
>> btw, in mkiv there is no m-newmath
>> 
>>> I tried then to simply add \usemodule[newmat] and compile with context,
>>> but did not work... Code below, error message below below...
>>> ! Math error: parameter \Umathfraction_del_size\displaystyle is not set.
>>> l.3 ...t{411}{$\displaystyle \frac {\sigma _t}{a}$
>>> }
>>> <inserted text> ...ore.mp ; fi ; ;;;]===], false)}
>> 
>> make sure that a font is loaded that has math before \starttext is seen
>> 
>> (try with \setupbodyfont[palatino] at the top of your file)
>> 
> this does not work neither.... I still get error message with this code:
> 
> \usemodule[newmat]
> 
> \setupbodyfont[palatino]
> 
> \starttext
> 
> \startMPpage
> 
> label.top(textext("$ \frac{\sigma_t}{a}$") scaled 1.00, (1, 1));
> 
> %label.top(btex $ \frac{\sigma_t}{a}$ etex, (0, 10));
> 
> %label.top(textext( $\displaystyle \frac{\sigma_t}{a}$ ) scaled   1.00, (1, 1));
> 
> \stopMPpage
> 
> \stoptext

Hi,

this works for me.

\setupbodyfont[palatino]

\startMPpage[offset=1ex]
  u := cm ;
  label.top(textext("$ \frac{\sigma_t}{a}$") scaled 2,  origin);
  label.top(textext("$ \frac{\sigma_t}{a}$"),           (u,u));
  label.top(textext("$\dfrac{\sigma_t}{a}$") scaled .5, (u,0));
\stopMPpage

Greeting
	Andreas
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2011-04-26 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25 18:33 mat
2011-04-26  8:37 ` Hans Hagen
2011-04-26 10:02   ` Matthieu Stigler
2011-04-26 10:36     ` Hans Hagen
2011-04-26 11:36       ` Matthieu Stigler
2011-04-26 14:33         ` Andreas Harder [this message]
2011-04-26 15:17           ` Matthieu Stigler
2011-04-26 15:44             ` 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=20D329EF-9BF9-4660-A709-DC69B4C9E42E@uni-koblenz.de \
    --to=aharder@uni-koblenz.de \
    --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).