Re: [NTG-context] Page Backgrounds
On 9-7-2012 04:47, Kip Warner wrote: Hey list, On the cover page of my book I'd like just an image displayed and another image used as the background for every other page in the book. So I put this in my environment, % Cover image... \definelayer [CoverImage] [x=0mm, y=0mm, \paperwidth, \paperheight] \setupbackgrounds[page][background=CoverImage] \setlayer [CoverImage] % name of the layer {\externalfigure [Makeup/Images/Cover.jpg] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer % Regular background image... \definelayer [BackgroundImage] [x=0mm, y=0mm, \paperwidth, \paperheight, repeat=yes] \setlayer [BackgroundImage] % name of the layer {\externalfigure [Makeup/Images/Background.png] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer less code: \defineoverlay [BackgroundImage] [\overlayfigure{Makeup/Images/Background.png}] , the following in the book's first page, \setupbackgrounds[page][background=CoverImage] , and the following on second page, \setupbackgrounds[page][background=BackgroundImage] .. But this does not work properly. What ends up happening is the cover image is displayed correctly, but every page after that just has a blank white background. state=repeat Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Page Backgrounds
Am 09.07.2012 um 04:47 schrieb Kip Warner: Hey list, On the cover page of my book I'd like just an image displayed and another image used as the background for every other page in the book. So I put this in my environment, % Cover image... \definelayer [CoverImage] [x=0mm, y=0mm, \paperwidth, \paperheight] \setupbackgrounds[page][background=CoverImage] \setlayer [CoverImage] % name of the layer {\externalfigure [Makeup/Images/Cover.jpg] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer % Regular background image... \definelayer [BackgroundImage] [x=0mm, y=0mm, \paperwidth, \paperheight, repeat=yes] \setlayer [BackgroundImage] % name of the layer {\externalfigure [Makeup/Images/Background.png] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer , the following in the book's first page, \setupbackgrounds[page][background=CoverImage] , and the following on second page, \setupbackgrounds[page][background=BackgroundImage] . But this does not work properly. What ends up happening is the cover image is displayed correctly, but every page after that just has a blank white background. \setupexternalfigures[directory=Makeup/Images] \defineoverlay [backgroundimage] [{\ifnum\rawcountervalue[userpage]=1\relax \overlayfigure{Cover}% \else \overlayfigure{Background}% \fi}] \setupbackgrounds[page][background=backgroundimage] \starttext \dorecurse{4}{\input knuth\page} \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 ___
Re: [NTG-context] Page Backgrounds
On Mon, 2012-07-09 at 10:06 +0200, Wolfgang Schuster wrote: \setupexternalfigures[directory=Makeup/Images] \defineoverlay [backgroundimage] [{\ifnum\rawcountervalue[userpage]=1\relax \overlayfigure{Cover}% \else \overlayfigure{Background}% \fi}] \setupbackgrounds[page][background=backgroundimage] \starttext \dorecurse{4}{\input knuth\page} \stoptext Wolfgang Thanks Wolfgang. That did it. Although I did change userpage to realpage. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc Description: This is a digitally signed message part ___ 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 ___
[NTG-context] Page Backgrounds
Hey list, On the cover page of my book I'd like just an image displayed and another image used as the background for every other page in the book. So I put this in my environment, % Cover image... \definelayer [CoverImage] [x=0mm, y=0mm, \paperwidth, \paperheight] \setupbackgrounds[page][background=CoverImage] \setlayer [CoverImage]% name of the layer {\externalfigure [Makeup/Images/Cover.jpg] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer % Regular background image... \definelayer [BackgroundImage] [x=0mm, y=0mm, \paperwidth, \paperheight, repeat=yes] \setlayer [BackgroundImage] % name of the layer {\externalfigure [Makeup/Images/Background.png] [align=center, \paperwidth, \paperheight]} % the actual contents of the layer , the following in the book's first page, \setupbackgrounds[page][background=CoverImage] , and the following on second page, \setupbackgrounds[page][background=BackgroundImage] . But this does not work properly. What ends up happening is the cover image is displayed correctly, but every page after that just has a blank white background. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc Description: This is a digitally signed message part ___ 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 ___
Re: [NTG-context] page backgrounds
Peter Rolf wrote: Hi Olivier, olivier Turlier schrieb: Hi everybody, I try to draw several metapost page backgrounds (code found at http://melusine.eu.org/syracuse/poulecl/divers/papiers/ ) for manual sketchs on A4 paper. Obviously, it does'nt work, and I don't know why. TIA for any answers. Not so short examples are attached. not so short working example attached. I had some problems with MP (compilations stops in MP; CTRL-D or typing 'end' works)...I donno. Some eof mess. Best wishes, Peter ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ Hi Peter, Thanks for your answer. I'm still unable to produce the desired pdf, both on texlive 2005 (ubuntu festy) and 2007 (gutsy). I've located an error in a metapost inclusion file, because context is complaining in the log file : ... TeXExec | processing graphic 'papier-quadrille-mpgraph.mp' This is MetaPost, Version 0.993 (Web2C 7.5.6) (/usr/share/texmf/web2c/natural.tcx) (papier-quadrille-mpgraph.mp (constantes.mp) (papiers.mp papiers.mp papiers.mpx ! Unable to make mpx file. l.70 dotlabel.llft(btex $O$ etex,(x.origine*cm,y.origine*cm)); I'll test solutions later, as I just enter in a super-charged era @ work. Thanks again -- olivier Turlier CRP La Rouguière 101 Bd des libérateurs 13367 MARSEILLE CEDEX 11 04 91 66 58 10 ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] page backgrounds
2007/11/13, olivier Turlier [EMAIL PROTECTED]: Hi everybody, I try to draw several metapost page backgrounds (code found at http://melusine.eu.org/syracuse/poulecl/divers/papiers/ ) for manual sketchs on A4 paper. Obviously, it does'nt work, and I don't know why. TIA for any answers. Not so short examples are attached. Take a look into Hans MetaFun manual [1]. He defined a few MetaPost macros to draw grids (page 205+). [1] http://pragma-ade.nl/general/manuals/metafun-p.pdf 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] page backgrounds
Hi Olivier, olivier Turlier schrieb: Hi everybody, I try to draw several metapost page backgrounds (code found at http://melusine.eu.org/syracuse/poulecl/divers/papiers/ ) for manual sketchs on A4 paper. Obviously, it does'nt work, and I don't know why. TIA for any answers. Not so short examples are attached. not so short working example attached. I had some problems with MP (compilations stops in MP; CTRL-D or typing 'end' works)...I donno. Some eof mess. Best wishes, Peter ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ \mainlanguage[fr] %D Format de papier A4. \setuppapersize[A4][A4] \setuplayout [width=middle, topspace=1.5cm, height=middle, header=1cm, footer=1cm] \setupcolors[state=start] \MPinclusions{\input constantes.mp \input papiers.mp} \starttext %-- \startuseMPgraphic{Papier5trait} %input constantes; %input papiers; color macouleur; macouleur = .7(green+blue); % beginfig(1); papiercinq((-5,-5),(5,5),macouleur); % endfig; % end \stopuseMPgraphic \defineoverlay[Papier5trait][\useMPgraphic{Papier5trait}] % \defineframedtext[Papier5trait][background=Papier5trait,width=fit,offset=2ex,frame=on,framecolor=red,rulethickness=3pt,corner=round,style=type] % \defineframedtext[Papier5trait][align=middle,width=\overlaywidth,height=\overlayheight,frame=off,background=Papier5trait] % \definetextbackground[Papier5trait][location=paragraph,backgroundcolor=white,before=\blank,after=\blank] \startsetups[Papier5trait] %\startstandardmakeup \setupbackgrounds [page] [background=Papier5trait] %\stopstandardmakeup \setuplayout%[reset] % without parameter-- recalculate layout \stopsetups %-- \startuseMPgraphic{Papier5point} %input constantes; %input papiers; color macouleur; macouleur = .7(red+blue); % beginfig(1); papierpointe((-5,-5),(5,5),macouleur); % endfig; % end \stopuseMPgraphic \defineoverlay[Papier5point][\useMPgraphic{Papier5point}] % \defineframedtext[Papier5point][background=Papier5point,width=fit,offset=2ex,frame=off] \startsetups[Papier5point] %\startstandardmakeup \setupbackgrounds [page] [background=Papier5point] %\stopstandardmakeup \setuplayout%[reset] \stopsetups %-- \startuseMPgraphic{Papiermillimetre} %input constantes; %input papiers; color macouleur; macouleur = .8*orange; % beginfig(1); papiermil((-4cm,-4cm),1,1,(-5,-5),(5,5),macouleur); % endfig; % end \stopuseMPgraphic \defineoverlay[Papiermillimetre][\useMPgraphic{Papiermillimetre}] % \defineframedtext[Papiermillimetre][background=Papiermillimetre,width=fit,offset=2ex,frame=off] \startsetups[Papiermillimetre] %\startstandardmakeup \setupbackgrounds [page] [background=Papiermillimetre] %\stopstandardmakeup \setuplayout%[reset] \stopsetups %-- \startuseMPgraphic{Papier10trait} %input constantes; %input papiers; color macouleur; macouleur = .7(red+green); % beginfig(1); papierun((-5,-5),(5,5),macouleur); % endfig; % end \stopuseMPgraphic \defineoverlay[Papier10trait][\useMPgraphic{Papier10trait}] % \defineframedtext[Papier10trait][background=Papier10trait,width=fit,offset=2ex,frame=off] \startsetups[Papier10trait] %\startstandardmakeup \setupbackgrounds [page] [background=Papier10trait] %\stopstandardmakeup \setuplayout%[reset] \stopsetups %-- \startuseMPgraphic{Papiercahierseyes} %input constantes; %input papiers; color macouleur; macouleur = .7[red,blue]; % beginfig(1); papiercahier((-5,-5),(5,5),macouleur); % endfig; % end \stopuseMPgraphic \defineoverlay[Papiercahierseyes][\useMPgraphic{Papiercahierseyes}] % \defineframedtext[Papiercahierseyes][background=Papiercahierseyes,width=fit,offset=2ex,frame=off] \startsetups[Papiercahierseyes] %\startstandardmakeup \setupbackgrounds [page] [background=Papiercahierseyes] %\stopstandardmakeup \setuplayout%[reset] \stopsetups %-- \startuseMPgraphic{Papierisotrait} %input constantes; %input papiers; color macouleur; macouleur = .7[green,red]; % beginfig(1); papierisom((-5,-5),(5,5),macouleur); % endfig; % end \stopuseMPgraphic
Re: [NTG-context] page backgrounds
Let me provide an answer myself: the btex ... etex doesn't seem to work. This code: \startuseMPgraphic{draft} draw DRAFT infont phvb scaled 9 rotated 57 withcolor .85white ; currentpicture := currentpicture ysized (\overlayheight-3cm) ; \stopuseMPgraphic \defineoverlay[draft][\uniqueMPgraphic{draft}] \setupbackgrounds[page][background=draft] will do what I want: provide a watermark for my document (or, as Hans writes, an annoying text). However, when I try the same with draw btex draft etex I don't get any output. Could you please verify if this is the case in your version of ConTeXt as well? Here's what I have (it's a vanilla teTeX implementation): ConTeXt ver: 2003.9.19 fmt: 2003.9.30 int: english mes: english MetaPost (Web2C 7.5.2) 0.641 Best Thomas ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] page backgrounds
These are my first forays into the unknown territories of Metapost. The following code is copied verbatim from the matafun-manual: \startuniqueMPgraphic{copyright} picture p ; p := btex COPYRIGHT etex rotated 90 ; setbounds p to boundingbox p enlarged 1pt ; draw p withcolor .8white ; currentpicture := currentpicture xysized (\overlaywidth,\overlayheight) ; \stopuniqueMPgraphic \defineoverlay[copyright][\uniqueMPgraphic{copyright}] \setupbackgrounds[text][rightmargin][background=copyright] But I don't see anything. The log shows that metapost calculated a background, but I don't see anything. What am I doing wrong? Best Thomas ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context