[NTG-context] was: figuretext problem --- is: how to modify (presentation) styles

Mojca Miklavec mojca.miklavec1 at email.si
Fri Oct 8 19:16:59 CEST 2004

Hans Hagen wrote:
> Matthias Weber wrote:
>
>> Thanks Hans, this was most helpful!
>>
>> I have another question, though:
>> After looking at various 'built-in' documentation styles I am
>> wondering about the best way
>> to modify one of these. I couldn't find any documentation besides how
>> to use the
>> styles as they are. So, if I want to make (say) the "green style" blue
>> and with smaller buttons,
>> are there setups for this? If yes, do I learn about these by looking
>> at the source, or,  if no,
>> do I copy the source and try my best to mess around with it?
>
>
>
> yourstyle.tex :
>
> \usemodule[pre-green]
>
>
>
> yourdocument.tex:
>
> \environment yourstyle
>
> .. the text ..

I didn't figure out yet how to know which s-pre-xx.tex defines which
style, but if you want to use and modify the green one, take a look at
s-pre-02.tex or even better: general/sources/s-pre-02.pdf at pragma-ade
website. The documentation there is not visual (like in other manuals),
but pretty self-evident for someone with at least some minimal
experience with ConTeXt.

To change the background color, after finding the following line in
s-pre-02.tex:
\definecolor [OrnamentColor]    [r= 0, g=.7, b=.4]

it is not difficult to guess that an additional line anywhere at the
beginning of your document or style file, like:
\definecolor [OrnamentColor]    [r= 0, g=.4, b=.7]
will change the color from green to blue.

To get smaller buttons, notice the \bottomheight used overall where the
buttons are drawn. (In page-run.tex you can see that that 'bottom' is
resposnsible to set the proper bottomheight.) So
\setuplayout[bottom=.4cm]
should solve your problem. If you want to change the look of buttons
more dramatically, simply copy and modify the lines:

\startuniqueMPgraphic{RightArrow}{height}
...
\stopuniqueMPgraphic

You can try to play with single portions of settings. A very beautiful
thing in TeX is that one definition simply overloads the other, so it's
not too difficult to modify a properly designed style.

Regards, Mojca Miklavec