diff options
Diffstat (limited to 'certificate/fossee_internship16_cerificate_template/wallpaper.sty')
-rwxr-xr-x | certificate/fossee_internship16_cerificate_template/wallpaper.sty | 250 |
1 files changed, 250 insertions, 0 deletions
diff --git a/certificate/fossee_internship16_cerificate_template/wallpaper.sty b/certificate/fossee_internship16_cerificate_template/wallpaper.sty new file mode 100755 index 0000000..c64e8c6 --- /dev/null +++ b/certificate/fossee_internship16_cerificate_template/wallpaper.sty @@ -0,0 +1,250 @@ +%% +%% This is file `wallpaper.sty' v 1.10 +%% +%% Author Michael H.F. Wilkinson +%% April 21, 2006 +%% +%% Create background, either centered, tiled, or in any corner +%% relies heavily on eso-pic.sty, corrects for changes in \hoffset +%% by classes such as sciposter.cls +%% Problems, bugs and comments to +%% michael@cs.rug.nl +%% version 1.10, 2006/04/21: +%% - Commands added for corner wallpapers +%% +%% version 1.01, 2005/01/18: +%% - \providecommand{\LenToUnit} included to be compatible +%% with earlier versions of eso-pic.sty +%% +%% version 1.00, 2004/12/22: +%% - first release +%% +%% +\ProvidesPackage{wallpaper}[2005/01/18, v1.01 easy wallpaper formatting (MHFW)] +\NeedsTeXFormat{LaTeX2e}[1995/06/01] + +\RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{eso-pic} +\RequirePackage{graphicx} + +\providecommand{\LenToUnit}[1]{#1\@gobble} + + +\newlength{\wpXoffset} +\setlength{\wpXoffset}{-\hoffset} +\newlength{\wpYoffset} +\setlength{\wpYoffset}{0pt} +\newlength{\tileXoffset} +\newlength{\tileYoffset} +\newlength{\tilewidth} +\newlength{\tileheight} +\newlength{\tileX} +\newlength{\tileY} + +\newcommand{\LLCornerWallPaper}[2]{% +\AddToShipoutPicture{% + \AtPageLowerLeft{% + \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + } + } +} + +\newcommand{\ThisLLCornerWallPaper}[2]{% +\AddToShipoutPicture*{% + \AtPageLowerLeft{% + \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + } + } +} + +\newcommand{\ULCornerWallPaper}[2]{% + \AddToShipoutPicture{% + \AtPageLowerLeft{% + \parbox[b][\paperheight]{#1\paperwidth}{% + \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + \vfill% + } + } + } +} + +\newcommand{\ThisULCornerWallPaper}[2]{% + \AddToShipoutPicture*{% + \AtPageLowerLeft{% + \parbox[b][\paperheight]{#1\paperwidth}{% + \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + \vfill% + } + } + } +} + +\newcommand{\LRCornerWallPaper}[2]{% + \AddToShipoutPicture{% + \AtPageLowerLeft{% + \parbox[b]{\paperwidth}{% + \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + } + } + } +} + +\newcommand{\ThisLRCornerWallPaper}[2]{% + \AddToShipoutPicture*{% + \AtPageLowerLeft{% + \parbox[b]{\paperwidth}{% + \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + } + } + } +} + +\newcommand{\URCornerWallPaper}[2]{% + \AddToShipoutPicture{% + \AtPageLowerLeft{% + \parbox[b][\paperheight]{\paperwidth}{% + \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + \vfill% + } + } + } +} +\newcommand{\ThisURCornerWallPaper}[2]{% + \AddToShipoutPicture*{% + \AtPageLowerLeft{% + \parbox[b][\paperheight]{\paperwidth}{% + \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + \vfill% + } + } + } +} + +\newcommand{\CenterWallPaper}[2]{% +\AddToShipoutPicture{\put(\LenToUnit{\wpXoffset},\LenToUnit{\wpYoffset}){% + \parbox[b][\paperheight]{\paperwidth}{% + \vfill + \centering + \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + \vfill + }} + } +} + +\newcommand{\ThisCenterWallPaper}[2]{% +\AddToShipoutPicture*{\put(\LenToUnit{\wpXoffset},\LenToUnit{\wpYoffset}){% + \parbox[b][\paperheight]{\paperwidth}{% + \vfill + \centering + \includegraphics[width=#1\paperwidth,height=#1\paperheight,% + keepaspectratio]{#2}% + \vfill + }}} +} + + + +\newcommand{\TileSquareWallPaper}[2]{% +\AddToShipoutPicture{% + \begingroup + \setlength{\tileYoffset}{\wpYoffset} + \setlength{\tilewidth}{\paperwidth/#1}% + \setlength{\tileheight}{\tilewidth}% + \setlength{\tileY}{0pt}% + \whiledo{\lengthtest{\tileY < \paperheight}}{% + \setlength{\tileX}{0pt}% + \setlength{\tileXoffset}{\wpXoffset}% + \whiledo{\lengthtest{\tileX < \paperwidth}}{% + \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){% + \includegraphics[height=\tileheight,width=\tilewidth]{#2}}% + \addtolength{\tileX}{\tilewidth} + \addtolength{\tileXoffset}{\tilewidth} + }% + \addtolength{\tileY}{\tileheight} + \addtolength{\tileYoffset}{\tileheight} + }% + \endgroup +}% +} + +\newcommand{\ThisTileSquareWallPaper}[2]{% +\AddToShipoutPicture*{% + \begingroup + \setlength{\tileYoffset}{\wpYoffset} + \setlength{\tilewidth}{\paperwidth/#1}% + \setlength{\tileheight}{\tilewidth}% + \setlength{\tileY}{0pt}% + \whiledo{\lengthtest{\tileY < \paperheight}}{% + \setlength{\tileX}{0pt}% + \setlength{\tileXoffset}{\wpXoffset}% + \whiledo{\lengthtest{\tileX < \paperwidth}}{% + \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){% + \includegraphics[height=\tileheight,width=\tilewidth]{#2}}% + \addtolength{\tileX}{\tilewidth} + \addtolength{\tileXoffset}{\tilewidth} + }% + \addtolength{\tileY}{\tileheight} + \addtolength{\tileYoffset}{\tileheight} + }% + \endgroup +}% +} + + +\newcommand{\TileWallPaper}[3]{% +\AddToShipoutPicture{% + \begingroup + \setlength{\tileYoffset}{\wpYoffset} + \setlength{\tilewidth}{#1}% + \setlength{\tileheight}{#2}% + \setlength{\tileY}{0pt}% + \whiledo{\lengthtest{\tileY < \paperheight}}{% + \setlength{\tileX}{0pt}% + \setlength{\tileXoffset}{\wpXoffset}% + \whiledo{\lengthtest{\tileX < \paperwidth}}{% + \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){% + \includegraphics[height=\tileheight,width=\tilewidth]{#3}}% + \addtolength{\tileX}{\tilewidth} + \addtolength{\tileXoffset}{\tilewidth} + }% + \addtolength{\tileY}{\tileheight} + \addtolength{\tileYoffset}{\tileheight} + }% + \endgroup +}% +} + +\newcommand{\ThisTileWallPaper}[3]{% +\AddToShipoutPicture*{% + \begingroup + \setlength{\tileYoffset}{\wpYoffset} + \setlength{\tilewidth}{#1}% + \setlength{\tileheight}{#2}% + \setlength{\tileY}{0pt}% + \whiledo{\lengthtest{\tileY < \paperheight}}{% + \setlength{\tileX}{0pt}% + \setlength{\tileXoffset}{\wpXoffset}% + \whiledo{\lengthtest{\tileX < \paperwidth}}{% + \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){% + \includegraphics[height=\tileheight,width=\tilewidth]{#3}}% + \addtolength{\tileX}{\tilewidth} + \addtolength{\tileXoffset}{\tilewidth} + }% + \addtolength{\tileY}{\tileheight} + \addtolength{\tileYoffset}{\tileheight} + }% + \endgroup +}% +} + +\newcommand{\ClearWallPaper}{\ClearShipoutPicture}
\ No newline at end of file |