Re: [NTG-context] Basic question on Unicode and ConTeXt

2005-07-17 Thread VnPenguin
On 7/17/05, Hans Hagen <[EMAIL PROTECTED]> wrote:
> Mojca Miklavec wrote:
> 
> >regi-lat.tex is interesting, made just for typesetting Croatian :)
> >Perhaps I can add some stuff there too.
> >
> >\defineactivetoken đ {\pseudoencodeddj}
> >\defineactivetoken Ð {\pseudoencodedDJ}
> >
> >This should be \dstroke and \Dstroke.
> >
> >
> ok, changed
> 

yes, there are also exactly two glyphs \dstroke and \Dstroke in Vietnamese :)

Cheers,
-- 
http://vnoss.org
Vietnamese Open Source Software Community
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ISO/windows encodings

2005-07-17 Thread Hans Hagen

Mojca Miklavec wrote:


I have another couple of questions about regimes support.

How can synonyms for regimes be defined, so that
\enableregime[windows-1250] would have the same effect as
\enableregime[win-1250] or \enableregime[cp1250]? And
\enableregime[utf8] the same effect as \enableregime[utf].

I don't won't to be discriminating, but \enableregime[windows] is like
writing \enableregime[latin] ("il" in ConTeXt I think) and expecting
the whole world to understand that you mean latin1. In my opinion it
should be left there (for backward compatibility if for nothing else),
but deprecated and given an unambigious name like "windows-1252",
"windows1252", "win-1252", "win1252", "cp1252" or "windows-western".
 


I'll send you a few lines of code to test

Hans


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Basic question on Unicode and ConTeXt

2005-07-17 Thread Hans Hagen

Henning Hraban Ramm wrote:


Am 2005-07-17 um 22:37 schrieb Hans Hagen:


there are

\showcharacters
\showaccents



BTW I finally created the wiki page "Visual Debugging" for all the  
\show... commands; I guess there are even more than I listed there,  
and some descriptions are still missing (had no time to try them all).


thanks 

(\trace... is also handy) 

Hans 



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Re: try compiling Tex showcase source : program_sample.tex

2005-07-17 Thread Hans Hagen

Christopher Creutzig wrote:


olivier Turlier wrote:


I was trying to compile Program-sample.tex because I find the
transparent white frame over the grey background very nice to see for a
pure electronic pdf. In the same range, the vit Zyka font demo catalog



 Sorry for not answering for such a long time.  Please try the 
following code:



\setupcolors[state=start]

\startuseMPgraphic{bgnd}
  StartPage;
  linear_shade(llcorner Page -- urcorner Page
   -- ulcorner Page -- cycle, 2,
   0.2[red,green], 0.8[red,green]);
  linear_shade(llcorner Page -- lrcorner Page
   -- urcorner Page -- cycle, 2,
   0.2[green,red], 0.8[green, red]);
  BoundPageAreas;
\stopuseMPgraphic

\defineoverlay[bgnd][\useMPgraphic{bgnd}]
\setupbackgrounds[page][background=bgnd]

\startuseMPgraphic{brighten}
  StartPage;
  fill Field[Text][Text] enlarged 2pt
withcolor transparent(1, 0.5, white);
  BoundPageAreas;
\stopuseMPgraphic

\defineoverlay[brighten][\useMPgraphic{brighten}]

\setupbackgrounds[text][background=brighten,backgroundoffset=2pt]

\starttext

\input tufte

\stoptext


 I'm getting a displaced background this way (leaving the 
backgroundoffset out does not help), but I'm sure someone will be able 
to tell us the secret incantation to fix that.


That's because you operate on a page (btw, it's StartPage ... StopPage); 
In this case you can better use:


\startuseMPgraphic{brighten}
 fill OverlayBox enlarged 2pt
   withcolor transparent(1, 0.5, white);
\stopuseMPgraphic


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Basic question on Unicode and ConTeXt

2005-07-17 Thread Henning Hraban Ramm

Am 2005-07-17 um 22:37 schrieb Hans Hagen:


there are

\showcharacters
\showaccents


BTW I finally created the wiki page "Visual Debugging" for all the  
\show... commands; I guess there are even more than I listed there,  
and some descriptions are still missing (had no time to try them all).



Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net

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


Re: [NTG-context] another problem with textbackground

2005-07-17 Thread Hans Hagen

Martin Kolarík wrote:


Hi all,

I need to create document where all text is colored (e.g. gray). So I used
textbackground, and it works. But if I add some floating table into the
document, the text in the table is not colored corectly.

Small attached example show this, all texts should be red. The second table
has for the errorneous cell set [color=red] too, and neither this works.

Example is only an example -- real situation comes from XML document, which
is a bit more complicated and the color problems are a bit more complicated
too -- colors in the table (color and framecolor too) firstly appear after
the first in-cell color change, before this color change table is not
colored. But this I did not suceed simplify to the example.
 

looks funny and buggy to me; you can file a bug report on the temp wiki 
bug page



Now it seems like textbackground affects floats too (why not) but with some
difficulties. One could expect some "renewing" of the backgrounds in the
floating table (again why not :-), but this does not work fully too.

Thanks for any hints or corrections,
 


forget about background in your case, just use:

\setupcolors
 [state=start,
  textcolor=red]


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] horoffset + itemize + positiongraphics = misaligned graphics

2005-07-17 Thread Hans Hagen

Stuart Jansen wrote:


I'm working on a rather complex document containing frequent use of
positional graphics. Unfortunately, I've discovered what I expect will
be a pretty nasty problem to fix. When I combine horoffset,
startitemize, & positiongraphics the graphics are placed in the wrong
spot. I've managed to cook up the simple test case below which
demonstrates the problem.

===
\setuplayout[ horoffset=.5cm ]
\setuppagenumbering[alternative=doublesided]
\setupcolors[state=start]

\defineoverlay [backgraphics] [\positionoverlay{backgraphics}]
\setupbackgrounds[page][background=backgraphics]
\newcounter\CurrentCallout
\startMPpositiongraphic{mypos:line}
 path p ; initialize_box(\MPpos{\MPvar{from}}) ;
 p := lrxy..urxy..ulxy..cycle ;
 p := center p shifted (-.5cm,0mm) -- center p ;
 pickup pencircle scaled 2pt ;
 drawarrow p withcolor red ;
 anchor_box(\MPanchor{\MPvar{from}}) ;
\stopMPpositiongraphic
\def\myitem%
{\doglobal\increment\CurrentCallout\item
\hpos{myitem:b:\CurrentCallout}{\strut}
\startpositionoverlay{backgraphics}
 \setMPpositiongraphic{myitem:b:\CurrentCallout}{mypos:line}
\stoppositionoverlay}

\starttext
\startitemize[n,serried]
\dorecurse{30}{\myitem\input tufte }
\stopitemize
\stoptext
 



where do you assign a value to "from"?

what effect do you want to achieve?

Hans

--

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Hans Hagen

Brooks Moses wrote:


At 12:21 PM 7/17/2005, Radhelorn wrote:


Christopher Creutzig wrote:

 I believe in ConTeXt you'd usually(?) use \start and \stop instead 
of \bgroup and \egroup, though.  What do the experts say about this?



I've seen \start \stop pairs in some examples, but there are so many 
of them in sources that I can not find their definition.



Doing a \show\start in a document finds a definition for \start as 
\docomplexorsimple \complexstart \simplestart; grepping for 
'def\\complexstart' (the \\ being the shell escape for \) finds the 
definition of that in core-sys.tex.


and also e!start

Hans



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Hans Hagen

Radhelorn wrote:


Christopher Creutzig wrote:


Radhelorn wrote:

Oh, thanks. Can you describe in a few words distinction between {} 
and \bgroup\egroup? I know that \bgroup\egroup are "implicit 
characters" and useful in macro definitions but what this really means?




 You can have

\def\startfoo{\bgroup}
\def\stopfoo{\egroup}

but you cannot get the same effect with

\def\startfoo{{}
\def\stopfoo{}}



Thanks. Clear and simple answer.


a sunday evening teaser:

\def\startfoo{\iftrue {\else}\fi}
\def\stopfoo {\iffalse{\else}\fi}

Hans 

btw, this is nice stuff for a 'tex basics' corner in the wiki 

Hans 



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Re: presentations in ConTeXt

2005-07-17 Thread Hans Hagen

Thomas A. Schmitz wrote:


Mojca,

thanks again, that's a useful trick! However, there is a command  
\interactionbar which seems to provide this functionality, and there  
is \setupinteractionbar, but the commands are somewhat  
underdocumented :-)
At least, I don't get any visible output on my slides when I include  
them; there seems to be some kind of secret...


(Your code doesn't compile here, it dies with this message:

This is MetaPost, Version 0.641 (Web2C 7.5.4)
(p-mpgraph.mp
>> NOfPages-2
! Unknown relation will be considered false.

   )
l.118 if(NOfPages > 2)
   and (PageNumber > 0): fraction :=  
(PageNumber-1)/(NOf...


?

Thanks, and best


if you want access to those variables (some of them only make sense at pag ebuilding time) you need to say: 


 LoadPageState ;

(this is done automatically in StartPage ... StopPage) 

Hans 


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] control text color of \about[], \at[]

2005-07-17 Thread Hans Hagen

VnPenguin wrote:


Hi,

I would like to control the text color of command \about[], \at[].
Already search around mailing list archive but it not helps.
 


\setupinteraction[color=red,contrastcolor=red]



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Basic question on Unicode and ConTeXt

2005-07-17 Thread Hans Hagen

Mojca Miklavec wrote:


I'm now attaching a file for support for windows-1250-encoded files.
One character is missing (I don't know what to write for non-breaking
space) and it's not extensively tested or proved for typos. So if
someone can drop an eye on it, I'll be glad.
 


maybe a better name is regi-ce or just regi-1250


Does anyone have any script to test the encoding (which would produce
a matrix of (almost) 266 characters)?
 


there are

\showcharacters
\showaccents

it all depends on the combination of input regime and font encoding 

Hans 



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Basic question on Unicode and ConTeXt

2005-07-17 Thread Hans Hagen

Mojca Miklavec wrote:


regi-lat.tex is interesting, made just for typesetting Croatian :)
Perhaps I can add some stuff there too.

\defineactivetoken đ {\pseudoencodeddj}
\defineactivetoken Ð {\pseudoencodedDJ}

This should be \dstroke and \Dstroke.
 


ok, changed


Where did the "hungarumlaut" characters get the name from? Woudn't it
be better to have "doubleaccute" (as in UNICODE standard). We also
don't name the characters "germanumlaut" but "diaeresis" instead.
 

the names probably come from postscript 

btw, there is a differnece between umlaut and diaeresis (height) 

Hans 



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Brooks Moses

At 12:21 PM 7/17/2005, Radhelorn wrote:

Christopher Creutzig wrote:
 I believe in ConTeXt you'd usually(?) use \start and \stop instead of 
\bgroup and \egroup, though.  What do the experts say about this?


I've seen \start \stop pairs in some examples, but there are so many of 
them in sources that I can not find their definition.


Doing a \show\start in a document finds a definition for \start as 
\docomplexorsimple \complexstart \simplestart; grepping for 
'def\\complexstart' (the \\ being the shell escape for \) finds the 
definition of that in core-sys.tex.


In any case, \start expands (in a somewhat complex way to \bgroup, while 
\start[] appears to expand to \startsomething.  \stop does 
something similar.


Given this, I don't think there's any reason not to use \bgroup and \egroup 
if that's what you mean.


- Brooks



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


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Hans Hagen

Radhelorn wrote:


Hans Hagen wrote:


Radhelorn wrote:


Henning Hraban Ramm wrote:


Am 2005-07-14 um 15:49 schrieb Radhelorn:

I'm expirementing with tabular layouts and have many problems 
with  tabulate. For example I want to make tabulate header of 
description  but ConTeXt gives me errors about missing } and such. 
I is possible  to make tabulate "one big letter" as in LaTeX and 
manipuate it as a  whole? I haven't any luck with combinations of 
vbox/hbox. Maybe  there is ConTeXish way to do this?






Try buffers;
try \bgroup ... \egroup instead of {...} in definitions;
try to post a minimal example of what you did, so that we don't 
have  to search for our crystal balls in order to help you.




Here is one:

\starttext
\definetyping[test][option=commands]
\starttest
/BTEX\vbox\starttabulate
\NC test \NC test \NR
\NC test \NC test \NR
\stoptabulate/ETEX
\stoptest
\stoptext

Maybe I'm abusing tabular because TeXish \settabs will do for many 
cases but I want to use some of tabular features.




what do you want to achieve? why do you need the typing?



This is just an example where tabular gives errors. Actualy I started 
from tries to align not floating tables (\setuptabular[align=middle] 
\startalignment[middle] doesn't help). I thougt that making tabular 
independent from it's surroundings will be workaround and provide 
possibility to abuse it in some other places.


Sorry, this is bad example.

I've solved aligning problem with \hfill\vbox or \rightaligned, but 
this needs to be done for each table.


Did I miss something important?


there is a 'low level' structure for that:

\defineplacement[right][left=\hfill,right=]

\input tufte

\placeright
\starttabulate[|l|l|]
\NC test \NC test \NC \NR
\NC test \NC test \NC \NR
\NC test \NC test \NC \NR
\stoptabulate

\input tufte

\stoptext



--

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Re: presentations in ConTeXt

2005-07-17 Thread Thomas A. Schmitz

Mojca,

thanks again, that's a useful trick! However, there is a command  
\interactionbar which seems to provide this functionality, and there  
is \setupinteractionbar, but the commands are somewhat  
underdocumented :-)
At least, I don't get any visible output on my slides when I include  
them; there seems to be some kind of secret...


(Your code doesn't compile here, it dies with this message:

This is MetaPost, Version 0.641 (Web2C 7.5.4)
(p-mpgraph.mp
>> NOfPages-2
! Unknown relation will be considered false.

   )
l.118 if(NOfPages > 2)
   and (PageNumber > 0): fraction :=  
(PageNumber-1)/(NOf...


?

Thanks, and best

Thomas

On Jul 15, 2005, at 9:46 PM, Mojca Miklavec wrote:


Do you mean those "funny little things" which run from the beginning
to the end as the presentation runs from the first towards the last
slide?

There are "PageNumber" and "NOfPages" variables defined somewhere in
metafun. So you can say something like:

if(NOfPages > 2) and (PageNumber > 0):
fraction := (PageNumber-1)/(NOfPages-1)
else:
fraction := 1;
fi;

And then you can do with it whatever you want. You can for example
change slide colour:

SlideColour := fraction[\MPcolor[my color 1],\MPcolor[my color  
2]];


or draw a progress bar:

fill unisquare xscaled fraction xyscaled size withcolor red;
draw unitsquare xyscaled size;

An alternative are \pageno and \lastpage, defined inside ConTeXt.

Hope this helps,
Mojca



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


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Hans Hagen

Peter Münster wrote:


On Fri, 15 Jul 2005, Radhelorn wrote:

 

I've solved aligning problem with \hfill\vbox or \rightaligned, but this 
needs to be done for each table.


Did I miss something important?
   



Hello,
you can define a macro. For example:

\def\startMyMidAlignedTable{\hbox to \hsize\bgroup\hss\vbox
 \bgroup\starttable}
\def\stopMyMidAlignedTable{\stoptable\egroup\hss\egroup}
 

ere is actually a \definetabulate (see end of core-mis) 

Hans 


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Radhelorn

Christopher Creutzig wrote:

Radhelorn wrote:

Oh, thanks. Can you describe in a few words distinction between {} and 
\bgroup\egroup? I know that \bgroup\egroup are "implicit characters" 
and useful in macro definitions but what this really means?



 You can have

\def\startfoo{\bgroup}
\def\stopfoo{\egroup}

but you cannot get the same effect with

\def\startfoo{{}
\def\stopfoo{}}



Thanks. Clear and simple answer.



 I believe in ConTeXt you'd usually(?) use \start and \stop instead of 
\bgroup and \egroup, though.  What do the experts say about this?





I've seen \start \stop pairs in some examples, but there are so many of 
them in sources that I can not find their definition.



--
Radhelorn <[EMAIL PROTECTED]>
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Christopher Creutzig


My other mail didn't come back yet, so to answer the question I raised 
in there: In this context, \start and \stop won't help, since \hbox 
expects something that expands to { to follow.



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


Re: [NTG-context] "Escaping" tabulate

2005-07-17 Thread Christopher Creutzig

Radhelorn wrote:

Oh, thanks. Can you describe in a few words distinction between {} and 
\bgroup\egroup? I know that \bgroup\egroup are "implicit characters" and 
useful in macro definitions but what this really means?


 You can have

\def\startfoo{\bgroup}
\def\stopfoo{\egroup}

but you cannot get the same effect with

\def\startfoo{{}
\def\stopfoo{}}

because TeX has no way of knowing that the first definition was supposed 
to have ended.


 I believe in ConTeXt you'd usually(?) use \start and \stop instead of 
\bgroup and \egroup, though.  What do the experts say about this?



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


Re: [NTG-context] RFE: Better error messages for \usemodule

2005-07-17 Thread Hans Hagen

Brooks Moses wrote:


At 11:16 PM 7/16/2005, you wrote:


Brooks Moses wrote:

After scratching my head over "no macros found in module mymodule", 
I decided to try replacing the line with "\input{t-mymodule}".




This produced the very cryptic result of a "I can't find the file 
't-mymodule'.  Please type another filename:" error.  However, 
simply using "t-mymodule" as a replacement filename worked fine.



The \input with braces is latex-ese. The TeX primitive is
  \input t-mymodule
and that would have worked.



Ah, ok.  I hadn't realized those were different!


There are a few file reading macros, for instance:

\readfile {yourfile.tex} {\message{OK}} {\message{BAD NEWS}}

supp-fil.tex shows a few (global loading, local loading, recursive 
loading, etc) ans in core-fil there are some macros to load files with 
knowledge of system paths and such



However, as of ConTeXt release 2005.05.25, the original \usemodule
would also have worked: the automatic filename truncation was removed
in that version.



Good to know; it _did_ seem like something that really was likely to 
be more of an annoyance than a useful thing.


it was useful in the days that 8+3 filenames were the rule (msdos but 
also cdroms demanded it) and that the tex binaries were not able to 
handle truncated names well


Hans

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

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


Re: [NTG-context] Re: try compiling Tex showcase source : program_sample.tex

2005-07-17 Thread Christopher Creutzig

olivier Turlier wrote:


I was trying to compile Program-sample.tex because I find the
transparent white frame over the grey background very nice to see for a
pure electronic pdf. In the same range, the vit Zyka font demo catalog


 Sorry for not answering for such a long time.  Please try the 
following code:



\setupcolors[state=start]

\startuseMPgraphic{bgnd}
  StartPage;
  linear_shade(llcorner Page -- urcorner Page
   -- ulcorner Page -- cycle, 2,
   0.2[red,green], 0.8[red,green]);
  linear_shade(llcorner Page -- lrcorner Page
   -- urcorner Page -- cycle, 2,
   0.2[green,red], 0.8[green, red]);
  BoundPageAreas;
\stopuseMPgraphic

\defineoverlay[bgnd][\useMPgraphic{bgnd}]
\setupbackgrounds[page][background=bgnd]

\startuseMPgraphic{brighten}
  StartPage;
  fill Field[Text][Text] enlarged 2pt
withcolor transparent(1, 0.5, white);
  BoundPageAreas;
\stopuseMPgraphic

\defineoverlay[brighten][\useMPgraphic{brighten}]

\setupbackgrounds[text][background=brighten,backgroundoffset=2pt]

\starttext

\input tufte

\stoptext


 I'm getting a displaced background this way (leaving the 
backgroundoffset out does not help), but I'm sure someone will be able 
to tell us the secret incantation to fix that.


 Strange thing is – I had tried that a while ago and the transparency 
was simply lost.  (Right now, the numbers must be different depending on 
whether you put the thing in front of an MP graphic or in front of a 
plain color background.)  If that happens to you, try putting both 
graphics into the same stack of backgrounds, as in


\setupbackgrounds[page][background={bgnd,brighten}]

As a last resort, you could of course join the code into one MP graphic.


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


[NTG-context] another problem with textbackground

2005-07-17 Thread Martin Kolarík
Hi all,

I need to create document where all text is colored (e.g. gray). So I used
textbackground, and it works. But if I add some floating table into the
document, the text in the table is not colored corectly.

Small attached example show this, all texts should be red. The second table
has for the errorneous cell set [color=red] too, and neither this works.

Example is only an example -- real situation comes from XML document, which
is a bit more complicated and the color problems are a bit more complicated
too -- colors in the table (color and framecolor too) firstly appear after
the first in-cell color change, before this color change table is not
colored. But this I did not suceed simplify to the example.

Now it seems like textbackground affects floats too (why not) but with some
difficulties. One could expect some "renewing" of the backgrounds in the
floating table (again why not :-), but this does not work fully too.

Thanks for any hints or corrections,

have a nice day,

Martin


test.pdf
Description: Adobe PDF document


test.tex
Description: Binary data
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] another problem with textbackground

2005-07-17 Thread Martin Kolarík
Hi all,

I need to create document where all text is colored (e.g. gray). So I used
textbackground, and it works. But if I add some floating table into the
document, the text in the table is not colored corectly.

Small attached example show this, all texts should be red. The second table
has for the errorneous cell set [color=red] too, and neither this works.

Example is only an example -- real situation comes from XML document, which
is a bit more complicated and the color problems are a bit more complicated
too -- colors in the table (color and framecolor too) firstly appear after
the first in-cell color change, before this color change table is not
colored. But this I did not suceed simplify to the example.

Now it seems like textbackground affects floats too (why not) but with some
difficulties. One could expect some "renewing" of the backgrounds in the
floating table (again why not :-), but this does not work fully too.

Thanks for any hints or corrections,

have a nice day,

Martin

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