ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* About graphictext macro (Metafun)
@ 2015-08-26 17:12 Fabrice Couvreur
  2015-08-27  7:39 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Couvreur @ 2015-08-26 17:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 517 bytes --]

 Hi,
I try to understand how this macro by testing a simple example. Why pdf file
is empty ?
This question follows my question Cover page (Metafun)
http://www.ntg.nl/pipermail/ntg-context/2015/083078.html
Thank you.

\setuppagenumbering[location=]

\setupcolors
  [state=start]

\setMPtext{text}{MATHEMATIQUES}


\starttext
\startuseMPgraphic{test}
picture pic ;
pic := image(graphictext \MPstring{text}
withdrawcolor red
withpen pencircle scaled 1pt ; ) ;
addto currentpicture also pic ;
\stopuseMPgraphic
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1134 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] 4+ messages in thread

* Re: About graphictext macro (Metafun)
  2015-08-26 17:12 About graphictext macro (Metafun) Fabrice Couvreur
@ 2015-08-27  7:39 ` Hans Hagen
  2015-08-27  8:23   ` Fabrice Couvreur
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2015-08-27  7:39 UTC (permalink / raw)
  To: ntg-context

On 8/26/2015 7:12 PM, Fabrice Couvreur wrote:
> Hi,
> I try to understand how this macro by testing a simple example. Why pdf
> file is empty?
> This question follows my question Cover page (Metafun)
> http://www.ntg.nl/pipermail/ntg-context/2015/083078.html
> Thank you.
>
> \setuppagenumbering[location=]
>
> \setupcolors
>    [state=start]
>
> \setMPtext{text}{MATHEMATIQUES}
>
>
> \starttext
> \startuseMPgraphic{test}
> picture pic ;
> pic := image(graphictext \MPstring{text}
> withdrawcolor red
> withpen pencircle scaled 1pt ; ) ;
> addto currentpicture also pic ;
> \stopuseMPgraphic
> \stoptext

Do you have pstoedit installed?

Anyway, there is a new mechanism that doesn't depend on additional 
programs:

% outlinetext   (text) transformations ;
% outlinetext.d (text) (draw options) transformations ;
% outlinetext.f (text) (fill options) transformations ;
% outlinetext.b (text) (draw options) (fill options) transformations ;
% outlinetext.r (text) (fill options) (draw options) transformations ;

\starttext

\startMPdefinitions
     let graphictext = new_graphictext ;
\stopMPdefinitions

\startMPpage

     draw outlinetext.b
         ("\framed[align=normal]{\input{tufte}}")
         (withcolor .5white)
         (withcolor red withpen pencircle scaled 1/10)
         xsized 10cm ;

\stopMPpage

\startMPpage

     draw outlinetext.r
         ("\framed[align=normal]{\input{tufte}}")
         (withcolor red withpen pencircle scaled 1/10)
         (withcolor .5white)
         xsized 10cm ;

\stopMPpage

\startMPpage

     draw outlinetext.d
         ("\framed[align=normal]{\input{tufte}}")
         (withcolor .5white)
         xsized 10cm ;

\stopMPpage

\startMPpage

     picture p ; p := outlinetext.p("PX") ;

     for i within p :
         draw i withcolor red withpen pencircle scaled 1/10 ;
     endfor ;

\stopMPpage

\stoptext



-----------------------------------------------------------------
                                           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] 4+ messages in thread

* Re: About graphictext macro (Metafun)
  2015-08-27  7:39 ` Hans Hagen
@ 2015-08-27  8:23   ` Fabrice Couvreur
  2015-08-27 22:09     ` Fabrice Couvreur
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Couvreur @ 2015-08-27  8:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3205 bytes --]

Hi Hans,

Do you have pstoedit installed ?


root@debian:/home/fab# apt-cache search pstoedit
libpstoedit0c2a - PostScript to editable vector graphics library (runtime
files)
root@debian:/home/fab#

I compile the file test.tex  with  context test.tex
Fabrice

2015-08-27 9:39 GMT+02:00 Hans Hagen <pragma@wxs.nl>:

> On 8/26/2015 7:12 PM, Fabrice Couvreur wrote:
>
>> Hi,
>> I try to understand how this macro by testing a simple example. Why pdf
>> file is empty?
>> This question follows my question Cover page (Metafun)
>> http://www.ntg.nl/pipermail/ntg-context/2015/083078.html
>> Thank you.
>>
>> \setuppagenumbering[location=]
>>
>> \setupcolors
>>    [state=start]
>>
>> \setMPtext{text}{MATHEMATIQUES}
>>
>>
>> \starttext
>> \startuseMPgraphic{test}
>> picture pic ;
>> pic := image(graphictext \MPstring{text}
>> withdrawcolor red
>> withpen pencircle scaled 1pt ; ) ;
>> addto currentpicture also pic ;
>> \stopuseMPgraphic
>> \stoptext
>>
>
> Do you have pstoedit installed?
>
> Anyway, there is a new mechanism that doesn't depend on additional
> programs:
>
> % outlinetext   (text) transformations ;
> % outlinetext.d (text) (draw options) transformations ;
> % outlinetext.f (text) (fill options) transformations ;
> % outlinetext.b (text) (draw options) (fill options) transformations ;
> % outlinetext.r (text) (fill options) (draw options) transformations ;
>
> \starttext
>
> \startMPdefinitions
>     let graphictext = new_graphictext ;
> \stopMPdefinitions
>
> \startMPpage
>
>     draw outlinetext.b
>         ("\framed[align=normal]{\input{tufte}}")
>         (withcolor .5white)
>         (withcolor red withpen pencircle scaled 1/10)
>         xsized 10cm ;
>
> \stopMPpage
>
> \startMPpage
>
>     draw outlinetext.r
>         ("\framed[align=normal]{\input{tufte}}")
>         (withcolor red withpen pencircle scaled 1/10)
>         (withcolor .5white)
>         xsized 10cm ;
>
> \stopMPpage
>
> \startMPpage
>
>     draw outlinetext.d
>         ("\framed[align=normal]{\input{tufte}}")
>         (withcolor .5white)
>         xsized 10cm ;
>
> \stopMPpage
>
> \startMPpage
>
>     picture p ; p := outlinetext.p("PX") ;
>
>     for i within p :
>         draw i withcolor red withpen pencircle scaled 1/10 ;
>     endfor ;
>
> \stopMPpage
>
> \stoptext
>
>
>
> -----------------------------------------------------------------
>                                           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
>
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 5091 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] 4+ messages in thread

* Re: About graphictext macro (Metafun)
  2015-08-27  8:23   ` Fabrice Couvreur
@ 2015-08-27 22:09     ` Fabrice Couvreur
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Couvreur @ 2015-08-27 22:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 4547 bytes --]

Hi Hans,
I installed pstoedit :

root@debian:/home/fab# dpkg --status pstoedit
Package: pstoedit
Status: install ok installed
Priority: optional
Section: graphics
Installed-Size: 662
Maintainer: Roland Stigge <stigge@antcom.de>
Architecture: amd64
Source: pstoedit (3.62-2)
Version: 3.62-2+b3
Depends: libc6 (>= 2.2.5), libpstoedit0c2a, libstdc++6 (>= 4.1.1),
ghostscript
Suggests: xfig | ivtools-bin | tgif | transfig
Description: PostScript and PDF files to editable vector graphics converter
 pstoedit converts Postscript and PDF files to various editable
 vector graphic formats including tgif, xfig, PDF graphics, gnuplot format,
 idraw, MetaPost, GNU Metafile, PIC, Kontour and flattened PostScript.
Homepage: http://www.pstoedit.net/
root@debian:/home/fab#

I compiled the file as this : "context test.tex" but it is still empty.
Thanks,
Fabrice


\setuppagenumbering[location=]

\setupcolors
  [state=start]

\setMPtext{text}{MATH\'{E}MATIQUES}


\starttext
\startuseMPgraphic{test}
picture pic ;
pic := image(graphictext \MPstring{text}
withdrawcolor red
withpen pencircle scaled 1pt ; ) ;
\stopuseMPgraphic
\stoptext



2015-08-27 10:23 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> Hi Hans,
>
> Do you have pstoedit installed ?
>
>
> root@debian:/home/fab# apt-cache search pstoedit
> libpstoedit0c2a - PostScript to editable vector graphics library (runtime
> files)
> root@debian:/home/fab#
>
> I compile the file test.tex  with  context test.tex
> Fabrice
>
> 2015-08-27 9:39 GMT+02:00 Hans Hagen <pragma@wxs.nl>:
>
>> On 8/26/2015 7:12 PM, Fabrice Couvreur wrote:
>>
>>> Hi,
>>> I try to understand how this macro by testing a simple example. Why pdf
>>> file is empty?
>>> This question follows my question Cover page (Metafun)
>>> http://www.ntg.nl/pipermail/ntg-context/2015/083078.html
>>> Thank you.
>>>
>>> \setuppagenumbering[location=]
>>>
>>> \setupcolors
>>>    [state=start]
>>>
>>> \setMPtext{text}{MATHEMATIQUES}
>>>
>>>
>>> \starttext
>>> \startuseMPgraphic{test}
>>> picture pic ;
>>> pic := image(graphictext \MPstring{text}
>>> withdrawcolor red
>>> withpen pencircle scaled 1pt ; ) ;
>>> addto currentpicture also pic ;
>>> \stopuseMPgraphic
>>> \stoptext
>>>
>>
>> Do you have pstoedit installed?
>>
>> Anyway, there is a new mechanism that doesn't depend on additional
>> programs:
>>
>> % outlinetext   (text) transformations ;
>> % outlinetext.d (text) (draw options) transformations ;
>> % outlinetext.f (text) (fill options) transformations ;
>> % outlinetext.b (text) (draw options) (fill options) transformations ;
>> % outlinetext.r (text) (fill options) (draw options) transformations ;
>>
>> \starttext
>>
>> \startMPdefinitions
>>     let graphictext = new_graphictext ;
>> \stopMPdefinitions
>>
>> \startMPpage
>>
>>     draw outlinetext.b
>>         ("\framed[align=normal]{\input{tufte}}")
>>         (withcolor .5white)
>>         (withcolor red withpen pencircle scaled 1/10)
>>         xsized 10cm ;
>>
>> \stopMPpage
>>
>> \startMPpage
>>
>>     draw outlinetext.r
>>         ("\framed[align=normal]{\input{tufte}}")
>>         (withcolor red withpen pencircle scaled 1/10)
>>         (withcolor .5white)
>>         xsized 10cm ;
>>
>> \stopMPpage
>>
>> \startMPpage
>>
>>     draw outlinetext.d
>>         ("\framed[align=normal]{\input{tufte}}")
>>         (withcolor .5white)
>>         xsized 10cm ;
>>
>> \stopMPpage
>>
>> \startMPpage
>>
>>     picture p ; p := outlinetext.p("PX") ;
>>
>>     for i within p :
>>         draw i withcolor red withpen pencircle scaled 1/10 ;
>>     endfor ;
>>
>> \stopMPpage
>>
>> \stoptext
>>
>>
>>
>> -----------------------------------------------------------------
>>                                           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
>>
>> ___________________________________________________________________________________
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 7222 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] 4+ messages in thread

end of thread, other threads:[~2015-08-27 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-26 17:12 About graphictext macro (Metafun) Fabrice Couvreur
2015-08-27  7:39 ` Hans Hagen
2015-08-27  8:23   ` Fabrice Couvreur
2015-08-27 22:09     ` Fabrice Couvreur

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).