Re: [NTG-context] Laundry symbols (now: altered picture)

2022-01-02 Thread Alfredo Catalina via ntg-context
Great! Thanks Hans, now it works. I replaced the "draw externalfigure"
commands by

draw externalfigure "./skysprite.png" xsized 4u ysized 5u shifted (0u,-0u);
draw externalfigure "./sandsprite.png" xsized 4u ysized 5u shifted (0u,-5u);

Best regards

On Sun, Jan 2, 2022 at 3:36 PM Hans Hagen  wrote:

> On 1/2/2022 3:12 PM, Alfredo Catalina via ntg-context wrote:
> > I'm trying to use ConTeXt with Metafun to produce a map of a videogame I
> > am working on. In fact I did it 9 years ago but it seems that now it
> > doesn't work.
> >
> > I have two 32 pixels wide by 40 pixels high sprites. They are saved in
> > the skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5
> > x 8, the width/height ratio is 4/5.
> >
> > This should produce a page with a sky sprite and a sand sprite, one
> > below the other. It worked in the past. Each sprite should be 4 x 0.095
> > cm = 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:
> >
> > \starttext
> > \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
> > \startuseMPgraphic{mapa}
> > u:=.095cm;
> > draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted
> > (0u,-0u);
> > draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted
> > (0u,-5u);
> > \stopuseMPgraphic
> > \useMPgraphic{mapa}
> > \stoptext
> >
> > But instead I got two huge sprites of 2.8 cm x 4.4 cm.
> >
> > Am I forgetting something?
> Originally that worked because the image was always 'included' at 1 bp
> and then scaled but that was (1) inaccurate and (2) a bit depending on
> the image and (3) could overflow metapost.
>
> Use xsized and ysized instead (absolute measures instead of scaling the
> unknown)
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Laundry symbols (now: altered picture)

2022-01-02 Thread Alfredo Catalina via ntg-context
I'm trying to use ConTeXt with Metafun to produce a map of a videogame I
am working on. In fact I did it 9 years ago but it seems that now it
doesn't work.

I have two 32 pixels wide by 40 pixels high sprites. They are saved in the
skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5 x 8,
the width/height ratio is 4/5.

This should produce a page with a sky sprite and a sand sprite, one
below the other. It worked in the past. Each sprite should be 4 x 0.095 cm
= 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:

\starttext
\setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
\startuseMPgraphic{mapa}
u:=.095cm;
draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted
(0u,-0u);
draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted
(0u,-5u);
\stopuseMPgraphic
\useMPgraphic{mapa}
\stoptext

But instead I got two huge sprites of 2.8 cm x 4.4 cm.

Am I forgetting something?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-11 Thread Alfredo Catalina
I've run

first-setup.bat --modules=all

and now it works. Thanks Wolfgang and 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
___

[NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
How can I setup a font -name, size, etc- inside a startuseMPgraphic
environment?

\startuseMPgraphic{map}

\stopuseMPgraphic
___
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] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
I'm sorry but I don't know how to use them. I've tried

\setupMPinstance [metafun] [textcolor=red]

and got an undefined control sequence error.

I've also tried

\startMPenvironment [global]
\usetypescript[palatino][ec]
\switchtobodyfont[palatino,7pt]
\stopMPenvironment

and it changed the font size but the font type is not palatino.

thanks
On Sun, Jun 10, 2012 at 5:25 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 10.06.2012 um 16:25 schrieb Alfredo Catalina:

  How can I setup a font -name, size, etc- inside a startuseMPgraphic
 environment?
 
  \startuseMPgraphic{map}
 
  \stopuseMPgraphic

 - http://wiki.contextgarden.net/Command/defineMPinstance
 - http://wiki.contextgarden.net/Command/setupMPinstance

 Wolfgang


 ___
 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] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina

 1. Do you use MkII or MkIV?

 2. Do you want Palatino only for the metapost labels or also for the main
 font in the document?




I am using MkIV. Whether it is possible I would like to use a different
font for the metapost labels.
___
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] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
 \setupbodyfont[pagella,11pt]

 %\setupMPinstance[metafun][textstyle=sans]
 \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}]

 \starttext

 \input knuth

 \startMPcode
 draw textext(I’m different!) ;
 \stopMPcode

 \stoptext




It gives an error:

! Undefined control sequence.
system   tex  error on line 1 in file GeneraMapa.tex: Undefined
control sequence ...
1   \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}]
2
3 \setuppagenumbering[location=]
4 \starttext
5 \input ./mapa.tex
6 \useMPgraphic{mapa}
7 \stoptext
8
l.1 \setupMPinstance
[metafun][textstyle={\switchtobodyfont[termes,14pt]}]
?
___
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] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
On Sun, Jun 10, 2012 at 7:14 PM, Aditya Mahajan adit...@umich.edu wrote


 You need to upgrade your ConTeXt installation.




I installed context two weeks ago. I've just run

mtxrun --selfupdate
mtxrun --generate
luatools --generate
context --make
and I've got the same error. Any ideas?
___
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] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
On Sun, Jun 10, 2012 at 9:29 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Do you use TeXLive or the ConTeXt Suite (installation from the context
 wiki)?



ConTeXt Suite
___
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] \externalfigure shows text alongside the picture

2012-06-08 Thread Alfredo Catalina
I am using \externalfigure to show a picture at the desired scale. Instead
of providing a number for the width parameter I have made a definition with
\def. When I run in mkiv this I get the text 4t alongside the picture.

\def\DesignSize#1{3.5cm/4*#1}%
\starttext
\externalfigure[hacker.jpg][width=\DesignSize{4}]
\stoptext

In mkii is perfect.

I've also tried

\define[1]\DesignSize{3.5cm/4*#1}

with the same result.
___
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] \externalfigure shows text alongside the picture

2012-06-08 Thread Alfredo Catalina
Great! Thanks Wolfgang!

On 8 Jun 2012 17:16, Wolfgang Schuster schuster.wolfg...@googlemail.com
wrote:


 Am 08.06.2012 um 17:10 schrieb Alfredo Catalina:

  I am using \externalfigure to show a picture at the desired scale.
Instead of providing a number for the width parameter I have made a
definition with \def. When I run in mkiv this I get the text 4t alongside
the picture.
 
  \def\DesignSize#1{3.5cm/4*#1}%
  \starttext
  \externalfigure[hacker.jpg][width=\DesignSize{4}]
  \stoptext
 
  In mkii is perfect.
 
  I've also tried
 
  \define[1]\DesignSize{3.5cm/4*#1}
 
  with the same result.

 \define[1]\DesignSize{\the\dimexpr3.5cm/4*#1\relax}

 Wolfgang


___
 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] Zapf Dingbats font

2012-06-04 Thread Alfredo Catalina
On Mon, Jun 4, 2012 at 10:01 AM, Hans Hagen pra...@wxs.nl wrote:


 in the distrubution from the contextgarden

 \definefont[zapfdingbats][**ZapfDingbats]

 should work as well

 Hans



mmm, does it mean that a ZapfDingbats.* font file is present in the
distribution??
___
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] Zapf Dingbats font

2012-06-03 Thread Alfredo Catalina
Ok, thanks Luigi.

This is how I sorted it out, hope it may help someone. It looks like I
should write a typescript and a symbol definition file, but I new to this
and don't know how to do it yet.

This is a workaround for the meantime:

- Download the free True Type font Zapf Dingbats BT from
http://www.ufonts.com/fonts/zapf-dingbats-bt.html
- You should have got the file ufonts.com_zapf-dingbats-bt-2.ttf or an EXE
file -an installer-
- In windows 7 it may be installed by clicking install -context menu,
right mouse click-
- Generate Context font database:

mtxrun --script fonts --reload

- Check it's been read:

mtxrun --script fonts --list --all --pattern=zapf*

- You should have several lines like zapfdingbatsbt
zapfdingbatsitcbybtregular
 c:/windows/fonts/ufonts.com_zapf-dingbats-bt-2.ttf
- Finally this is how I get the characters I need:

\definefont[zapfdingbats][ufonts.com_zapf-dingbats-bt-2.ttf at 10pt]

\starttext

Testing: {\zapfdingbats \char109}  %shadowed white circle

\stoptext
___
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] Process stops

2012-06-03 Thread Alfredo Catalina
I am trying to process a document I wrote in 2009 using mkii. I am
modifying it to work with mkiv.

When I run

context mydoc.tex

the process starts and after some time it stops and shows an asterisk (*)
waiting for a command. I then type in \end, and it resumes. Finally it
ouputs mydoc.pdf. There are still some things to fix (ie section numbers)
but in general the document is ok.

I can't see any error message although I got a lot of Overfull \hbox...
and Underfull \hbox... messages.

What can be the reason?
___
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] Process stops

2012-06-03 Thread Alfredo Catalina
On Sun, Jun 3, 2012 at 10:19 AM, luigi scarso
luigi.scarso@??? wrote:

 Something like a missed \stoptext , i.e.
 \starttext
 ..
 ..
 %\stoptext

 A good strategy is to move \stoptext from bottom to up next to
 \starttext until a correct compilation


You are right. There was a \stoptext  missing. 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
___

[NTG-context] Zapf Dingbats font

2012-06-01 Thread Alfredo Catalina
Can the Zapf Dingbats font be used in MKIV? I can't do it work

I have downloaded the
symb-uni-zapf.ziphttp://dl.contextgarden.net/websitesarchive/atl/tex/symb-uni-zapf.zip
file
from http://dl.contextgarden.net/websitesarchive/atl/tex/. Then I unpacked
it and copied the .tfm, .enc and .map files in texmf-context/fonts as well
as symb-uzd.tex in texmf-context/tex/context/third

I then run

mtxrun --script fonts --reload
and

context --generate

I tried

usetypescriptfile[symb-uzd.tex]
\usesymbols[uzd]

\symbol[Unicode Shadowed Shapes][LowerRightDrop-shadowedWhiteSquare]


but it doesn't work. Any ideas?
___
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] thelabel problem

2012-05-28 Thread Alfredo Catalina
I installed ConTeXt in 2009 in my laptop and wrote some documents. Now I
have installed ConTeXt in other computer and tried to process some of those
documents but it doesn't work.

It looks that there is something wrong with Metapost/Metafun. I have tried
a simple program like

\starttext

Testing

\startuseMPgraphic{gh}
draw thelabel.rt(the right way,a) withcolor .625red ;
\stopuseMPgraphic

\useMPgraphic{gh}

\stoptext

Then I get:

system   begin file kk2.tex at line 1
metapost initializing instance 'metafun' using format 'metafun'
metapost loading 'metafun.mp' (experimental metapost version two)
! terminal:  a
 (3,0)
! Not implemented: (unknown numeric)+(pair).
to be read again
   -
thelabel-...((EXPR4)+labeloffset*laboff(SUFFIX2)-

(labxf(SUFFIX2)*lrcorner.p...
*  draw thelabel.rt(the right way,a)
 withcolor .625red ; ;
.
system   tex  error on line 10 in file kk2.tex: terminal:  a
 (3,0)
! Not implemented: (unknown numeric)+(pair).
to be read again
   -
thelabel-...((EXPR4)+labeloffset*laboff(SUFFIX2)-

(labxf(SUFFIX2)*lrcorner.p...
*  draw thelabel.rt(the right way,a)
 withcolor .625red ; ;


Any ideas? Thank you.
___
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] thelabel problem

2012-05-28 Thread Alfredo Catalina
Sorry, that's right, it works. I forgot the definition. I have been trying
some things before.

In fact the problem is this:

\starttext

Testing

\startuseMPgraphic{gh}

textX:=87.51u;
textY:=96.31u;
pic:=thelabel.urt(btex {Test} etex scaled 1.00,(0,0));
draw pic shifted (textX, textY);

\stopuseMPgraphic

\useMPgraphic{gh}

\stoptext
And  I get:

! terminal:  pic
 picture
! Equation cannot be performed (numeric=picture).
to be read again
   ;
* ...rt(rawtextext({Test}) scaled 1.00,(0,0));
   draw pic shifted (textX,
...
 pic
 (0.90863textY,textY)
! Not implemented: (unknown numeric)shifted(unknown pair).
to be read again
   ;
* ...00,(0,0)); draw pic shifted (textX, textY);
   ;
 0.90863textY
! Undefined x coordinate has been replaced by 0.
to be read again
   withpen
draw-...:also(EXPR0)else:doublepath(EXPR0)withpen
  .currentpen.fi._op_
to be read again
   ;
* ...00,(0,0)); draw pic shifted (textX, textY);
   ;
 textY
! Undefined y coordinate has been replaced by 0.
to be read again
   withpen
draw-...:also(EXPR0)else:doublepath(EXPR0)withpen
  .currentpen.fi._op_
to be read again
   ;
* ...00,(0,0)); draw pic shifted (textX, textY);
   ;
.
system   tex  error on line 14 in file kk2.tex: terminal:  pic
 picture
! Equation cannot be performed (numeric=picture).
to be read again
   ;
* ...rt(rawtextext({Test}) scaled 1.00,(0,0));
   draw pic shifted (textX,
...
 pic
 (0.90863textY,textY)
! Not implemented: (unknown numeric)shifted(unknown pair).
to be read again
   ;
* ...00,(0,0)); draw pic shifted (textX, textY);
   ;
 0.90863textY
! Undefined x coordinate has been replaced by 0.
to be read again
   withpen
draw-...:also(EXPR0)else:doublepath(EXPR0)withpen
  .currentpen.fi._op_
to be read again
   ;
* ...00,(0,0)); draw pic shifted (textX, textY);
   ;
 textY
! Undefined y coordinate has been replaced by 0.
to be read again
   withpen
draw-...:also(EXPR0)else:doublepath(EXPR0)withpen
  .currentpen.fi._op_
to be read again
   ;
* ...00,(0,0)); draw pic shifted (textX, textY);
   ;
 ...
 4
 5 \startuseMPgraphic{gh}
 6
 7 textX:=87.51u;
 8 textY:=96.31u;
 9 pic:=thelabel.urt(btex {Test} etex scaled 1.00,(0,0));
10 draw pic shifted (textX, textY);
11
12 \stopuseMPgraphic
13
14   \useMPgraphic{gh}
15
16 \stoptext
17
inserted text ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic
\d...
\handleuseMPgraphic ...hics \processMPgraphic {#3}
  \endgroup
\douseMPgraphic ...{\@@MPG \currentMPgraphicname }
  \empty \endMPgraphicgroup
to be read again

l.14 \useMPgraphic{gh}
___
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] thelabel problem

2012-05-28 Thread Alfredo Catalina
Thank you. I check it, and you are right. I forgot to include the
definitions when I cut and paste that part of the code. I thought the
problem was related to the btex command, but it's not.

The first line is:

u=1.000mm; linecap:=butt; linejoin:=mitered; path pp; picture pic;
labeloffset:=0;

I compared it with your code. The numeric u; definition is missing in my
file. I have included it and now it works!!

It's really weird since I compiled it in 2009 and it worked as is. I still
have the pdf output file...??

Finally I have a problem in this line:

externalfigure aciddrops1.png xscaled 80.13u yscaled 60.09u shifted
(69.85u,20.30u) ;

Then I got:

 terminal:  picture
! Isolated expression.
to be read again
   ;
* ...3u yscaled 60.09u shifted (69.85u,20.30u) ;
   ;
.
system   tex  error on line 99 in file kk2.tex: terminal: 
picture
! Isolated expression.
to be read again
   ;
* ...3u yscaled 60.09u shifted (69.85u,20.30u) ;
   ;
 ...
 89 fill pp--cycle withcolor (0.000,0.000,0.000);
 90
pp:=(150.24u,73.96u)--(152.93u,72.91u)--(153.10u,74.30u)--(150.24u,73.96u);
 91 draw pp--cycle withpen pencircle scaled 0.30mm withcolor
(0.000,0.000,0.000);
 92
 93 setbounds currentpicture to
(67.85u,18.30u)--(197.56u,18.30u)--(197.56u,102.23u)--(67.85u,102.23u)--cycle;
 94
 95 externalfigure aciddrops1.png xscaled 80.13u yscaled 60.09u
shifted (69.85u,20.30u) ;
 96
 97 \stopuseMPgraphic
 98
 99   \useMPgraphic{gh}
100
101 \stoptext
102
inserted text ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic
\d...
\handleuseMPgraphic ...hics \processMPgraphic {#3}
  \endgroup
\douseMPgraphic ...{\@@MPG \currentMPgraphicname }
  \empty \endMPgraphicgroup
to be read again

l.99 \useMPgraphic{gh}
___
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] thelabel problem

2012-05-28 Thread Alfredo Catalina
I've tried to compile that code and I got:

! terminal:  picture
! Isolated expression.
to be read again
   ;
* ...3u yscaled 60.09u shifted (69.85u,20.30u) ;
   ;

.

system   tex  error on line 17 in file kk.tex: terminal: 
picture
! Isolated expression.
to be read again
   ;
* ...3u yscaled 60.09u shifted (69.85u,20.30u) ;
   ;

 ...

 7 numeric u;
 8 u:=1;
 9 textX:=87.51u;
10 textY:=96.31u;
11 pic:=thelabel.urt(btex {Test} etex scaled 1.00,(0,0));
12 draw pic shifted (textX, textY);
13 externalfigure mill.png xscaled 80.13u yscaled 60.09u shifted
14 (69.85u,20.30u) ;
15 \stopuseMPgraphic
16
17   \useMPgraphic{gh}
18
19 \stoptext
20
inserted text ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic
\d...
\handleuseMPgraphic ...hics \processMPgraphic {#3}
  \endgroup
\douseMPgraphic ...{\@@MPG \currentMPgraphicname }
  \empty \endMPgraphicgroup
to be read again

l.17 \useMPgraphic{gh}

-

I have no idea of what to do. Any ideas? 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
___

Re: [NTG-context] thelabel problem

2012-05-28 Thread Alfredo Catalina
I checked that I have

shell_escape = t
shell_escape.context  = t
shell_escape_commands.context = mtxrun,luatools,texmfstart,texexec,mpost

in C:\context\tex\texmf\web2c\texmf.cnf

Please find attached the file log (kk.log).

Thanks in advance.


kk.log
Description: Binary data
___
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] thelabel problem

2012-05-28 Thread Alfredo Catalina
Contents of the log file:

(kk.tex
ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2012.5.28  int: english/english
system   cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   kk.top loaded
system   options  begin of optionfile
system   options 
system   options  % runtime options files (command line driven)
system   options  \unprotect
system   options  % feedback and basic job control
system   options  % handy for special styles
system   options  \startluacode
system   options  document = document or { }
system   options  document.arguments={
system   options   [autopdf]=true,
system   options  }
system   options  document.files={
system   options   kk.tex,
system   options  }
system   options  \stopluacode
system   options  % process info
system   options  \setupsystem[inputfile=kk.tex]
system   options  \setupsystem[\c!n=1,\c!m=1]
system   options  % modes
system   options  % options (not that important)
system   options  \startsetups *runtime:options
system   options  \stopsetups
system   options  % styles and modules
system   options  \startsetups *runtime:modules
system   options  \stopsetups
system   options  % done
system   options  \protect \endinput
system   options 
system   options  end of optionfile
(kk.top)
fontslatin modern fonts are not preloaded
languageslanguage en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv){C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsvirtual math  unable to resolve name mapsfromchar
fontsfallback modern rm 12pt is loaded
system   begin file kk.tex at line 1
metapost initializing instance 'metafun' using format 'metafun'
metapost loading 'metafun.mp' (experimental metapost version two)
! terminal:  picture
! Isolated expression.
to be read again
   ;
* ...3u yscaled 60.09u shifted (69.85u,20.30u) ;
   ;
.
system   tex  error on line 17 in file kk.tex: terminal: 
picture
! Isolated expression.
to be read again
   ;
* ...3u yscaled 60.09u shifted (69.85u,20.30u) ;
   ;
 ...
 7 numeric u;
 8 u:=1;
 9 textX:=87.51u;
10 textY:=96.31u;
11 pic:=thelabel.urt(btex {Test} etex scaled 1.00,(0,0));
12 draw pic shifted (textX, textY);
13 externalfigure mill.png xscaled 80.13u yscaled 60.09u shifted
14 (69.85u,20.30u) ;
15 \stopuseMPgraphic
16
17   \useMPgraphic{gh}
18
19 \stoptext
20
inserted text ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic
\d...
\handleuseMPgraphic ...hics \processMPgraphic {#3}
  \endgroup
\douseMPgraphic ...{\@@MPG \currentMPgraphicname }
  \empty \endMPgraphicgroup
to be read again

l.17 \useMPgraphic{gh}

?
! Emergency stop.
system   tex  error on line 17 in file kk.tex: Emergency stop ...
 7 numeric u;
 8 u:=1;
 9 textX:=87.51u;
10 textY:=96.31u;
11 pic:=thelabel.urt(btex {Test} etex scaled 1.00,(0,0));
12 draw pic shifted (textX, textY);
13 externalfigure mill.png xscaled 80.13u yscaled 60.09u shifted
14 (69.85u,20.30u) ;
15 \stopuseMPgraphic
16
17   \useMPgraphic{gh}
18
19 \stoptext
20
inserted text ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic
\d...
\handleuseMPgraphic ...hics \processMPgraphic {#3}
  \endgroup
\douseMPgraphic ...{\@@MPG \currentMPgraphicname }
  \empty \endMPgraphicgroup
to be read again

l.17 \useMPgraphic{gh}

End of file on the terminal!
!  == Fatal error occurred, no output PDF file produced!


On Mon, May 28, 2012 at 8:50 PM, Alfredo Catalina 
alfredo.catal...@gmail.com wrote:

 I checked that I have

 shell_escape = t
 shell_escape.context  = t
 shell_escape_commands.context = mtxrun,luatools,texmfstart,texexec,mpost

 in C:\context\tex\texmf\web2c\texmf.cnf

 Please find attached the file log (kk.log).

 Thanks in advance

Re: [NTG-context] thelabel problem

2012-05-28 Thread Alfredo Catalina
This is what I get with mtxrun texexec kk.tex

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/W32TeX)
(format=cont-en 2012.5.28)  28 MAY 2012 21:18
entering extended mode
 \write18 enabled.
 (c:/context/tex/texmf-context/web2c/natural.tcx)
**kk.tex
(./kk.tex
ConTeXt  ver: 2012.05.26 16:40 MKII  fmt: 2012.5.28  int: english/english
system  : cont-new.mkii loaded
(c:/context/tex/texmf-context/tex/context/base/cont-new.mkii
FatalError  : Your format does not match the base files!
FormatVersion   : 2012.05.26 16:40 MKII
FilesVersion: 2011.05.18 18:04
 ) )
Here is how much of TeX's memory you used:
 47 strings out of 255946
 829 string characters out of 1273077
 2595900 words of memory out of 400
 41195 multiletter control sequences out of 15000+10
 7 words of font info for 0 fonts, out of 200 for 5000
 397 hyphenation exceptions out of 8191
 20i,0n,15p,81b,471s stack positions out of
1i,500n,1p,400b,5s
No pages of output.
___
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] thelabel problem

2012-05-28 Thread Alfredo Catalina
Yes!!! It works!!

Now I can use both commands and it works!

I very much appreciate your support.

Thanks Luigi!

On Mon, May 28, 2012 at 10:20 PM, luigi scarso luigi.sca...@gmail.comwrote:

 On Mon, May 28, 2012 at 9:20 PM, Alfredo Catalina
 alfredo.catal...@gmail.com wrote:
  This is what I get with mtxrun texexec kk.tex
 
  This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/W32TeX)
  (format=cont-en 2012.5.28)  28 MAY 2012 21:18
  entering extended mode
   \write18 enabled.
   (c:/context/tex/texmf-context/web2c/natural.tcx)
  **kk.tex
  (./kk.tex
  ConTeXt  ver: 2012.05.26 16:40 MKII  fmt: 2012.5.28  int:
 english/english
  system  : cont-new.mkii loaded
  (c:/context/tex/texmf-context/tex/context/base/cont-new.mkii
  FatalError  : Your format does not match the base files!
  FormatVersion   : 2012.05.26 16:40 MKII
  FilesVersion: 2011.05.18 18:04

 Hm,  try
 mtxrun texexec --make
 and
 context --make

 Both are ok at my end.

 --
 luigi

___
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] Flow Charts

2009-04-07 Thread Alfredo Catalina
I find the chart module great, it provides good results when typesetting
flow charts in many cases. However, sometimes when defining connection lines
the automatic routing feature is not able to find an optimal route and lines
intersect. I was wondering if there is an alternate way to define a
particular path for a specific connection. Instead of letting the module
doing that connection I would rather let it undefined and use some metapost
commands to do it. Is there an easy way to do it keeping the lines and
arrows setup?.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Customizing chapter heads

2009-01-24 Thread Alfredo Catalina
I am new to ConTeXt. I am trying to define a customized head for chapters
but I am finding some problems. The sentences below are based on the chapter
Text Elements which may be found in the ConTeXt manual.

Prior to setting up the title, a new Head command is defined
by \def\HeadTitle#1#2%. It takes two arguments, the chapter number and the
chapter title. The Head so defined will show the word C h a p t e r in
capitals, then the chapter number at 80pt, then a horizontal line, and
finally the title.

The definition works quite well except that both, the chapter number and the
chapter title, are not show at the specified font size.

\definebodyfont[10pt,11pt,12pt][rm][tff=Regular at 80pt]
\definebodyfont[10pt,11pt,12pt][rm][tfe=Regular at 42pt]

\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
{\hfill %
\setupframed[height=7cm,offset=.5em,frame=off]
 \framed[width=9cm,align=left]
{
{\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\
\hairline
{\ss \tfe #2}
}
}
\egroup
}
\starttext
\setuphead[chapter] [command=\HeadTitle]
\chapter{An Insight\\Into Fred's Design}
\stoptext

An easy workaround for the chapter number replaces the argument #1 by
\currentheadnumber

\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
{\hfill %
\setupframed[height=7cm,offset=.5em,frame=off]
 \framed[width=9cm,align=left]
{
{\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\
\hairline
{\ss \tfe #2}
}
}
\egroup
}

Now the chapter number is shown at 80pt as defined. But I have not found the
way to solve the problem with the head title, #2. ¿Any ideas?

Thanks in advance.
Alfredo.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___