* Where is error in my code?
@ 2015-01-28 4:45 Van Dung Tang
2015-01-28 11:25 ` Keith Schultz
0 siblings, 1 reply; 6+ messages in thread
From: Van Dung Tang @ 2015-01-28 4:45 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
I edit 1 file metafun follow:
\startMPenvironment
\usetypescript[times][texnansi]
\switchtobodyfont[times,10pt]
\stopMPenvironment
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn},origin) withcolor white;
\stopMPpage
[-- Attachment #2: Ngu-Hanh.pdf --]
[-- Type: application/pdf, Size: 5014 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Where is error in my code?
2015-01-28 4:45 Where is error in my code? Van Dung Tang
@ 2015-01-28 11:25 ` Keith Schultz
2015-01-29 19:17 ` Aditya Mahajan
0 siblings, 1 reply; 6+ messages in thread
From: Keith Schultz @ 2015-01-28 11:25 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1265 bytes --]
Hi,
From the looks of it you are using legacy code!
For one ConTeXt uses UTF you no need texansi encoding.
In Mkiv all you need is
\startext
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn},origin) withcolor white;
\stopMPpage
\stoptext
If you want to set font use \definefontfamily and \setbodyfont commands.
regards
Keith.
Am 28.01.2015 um 05:45 schrieb Van Dung Tang <nguyen969@gmail.com>:
>
> I edit 1 file metafun follow:
>
> \startMPenvironment
> \usetypescript[times][texnansi]
> \switchtobodyfont[times,10pt]
> \stopMPenvironment
> \startMPpage
> fill fullcircle scaled 2cm withcolor red;
> label(\sometxt{Cn},origin) withcolor white;
> \stopMPpage
> <Ngu-Hanh.pdf>___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 3638 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Where is error in my code?
@ 2015-01-28 4:49 Van Dung Tang
2015-01-28 9:37 ` Hans Hagen
2015-01-28 14:00 ` Mojca Miklavec
0 siblings, 2 replies; 6+ messages in thread
From: Van Dung Tang @ 2015-01-28 4:49 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
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!
Thanks
[-- Attachment #2: Ngu-Hanh.pdf --]
[-- Type: application/pdf, Size: 5014 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Where is error in my code?
2015-01-28 4:49 Van Dung Tang
@ 2015-01-28 9:37 ` Hans Hagen
2015-01-28 14:00 ` Mojca Miklavec
1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2015-01-28 9:37 UTC (permalink / raw)
To: ntg-context
On 1/28/2015 5:49 AM, Van Dung Tang 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.
if you use mkiv you can do just:
\switchtobodyfont[times,10pt]
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn},origin) withcolor white;
\stopMPpage
if you use mkii, you have to load the fonts first
\startMPenvironment[global]
because loading can involve all kind of actions that introduce spaces
Hans
> Please help me find my error!
> Thanks
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Where is error in my code?
2015-01-28 4:49 Van Dung Tang
2015-01-28 9:37 ` Hans Hagen
@ 2015-01-28 14:00 ` Mojca Miklavec
1 sibling, 0 replies; 6+ messages in thread
From: Mojca Miklavec @ 2015-01-28 14:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-29 19:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 4:45 Where is error in my code? Van Dung Tang
2015-01-28 11:25 ` Keith Schultz
2015-01-29 19:17 ` Aditya Mahajan
2015-01-28 4:49 Van Dung Tang
2015-01-28 9:37 ` Hans Hagen
2015-01-28 14:00 ` Mojca Miklavec
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).