> Am 30.04.2015 um 20:46 schrieb henman <dhen...@gmail.com>:
> 
> 
> I have created a letterhead for correspondence, but it is too unfriendly to 
> have to include it in every time.
> 
> I would like to use it as a package, but don't know if it's possible.
> 
> The problem I see is that the command \setlayer must  be done after the 
> \starttext command.
> If it doesn't then formatting commands such as \sc  will not take affect and 
> I believe a different font is also applied.
> 
> What would  be a user friendly way to implement letterheads (made up using 
> the layers functionality of context?


You can put the layer settings in a setups environment and flush the content 
when the page backgrounds are applied
with the setups key for \setupbackground.

\definelayer[letterhead][width=\paperwidth,height=\paperheight]

\startsetups[letterhead]

\ifnum\rawcountervalue[userpage]=1

        
\setlayerframed[letterhead][x=\backspace,y=1cm][width=\textwidth,height=2cm,align={middle,lohi}]{First
 page}

\else

        
\setlayerframed[letterhead][x=\backspace,y=1cm][width=\textwidth,height=2cm,align={middle,lohi}]{Second
 page}

\fi

\stopsetups

\setupbackgrounds[page][background=letterhead,setups=letterhead]

\starttext
\dorecurse{3}{\page[empty]}
\stoptext

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
___________________________________________________________________________________

Reply via email to