Re: [NTG-context] Where is error in my code?
On Wed, 28 Jan 2015, Keith Schultz wrote: label(\sometxt{Cn},origin) withcolor white; Note that in MkIV, this can be shortened to label("Cn", origin) withcolor white; No need to wrap the strings around \sometxt{...} or btex ... etex. Aditya ___ 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 ___
Re: [NTG-context] Where is error in my code?
On Wed, Jan 28, 2015 at 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. > > 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 ___
Re: [NTG-context] Where is error in my code?
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 : > > 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 > ___ > 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 > ___ ___ 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 ___
Re: [NTG-context] Where is error in my code?
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 ___
[NTG-context] Where is error in my code?
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 Ngu-Hanh.pdf Description: Adobe PDF document ___ 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 ___
[NTG-context] Where is error in my code?
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 Description: Adobe PDF document ___ 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 ___