Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-29 Thread Patrick Gundlach
Hello Sanjoy,


[...]

 (I wonder if the live context has been having the same problem?)

 I tried to fix it after Taco reported the exact problem. Plese test
 if it's working now.

 Thanks, the live context works!  I tested this file:

Thank you and Mojca for testing and fixing things.

Patrick

(if things get important, please cc: me)
-- 
ConTeXt wiki and more: http://contextgarden.net
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-25 Thread Mojca Miklavec
On 9/24/06, Sanjoy Mahajan wrote:
 These were the memory setting in the /etc/texmf/texmf.d/95NonPath.cnf
 configlet that is part of Debian and Ubuntu:

 main_memory = 100 % words of inimemory available; also applies to inimfmp
 main_memory.context = 150
 main_memory.mpost = 150

 I commented out the .mpost line (there was no separate metafun line,
 which I guess was getting the main_memory value of 100),
 regenerated the texmf.cnf with update-texmf, then regenerated
 metafun with texexec --make metafun and transparency worked.  So
 thanks for the magic!

 Have wikified the above in case anyone else runs into it
 http://wiki.contextgarden.net/Mpgraphic.

 (I wonder if the live context has been having the same problem?)

Yes.

I tried to fix it after Taco reported the exact problem. Plese test if
it's working now. If it isn't (i.e.: if I have broken something else)
now at least you know who is to blame.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-25 Thread Sanjoy Mahajan
 (I wonder if the live context has been having the same problem?)

 I tried to fix it after Taco reported the exact problem. Plese test
 if it's working now.

Thanks, the live context works!  I tested this file:

  \setupcolors[state=start]
  \starttext
  \startreusableMPgraphic{a}
  fill fullcircle scaled 10cm withcolor transparent(1,0.5,green) ;
  \stopreusableMPgraphic

  \placefigure[force,none]{}{\reuseMPgraphic{a}}
  \stoptext

and a nice transparent green circle shows up.

I also tested (overlapping transparent squares):

  \setupcolors[state=start]
  \starttext
  \startreusableMPgraphic{a}
  fill unitsquare scaled 1cm withcolor yellow;
  fill unitsquare shifted (0.5,0.5)
scaled 1cm withcolor transparent(1,0.5,red);
  \stopreusableMPgraphic

  \placefigure[force,none]{}{\reuseMPgraphic{a}}
  \stoptext

and it now works.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
 --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] transparent metafun colors turn nearly black

2006-09-23 Thread Sanjoy Mahajan
Just for (meta)fun, I tried a few experiments with transparent colors.
The example below gives a black circle instead of a red one.  Is it that
transparent colors aren't part of metafun -- which I can easily live
with since color printing is too expensive still, alas -- or have I
omitted an essential command?

 cut here 
\runMPgraphicstrue
\setupcolors[state=start]
\starttext
\startreusableMPgraphic{a}
% _inline_specials_ := true; % had hopes for this line, but no luck
% next line taken as an example from mp-spec.mp
fill fullcircle scaled 10cm withcolor transparent(8,.3,red);
\stopreusableMPgraphic

\placefigure[force,none]{}{\reuseMPgraphic{a}}
\stoptext
 cut here 

The metapost output (testfile-mpgraph.1) always contains the following
color setting, no matter what arguments I pass to transparent() :

 0.123 0.003 0.001 setrgbcolor

Which is close to black.

(This is all with ConTeXt 2006.08.08.  The live ConTeXt gives a square
saying undefined.)

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   -- Bertrand de Jouvenal
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-23 Thread Peter Rolf
Hi Sanjoy,

Sanjoy Mahajan wrote:
 Just for (meta)fun, I tried a few experiments with transparent colors.
 The example below gives a black circle instead of a red one.  Is it that
 transparent colors aren't part of metafun -- which I can easily live
 with since color printing is too expensive still, alas -- or have I
 omitted an essential command?

No, as your example works here (beta 17.09.). I also tried your example
at contextgarden (same beta) and it worked too (using Firefox).

Maybe you also need
\runMPTEXgraphicstrue (enabled in my cont-sys.tex)?

Greetings, Peter

  cut here 
 \runMPgraphicstrue
 \setupcolors[state=start]
 \starttext
 \startreusableMPgraphic{a}
 % _inline_specials_ := true; % had hopes for this line, but no luck
 % next line taken as an example from mp-spec.mp
 fill fullcircle scaled 10cm withcolor transparent(8,.3,red);
 \stopreusableMPgraphic
 
 \placefigure[force,none]{}{\reuseMPgraphic{a}}
 \stoptext
  cut here 

 The metapost output (testfile-mpgraph.1) always contains the following
 color setting, no matter what arguments I pass to transparent() :
 
  0.123 0.003 0.001 setrgbcolor
 
 Which is close to black.
 
 (This is all with ConTeXt 2006.08.08.  The live ConTeXt gives a square
 saying undefined.)
 
 -Sanjoy
 
 `A society of sheep must in time beget a government of wolves.'
-- Bertrand de Jouvenal
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
 
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-23 Thread Sanjoy Mahajan
 Maybe you also need
 \runMPTEXgraphicstrue (enabled in my cont-sys.tex)?

I just enabled that in cont-sys.rme, and I put it in the test file for
good measure.

 your example works here (beta 17.09.). I also tried your example at
 contextgarden (same beta) and it worked too (using Firefox).

Thanks for checking it both ways.  Now I'm really puzzled because I
also use Firefox (on Linux).  I just ran the file below at
contextgarden (same one as before but with the MPTEX addition), and it
gives 'undefined' in a square where the figure should be.  And on my
Ubuntu laptop with context 2006.08.08 it gives a large black circle.
I also tried the old perl texexec in case that helped but no luck.

The texexec log on contextgarden looks okay.  It generates
texexec-mpgraph.1 and embeds one figure, so I'm guessing the figure is
generated and inserted.  So I don't understand why the generated PDF
file is not right.  To make sure it wasn't a caching problem, I added
a bit of text to the end, to see whether the new PDF file had it (it
did).

\runMPgraphicstrue
\runMPTEXgraphicstrue
\setupcolors[state=start]
\starttext
\startreusableMPgraphic{a}
fill fullcircle scaled 10cm withcolor transparent(1,0.5,green) ;
\stopreusableMPgraphic

\placefigure[force,none]{}{\reuseMPgraphic{a}}
\stoptext

-Sanjoy
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-23 Thread Peter Rolf
Sanjoy Mahajan wrote:
 Maybe you also need
 \runMPTEXgraphicstrue (enabled in my cont-sys.tex)?
 
 I just enabled that in cont-sys.rme, and I put it in the test file for
 good measure.
 
 your example works here (beta 17.09.). I also tried your example at
 contextgarden (same beta) and it worked too (using Firefox).
 
 Thanks for checking it both ways.  Now I'm really puzzled because I
 also use Firefox (on Linux).  I just ran the file below at
 contextgarden (same one as before but with the MPTEX addition), and it
 gives 'undefined' in a square where the figure should be.  And on my
 Ubuntu laptop with context 2006.08.08 it gives a large black circle.
 I also tried the old perl texexec in case that helped but no luck.

Mhh, I think Patrick is playing games with us ;)

Your examples (old and new one) doesn't work anymore at contextgarden
(black square with unknown text). The good news: it's still working
here. Maybe I should stop testing your examples, as long as my system
works ;)

Just tried your old example *without* \runMPgraphicstrue and it worked
again. This is really strange.

Peter

 The texexec log on contextgarden looks okay.  It generates
 texexec-mpgraph.1 and embeds one figure, so I'm guessing the figure is
 generated and inserted.  So I don't understand why the generated PDF
 file is not right.  To make sure it wasn't a caching problem, I added
 a bit of text to the end, to see whether the new PDF file had it (it
 did).
 
 \runMPgraphicstrue
 \runMPTEXgraphicstrue
 \setupcolors[state=start]
 \starttext
 \startreusableMPgraphic{a}
 fill fullcircle scaled 10cm withcolor transparent(1,0.5,green) ;
 \stopreusableMPgraphic
 
 \placefigure[force,none]{}{\reuseMPgraphic{a}}
 \stoptext
 
 -Sanjoy
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
 
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-23 Thread Taco Hoekwater
Hi,

This all sounds like the 'missing specials' problem that is caused
by conflicting -progname= arguments when using the web2c version
of metapost.

Make sure you do not have conflicting memory settings for both
   main_memory.mpost
as well as
   main_memory.metafun

The best is to remove all trace of '.mpost' and '.metafun' memory
settings from your texmf.cnf, but at least make sure all the
'.mpost' and 'metafun' values are the same .

Then regenerate metafun using texexec --make, and all should be
well again.

Cheers, Taco



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] transparent metafun colors turn nearly black

2006-09-23 Thread Sanjoy Mahajan
These were the memory setting in the /etc/texmf/texmf.d/95NonPath.cnf
configlet that is part of Debian and Ubuntu:

main_memory = 100 % words of inimemory available; also applies to inimfmp
main_memory.context = 150
main_memory.mpost = 150

I commented out the .mpost line (there was no separate metafun line,
which I guess was getting the main_memory value of 100),
regenerated the texmf.cnf with update-texmf, then regenerated
metafun with texexec --make metafun and transparency worked.  So
thanks for the magic!

Have wikified the above in case anyone else runs into it
http://wiki.contextgarden.net/Mpgraphic.

(I wonder if the live context has been having the same problem?)

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
 --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context