ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Where is error in my code?
Date: Wed, 28 Jan 2015 15:00:20 +0100	[thread overview]
Message-ID: <CALBOmsZSQXzEhnOiENuyv7bHOw0nF74HSTjrA-2N_hsK7+Numw@mail.gmail.com> (raw)
In-Reply-To: <CAMO4-9E3YLJ=b7+en4Ejy3DzKxXf5i1C95s_fumFOAcskcW6Kg@mail.gmail.com>

On Wed, Jan 28, 2015 at 5:49 AM, Van Dung Tang <nguyen969@gmail.com> wrote:
> I edit 1 file metafun with follow:
>
> \startMPenvironment
> \usetypescript[times][texnansi]
> \switchtobodyfont[times,10pt]
> \stopMPenvironment
> \startMPpage
> fill fullcircle scaled 2cm withcolor red;
> label(\sometxt{Cn},origin) withcolor white;
> \stopMPpage
>
> After run context and recieve 1 picture with a space very very long at
> left my picture.
>
> Please help me find my error!

If you use MkII (texexec document.tex), use the following:

\setupcolors[state=start]
\usetypescript[times][texnansi]
\switchtobodyfont[times,10pt]

\starttext
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{\color[white]{Cn}},origin);
\stopMPpage
\stoptext

There is no need to set the font inside the MP environment when using
\sometxt{} (those definitions are causing issues with whitespaces) and
you need to set the colour inside the text.


If you use MkIV (context document.text), you should use:

\switchtobodyfont[times,10pt]

\starttext
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{\color[white]{Cn}},origin);
\stopMPpage
\stoptext

but

label(\sometxt{Cn},origin) withcolor white;

works in MKIV as well.

I strongly suggest you to use MkIV.

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

  parent reply	other threads:[~2015-01-28 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28  4:49 Van Dung Tang
2015-01-28  9:37 ` Hans Hagen
2015-01-28 14:00 ` Mojca Miklavec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-01-28  4:45 Van Dung Tang
2015-01-28 11:25 ` Keith Schultz
2015-01-29 19:17   ` Aditya Mahajan

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=CALBOmsZSQXzEhnOiENuyv7bHOw0nF74HSTjrA-2N_hsK7+Numw@mail.gmail.com \
    --to=mojca.miklavec.lists@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).