ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* backgroundcolor broken in 2006-06-07
@ 2006-06-09 12:21 Hans van der Meer
  2006-06-09 12:42 ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Hans van der Meer @ 2006-06-09 12:21 UTC (permalink / raw)



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

In the latest context version of 2006-06-7 coloring the background  
seems broken.
Reverting to the version 2006-05-28 remedied this, but I have no  
intention of course, to freeze my system at that point.

Here is a minimal example that colors the background in 2006-05-28  
and does not in 2006-06-07:

\setupcolors[state=start]
\definetextbackground[showbkg][frame=off,location=text,
     background=color,backgroundcolor=orange,backgroundoffset=0pt]
\starttext
tekst \startshowbkg background \stopshowbkg{} tekst.
\stoptext

Can someone look into this? I am relying on this coloring!

Hans van der Meer




[-- Attachment #1.2: Type: text/html, Size: 2601 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-09 12:21 backgroundcolor broken in 2006-06-07 Hans van der Meer
@ 2006-06-09 12:42 ` Taco Hoekwater
  2006-06-09 14:07   ` Aditya Mahajan
  2006-06-09 21:49   ` Hans van der Meer
  0 siblings, 2 replies; 9+ messages in thread
From: Taco Hoekwater @ 2006-06-09 12:42 UTC (permalink / raw)




Hans van der Meer wrote:
> In the latest context version of 2006-06-7 coloring the background seems 
> broken.
> Reverting to the version 2006-05-28 remedied this, but I have no 
> intention of course, to freeze my system at that point.
> 
> Here is a minimal example that colors the background in 2006-05-28 and 
> does not in 2006-06-07:
> 
> \setupcolors[state=start]
> \definetextbackground[showbkg][frame=off,location=text,
>     background=color,backgroundcolor=orange,backgroundoffset=0pt]
> \starttext
> tekst \startshowbkg background \stopshowbkg{} tekst.
> \stoptext
> 
> Can someone look into this? I am relying on this coloring!

Backgrounds work ok here (on Linux).

Cheers,
Taco

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-09 12:42 ` Taco Hoekwater
@ 2006-06-09 14:07   ` Aditya Mahajan
  2006-06-09 21:49   ` Hans van der Meer
  1 sibling, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2006-06-09 14:07 UTC (permalink / raw)


On Fri, 9 Jun 2006, Taco Hoekwater wrote:

>
>
> Hans van der Meer wrote:
>> In the latest context version of 2006-06-7 coloring the background seems
>> broken.
>> Reverting to the version 2006-05-28 remedied this, but I have no
>> intention of course, to freeze my system at that point.
>>
>> Here is a minimal example that colors the background in 2006-05-28 and
>> does not in 2006-06-07:
>>
>> \setupcolors[state=start]
>> \definetextbackground[showbkg][frame=off,location=text,
>>     background=color,backgroundcolor=orange,backgroundoffset=0pt]
>> \starttext
>> tekst \startshowbkg background \stopshowbkg{} tekst.
>> \stoptext
>>
>> Can someone look into this? I am relying on this coloring!
>
> Backgrounds work ok here (on Linux).

They also work on windows (standalone context from pragma)

Aditya

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-09 12:42 ` Taco Hoekwater
  2006-06-09 14:07   ` Aditya Mahajan
@ 2006-06-09 21:49   ` Hans van der Meer
  2006-06-10  6:37     ` Hans van der Meer
  1 sibling, 1 reply; 9+ messages in thread
From: Hans van der Meer @ 2006-06-09 21:49 UTC (permalink / raw)



On Jun 9, 2006, at 14:42, Taco Hoekwater wrote:

>
>
> Hans van der Meer wrote:
>> In the latest context version of 2006-06-7 coloring the background  
>> seems
>> broken.
>> Reverting to the version 2006-05-28 remedied this, but I have no
>> intention of course, to freeze my system at that point.
>>
>> Here is a minimal example that colors the background in 2006-05-28  
>> and
>> does not in 2006-06-07:
>>
>> \setupcolors[state=start]
>> \definetextbackground[showbkg][frame=off,location=text,
>>     background=color,backgroundcolor=orange,backgroundoffset=0pt]
>> \starttext
>> tekst \startshowbkg background \stopshowbkg{} tekst.
>> \stoptext
>>
>> Can someone look into this? I am relying on this coloring!
>
> Backgrounds work ok here (on Linux).

THANKS for those who checked this on their system and found nothing  
wrong. But that was bad news for me.
I switched back and force between the versions of 2006-05-28 and  
2006-06-07 by replacing all context related files from cont-tmf.zip,  
taking care to first remove all the old contents, regenerating the  
formats afterwards. Definitely the 2006-05-28 works, the 2006-06-07  
does not work here.

At the brink of giving up I thought it should be metapost related and  
then found in cont-sys.tex some patches I had received earlier and  
these now had to be taken out. So back to normal!

QUESTION: is the issue related to these patches now resolved from  
version 2006-06-07 onwards?

These patches were:

"% PATCH FOR SUPPRESS "unknown"s IN METAPOST COMMUNICATION OF textext"
\unexpanded\def\startcolor
{\ifincolor
     \expandafter\doglobalstartcolor
   \else
     \expandafter\noglobalstartcolor
   \fi}
\unexpanded\def\stopcolor
{\ifincolor
     \doglobalstopcolor
   \else
     \noglobalstopcolor
   \fi}
and
"% PATCH FOR STANDALONE GRAPHICS WHERE textext WAS NOT WORKING"
\long\def\writecheckedMPgraphic#1%
{\ifforceMPTEXgraphic
     \global\MPTEXgraphictrue
   \else
     \global\MPTEXgraphicfalse
     \edef\ascii{#1}\convertcommand\ascii\to\MPascii
     \the\MPTEXgraphicchecks\relax % \relax is end condition!
   \fi
   \flushMPTEXgraphic % verbatimtex etc
   \writeMPgraphic{#1}}


Hans van der Meer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-09 21:49   ` Hans van der Meer
@ 2006-06-10  6:37     ` Hans van der Meer
  2006-06-10  7:10       ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Hans van der Meer @ 2006-06-10  6:37 UTC (permalink / raw)


This turns out to be a disaster for me.
Now all textext again comes out as "unknown".
Setting \forceMPTEXgraphictrue makes things worse, because now all  
graphics are replaced by the first one generated.
Is there any help?


On Jun 9, 2006, at 23:49, Hans van der Meer wrote:

>
> On Jun 9, 2006, at 14:42, Taco Hoekwater wrote:
>
>>
>>
>> Hans van der Meer wrote:
>>> In the latest context version of 2006-06-7 coloring the background
>>> seems
>>> broken.
>>> Reverting to the version 2006-05-28 remedied this, but I have no
>>> intention of course, to freeze my system at that point.
>>>
>>> Here is a minimal example that colors the background in 2006-05-28
>>> and
>>> does not in 2006-06-07:
>>>
>>> \setupcolors[state=start]
>>> \definetextbackground[showbkg][frame=off,location=text,
>>>     background=color,backgroundcolor=orange,backgroundoffset=0pt]
>>> \starttext
>>> tekst \startshowbkg background \stopshowbkg{} tekst.
>>> \stoptext
>>>
>>> Can someone look into this? I am relying on this coloring!
>>
>> Backgrounds work ok here (on Linux).
>
> THANKS for those who checked this on their system and found nothing
> wrong. But that was bad news for me.
> I switched back and force between the versions of 2006-05-28 and
> 2006-06-07 by replacing all context related files from cont-tmf.zip,
> taking care to first remove all the old contents, regenerating the
> formats afterwards. Definitely the 2006-05-28 works, the 2006-06-07
> does not work here.
>
> At the brink of giving up I thought it should be metapost related and
> then found in cont-sys.tex some patches I had received earlier and
> these now had to be taken out. So back to normal!
>
> QUESTION: is the issue related to these patches now resolved from
> version 2006-06-07 onwards?
>
> These patches were:
>
> "% PATCH FOR SUPPRESS "unknown"s IN METAPOST COMMUNICATION OF textext"
> \unexpanded\def\startcolor
> {\ifincolor
>      \expandafter\doglobalstartcolor
>    \else
>      \expandafter\noglobalstartcolor
>    \fi}
> \unexpanded\def\stopcolor
> {\ifincolor
>      \doglobalstopcolor
>    \else
>      \noglobalstopcolor
>    \fi}
> and
> "% PATCH FOR STANDALONE GRAPHICS WHERE textext WAS NOT WORKING"
> \long\def\writecheckedMPgraphic#1%
> {\ifforceMPTEXgraphic
>      \global\MPTEXgraphictrue
>    \else
>      \global\MPTEXgraphicfalse
>      \edef\ascii{#1}\convertcommand\ascii\to\MPascii
>      \the\MPTEXgraphicchecks\relax % \relax is end condition!
>    \fi
>    \flushMPTEXgraphic % verbatimtex etc
>    \writeMPgraphic{#1}}
>
>
> Hans van der Meer
>
>
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

met vriendelijke groet
Hans van der Meer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-10  6:37     ` Hans van der Meer
@ 2006-06-10  7:10       ` Taco Hoekwater
  2006-06-10 14:57         ` Hans van der Meer
  2006-06-11 13:55         ` Hans van der Meer
  0 siblings, 2 replies; 9+ messages in thread
From: Taco Hoekwater @ 2006-06-10  7:10 UTC (permalink / raw)


Hans van der Meer wrote:
> This turns out to be a disaster for me.
> Now all textext again comes out as "unknown".
> Setting \forceMPTEXgraphictrue makes things worse, because now all  
> graphics are replaced by the first one generated.
> Is there any help?
> 

Can you send me the complete output of your run, and the current
contents of cont-sys.tex? (for debugging purposes)

Taco

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-10  7:10       ` Taco Hoekwater
@ 2006-06-10 14:57         ` Hans van der Meer
  2006-06-11  9:56           ` Taco Hoekwater
  2006-06-11 13:55         ` Hans van der Meer
  1 sibling, 1 reply; 9+ messages in thread
From: Hans van der Meer @ 2006-06-10 14:57 UTC (permalink / raw)


Taco,

Thanks for looking into. I would have responded earlier but our  
server was out of the air)
This is a stripped down version without all the files for  
demonstration, because too big to be send at once.
But the observations are clear now.

I have made a minimal example and done some variations. See file  
test.tex and testfig.tex
1. including my own metapost macroset for Label (custom.mp)
	gives different results for \forceMPTEXgraphictrue --  
\forceMPTEXgraphicfalse
	undefined as label for true, unknown as label for false
2. draw textext gives in both cases label undefined.

I did an extensive series of experiments and nailed the problem into  
the context base files in the change from 2006-05-28 to 2006-06-07.
What I did was:
1. back to version 2006-05-28
	changed metafun.mem to an earlier generated one
	set \forceMPTEXgraphictrue in cont-sys.tex
	generated formats
	typesetting ok
2. generated metafun.mem afresh with texmfstart texexec --make alone  
metafun
	typesetting ok
3. changed the ruby scripts over to the 2006-06-07 ones.
	typesetting ok
4. changed the context base files in tex/context/base to their  
2006-06-07 ones
	did texhash
	did texmfstart texexec --make en nl
	checked format versions
	typesetting not ok
	Now many things having to do with metapost go wrong, among these:  
textext, (inline) textbackground.
5. move out the context base files in tex/context/base of 2006-06-07
	texhash
	regenerate formats
	typesetting ok again

I do not know why this does occur on my MacOSX system and obviously  
not on other systems.
But the effect is demonstrably their.
Could it be something in the communication between TeX and Metapost?
Or something related end-of-line stuff?

file test.tex:
\setupcolors[state=start]
\setupbodyfont[cmr]
\input testfig
\starttext
\placefigure[][fig:figtest]{Test figure}{\useMPgraphic{testfig} 
{width=40mm,height=20mm}}
\stoptext

file testfig.tex:
\startuseMPgraphic{testfig}{width,height}

	w = \MPvar{width};
	h = \MPvar{height};
	
	% framing figure
	pickup pensquare scaled 2pt;
	draw origin -- (w,0) -- (w,h) -- (0,h) -- cycle;

	% With these two statements the output = test1.pdf resultant label:  
unknown
%	\input custom.mp
%	Label("TEXTEXT", (w/2,h/2)) withcolor red;
% alas, these files could not be included

	% With this statement the output = test2.pdf resultant label: undefined
	draw textext("TEXTEXT") shifted (w/2,h/2);

\stopuseMPgraphic
\endinput



On Jun 10, 2006, at 9:10, Taco Hoekwater wrote:

> Hans van der Meer wrote:
>> This turns out to be a disaster for me.
>> Now all textext again comes out as "unknown".
>> Setting \forceMPTEXgraphictrue makes things worse, because now all
>> graphics are replaced by the first one generated.
>> Is there any help?
>>
>
> Can you send me the complete output of your run, and the current
> contents of cont-sys.tex? (for debugging purposes)
>
> Taco
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

met vriendelijke groet
Hans van der Meer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-10 14:57         ` Hans van der Meer
@ 2006-06-11  9:56           ` Taco Hoekwater
  0 siblings, 0 replies; 9+ messages in thread
From: Taco Hoekwater @ 2006-06-11  9:56 UTC (permalink / raw)


Hans van der Meer wrote:
> 
> I have made a minimal example and done some variations. See file  
> test.tex and testfig.tex
> 1. including my own metapost macroset for Label (custom.mp)
> 	gives different results for \forceMPTEXgraphictrue --  
> \forceMPTEXgraphicfalse
> 	undefined as label for true, unknown as label for false

The false -> unknown is to be expected. Without it, context
does not understand that "Label" is similar to "textext".
As an alternative, it is also possible to do

   \forceMPTEXcheck{Label}

> 2. draw textext gives in both cases label undefined.

This typically means the the embedded TeX run for the textext
failed, but the problem could also be that the entire metapost
run was wrong.

> 
> I do not know why this does occur on my MacOSX system and obviously  
> not on other systems.
> But the effect is demonstrably their.
> Could it be something in the communication between TeX and Metapost?
> Or something related end-of-line stuff?

Because even simple backgrounds fail (and only on MacOSX), end-of-line
stuff seems a likely candidate. What is the contents of the
test-mpgraph.mp?

Greetings, Taco

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: backgroundcolor broken in 2006-06-07
  2006-06-10  7:10       ` Taco Hoekwater
  2006-06-10 14:57         ` Hans van der Meer
@ 2006-06-11 13:55         ` Hans van der Meer
  1 sibling, 0 replies; 9+ messages in thread
From: Hans van der Meer @ 2006-06-11 13:55 UTC (permalink / raw)



On Jun 10, 2006, at 9:10, Taco Hoekwater wrote:

> Hans van der Meer wrote:
>> This turns out to be a disaster for me.
>> Now all textext again comes out as "unknown".
>> Setting \forceMPTEXgraphictrue makes things worse, because now all
>> graphics are replaced by the first one generated.
>> Is there any help?
>>
>
> Can you send me the complete output of your run, and the current
> contents of cont-sys.tex? (for debugging purposes)

I finally managed to nail down the cause of this problem and solve it.
(adding and removing files and rebuilding format in small steps did  
the trick ;-)

It is the following line in supp-mps.tex:
\ifx\TEXEXECcommand \undefined \def\TEXEXECcommand{texmfstart  
texexec} \fi

previously this was:
\ifx\TEXEXECcommand \undefined \def\TEXEXECcommand{texexec} \fi

The trouble stems from the fact that apparently "texexec.pl" does not  
need an excutable copy named "texexec" in order to get called from  
supp-mps.tex whereas "texmfstart.rb" did.
Calling "texmfstart" from bash shell apparently has no trouble  
finding texmfstart.rb if it knows its whereabouts.

Therefore now I add to my installation shell script in addition to  
unzipping now these two lines:
chmod a+x .../scripts/ruby/texmstart.rb
cp .../scripts/ruby/texmstart.rb /usr/local/bin
(/usr/local/bin on my path, as it is in most unix-like systems).

After that I had to tweak my TeXShop to use texmfstart accordingly.
For those MacOSX-TeXShop users among you who want this too and  
without much trouble, here is the recipe (with thanks to Richard Koch):
1. Make a file ~/Library/TeXShop/Engines/ContextNew.engine (vary the  
'ContextNew' part at will)
2. Give it the following contents (the tetex-part pertains to my  
tetex tex-structure, yours may vary)
#!/bin/tcsh
set path= ($path /usr/local/teTeX/bin/powerpc-apple-darwin-current)
texmfstart texexec --pdf --autopdf "$1"
3. ensure /usr/local/bin/texmfstart is on your search path
4. if you like choose in the Preferences of TeXShop under "Default  
Command" the item "Command Listed Below" and fill the textfield with  
"ContextNew"
5. and/or put as first line in your tex-files:
%!TEX TS-program = ContextNew
6. for working in Terminal (the shell, mine is bash) put in  
your .bashrc the following lines:
CONTEXT_RUBYSCRIPTS=/usr/local/teTeX/share/texmf-local/scripts/ 
context/ruby/
export CONTEXT_RUBYSCRIPTS
PATH=$PATH:$CONTEXT_RUBYSCRIPTS
export PATH

Hans van der Meer

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-06-11 13:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-09 12:21 backgroundcolor broken in 2006-06-07 Hans van der Meer
2006-06-09 12:42 ` Taco Hoekwater
2006-06-09 14:07   ` Aditya Mahajan
2006-06-09 21:49   ` Hans van der Meer
2006-06-10  6:37     ` Hans van der Meer
2006-06-10  7:10       ` Taco Hoekwater
2006-06-10 14:57         ` Hans van der Meer
2006-06-11  9:56           ` Taco Hoekwater
2006-06-11 13:55         ` Hans van der Meer

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