1 dated 20140304 Gonzalo Medina Universidad Nacional de Colombia Sede Manizales Departamento de Matem57569ticas y Estad57581stica gmedinaarunaleduco March 4 2014 Abstract This package allows the placement of quite ID: 13470
Download Pdf The PPT/PDF document " The background package v" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
-2- activatesasetofpredenedoptionsthatwilltypesettheword"Draft"acrosseverypageofyourdocument(fromthelowerleftcornertotheupperrightcorner),usingthiscolorandahugefontsize.Ofcourse,thepackagecanbeloadedusingsomeoftheoptionsdescribedinthenextsection;forexample: \usepackage[pages=some,placement=bottom]{background}Foralaterchangeofoptions,thispackageprovidesthecommand \backgroundsetup{hoptionsi}So,forexample, \usepackage[contents=Confidential,color=blue]{background}and \usepackage{background}\backgroundsetup{contents=Confidential,color=blue}producethesameresult.Theadvantageof\backgroundsetupisthatitcanbeusednotonlyinthepreamblebutonthebodyofthedocument,asmanytimesasrequired.Thedocumentneedstobeprocessedtwicetogetthebackgroundmaterialintherightposition. ! 2.1OptionsTheoptionsdescribedinthissectioncanbeusedaspackageoptionsorintheargu-mentofthe\backgroundsetupcommand.Thetable1containsasummaryofalltheavailableoptionsandtheirdefaultvalues.Sincetheoptionsusedtomodifyat-tributesofthebackgroundmaterialdependonthe\nodeconstructofferedbytheTikZpackage,westronglyencouragethereadingofTillTantau'sPGF/TikZpackagemanual.Thisoptioncontrolswetherthebackgroundmaterialshouldappearinallorinsomepages=ofthepagesofthedocument.Thepredenedvaluesforthisoptionareall(default)andsome.Takeintoaccountthatusingthevaluesomeforthisoptionwillcausenobackgroundmaterialtobedisplayedatallandtheuserwillhavetoissuethecom-mand\BgThispageforeachpageinwhichhe/shedesiresthebackgroundmaterialtoappear(seeexample3). -4- nodeanchor=southeastnodeanchor=northThisoptionallowstheusertosetthesimpliedanchorforthenodecontainingtheanchor=backgroundmaterial.Typicalvaluesforthiskeyare: anchor=leftanchor={below=30pt}Thesetwooptionscontrolthehorizontalandverticalshifting,respectively,ofthenodehshift=vshift=position.Table1:Availableoptions. KeyPossibleValuesDefault pagesj ll];TJ/F; 9;.165; Tf; 65.;ल ; Td; [00;someallfirstpagejtrue;]TJ/;྇ ; .16;V T; 95;.92 ; Td; [00;falsefalseplacementjtopjÎnt;r]T;J/F8; 9.;ᙖ Tf ;ć.;क ; Td; [00;bottomcentercontentsText,images,etc.DraftcolorAnyvalidcolorred!45 angleAnyvaluebetween-360and36060,forcenter0,fortopandbottomopacityAnyvaluebetween0and10.5scaleAnypositivevalue15forcenter8fortopandbottompositionAnyvaluefornodeplacementcurrentpage.centerforcentercurrentpage.northfortopcurrentpage.southforbottomanchorAnysimpliedvaluefornodeanchoremptyforcenterbelowfortopaboveforbottomnodeanchorAnyvaluefornodeanchorcenterhshiftAnylength.0ptvshiftAnylength.0pt -6- \usepackage{lipsum}\pagestyle{empty}\begin{document}\lipsum[1-30]\end{document}Example3 Thisexampleillustrateshowtouseofthe\BgThispagecommandtoaddbackgroundmaterialonselectedpagesandhowtouse\backgroundsetup. \documentclass{article}\usepackage[pages=some,placement=top]{background}\usepackage{lipsum}\begin{document}\lipsum[1-5]\newpage\backgroundsetup{contents=A,color=yellow}\BgThispage\lipsum[1-5]\newpage\backgroundsetup{contents=B,color=blue}\BgThispage\lipsum[1-5]\end{document}Example4 Thisexampleshowshowtoproceedinordertoobtaindifferentbackgroundmaterialfortheoddandevenpagesofadocument. \documentclass{article}\usepackage[contents={},opacity=1,scale=1.5,color=blue!90]{background}\usepackage{lipsum}\usepackage{ifthen}\AddEverypageHook{%\ifthenelse{\isodd{\value{page}}}% -8- \SetBgContents\SetBgColor\SetBgAngle\SetBgOpacity\SetBgScale\SetBgPosition\SetBgAnchor\SetBgHshift\SetBgVshiftInversion1.0therewerevepackageoptions:all,some,center,top,andbottom;theseoptionsarestillavailable,buttheuserisencouragedtousethepagesandplacementkeys;so,forexample, ! \usepackage[some,top]{background}fromversion1.0,couldbereplaced,fromversion2.0on,with \usepackage[pages=some,placement=top]{background}HystoryVersion1.0(2009/11/07):rstimplementation,quitesimpleandparallelingtheoneofthedraftwatermarkpackagebySergioCallegari,butaddinggreatercontroloverthebackgroundmaterialattributes.Version2.0(2012/08/06):Completereimplementation,nowusingthexkeyvalpackagetohandleat-tributesandoptionsinanuniedwaythroughthekey=valuemechanism.Abuginversion1.0with\SetBgAnchorwasreportedbyeudoxosathttp://tex.stackexchange.com/q/47875/3954;thebughasbeenxed.Ausercommand\BgMaterialhasbeenadded.Version2.1(2014/03/04):Addedthenodeanchorkey..Thecontainingnodehasnowinnersep=0pt.Improveddocumentation. -11- 80k;grou;nd00;\DeclareOptionX[BG]81\renewcommand\Background@Position{currentpage.north}%82\renewcommand\Background@Anchor{below}%83\renewcommand\Background@Angle{0}%84\renewcommand\Background@Scale{8}}Andweexecutetheoptionsallandcenter.8586\ExecuteOptions{all,center}87%\begin{macrocode}8889%Nowweprocessanyunknowninputs.Awarningwillbeproducedwhenthe90%userissuesanoptionthathasnotbeendeclared.91%\begin{macrocode}9293\DeclareOptionX*{\PackageWarningNoLine{background}{Option'\CurrentOption'ignored}}Wenextexecuteandprocesstheoptions:9495k;grou;nd00;\ExecuteOptionsX[BG]96firstpage=false,97contents=Draft,%98color=red!45,%99angle=60,%100opacity=0.5,%101scale=10,%102position=currentpage.center,%103anchor={},%104nodeanchor={center},%105hshift=0pt,%106vshift=0pt%107}108109k;grou;nd00;\ProcessOptionsX[BG]\backgroundsetupWedene\backgroundsetup;ourcommandforchangingdefaultvaluesayanypointofthedocument:110\DeclareRobustCommand*\backgroundsetup[1]{%111\setkeys[BG]{background}{#1}112}\bg@materialOurmaincommandusesasimple\nodeconstructtobuildthebackgroundmaterial.113114\newcommand\bg@material{%115\begin{tikzpicture}[rememberpicture,overlay,scale=\Background@Scale]116\node[117rotate=\Background@Angle,118scale=\Background@Scale,119opacity=\Background@Opacity,120anchor=\Background@NodeAnchor, -13- 156\def\Background@Anchor{#1}}157\newcommand\SetBgOpacity[1]{%158\def\Background@Opacity{#1}}\BgMaterialWecreateacopyof\bg@materialtobeuseddirectlyindocuments159160\let\BgMaterial\bg@materialFinally,weinvoke\clearpageattheendofthedocumenttobesurethattheback-groundmaterialinthelastpagewillbeprocessedappropriately:161162\AtEndDocument{\clearpage}IndexNumberswritteninitalicrefertothepagewherethecorrespondingentryisdescribed;numbersunderlinedrefertothecodelineofthedenition;numbersinromanrefertothecodelineswheretheentryisused.Symbols\@ifpackageloaded..........3,4,5,6A\AddEverypageHook..........133,138\AddThispageHook...........129,136\afterpage........133\AtBeginDocument..61B\Background@Anchor.....20,44,48,52,73,77,82,126,156\Background@Angle.....12,45,49,53,74,78,83,117,144\Background@Color.......10,123,146\Background@Contents........8,127,142\Background@HShift.......24,121,152\Background@NodeAnchor...........22,120\Background@Opacity.......14,119,158\Background@Position.....18,43,47,51,72,76,81,126,154\Background@Scale...........16,79,84,115,118,148\Background@VShift.......26,122,150\backgroundsetup.110 \bg@material.113 ,129,132,138,160\bg@some...........27 \bg@somefalse..........29,33,63,69\bg@sometrue35,60,70\BgMaterial.......159 \BgThispage..5,61,129 D\define@boolkey...58\define@choicekey............31,41F\firstpage.........58 I\ifBG@background@firstpage..............59\ifbg@some.....28,135N\NoBgThispage..5,130 O\oldbg@material............132,133P\PackageWarningNoLine..............93S\SetBgAnchor.....140 \SetBgAngle.......140 \SetBgColor.......140 \SetBgContents...140 \SetBgHshift.....140 \SetBgOpacity....140 \SetBgPosition...140 \SetBgScale.......140 \SetBgVshift.....140 \setkeys..........111