diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty b/Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty new file mode 100644 index 00000000000..09a433a0ea1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty @@ -0,0 +1,42 @@ +%% **************************************************************************************************** +%% Copyright 2024 by Mingyu Hsia <xiamyphys@gmail.com> * +%% * +%% This work may be distributed and/or modified under * ***** * * * +%% the conditions of the LaTeX Project Public License * ** * * *** * * * +%% * * ** * * * ** * +%% http://www.latex-project.org/lppl.txt * * * * ***** ** * +%% * * ** * * * * * +%% either version 1.3c of this license or any later ***** ** * * *** * * * +%% version. * +%% * +%% This work has the LPPL maintenance status `maintained'. * +%% * +%% The Current Maintainer of this work is Mingyu Hsia. * +%% * +%% This work consists of the files fadingimage.sty, * +%% and README.md. * +%% available at https://github.com/xiamyphys/FadingImage * +%% **************************************************************************************************** +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesPackage{fadingimage}[2024/03/09/ v0.1b Package for adding fading full width picture at the top or bottom of a page.] + +\RequirePackage{tikz,xcolor} +\usetikzlibrary{fadings} +\NewDocumentCommand{\UPFadingImage}{ s o m }{ + \IfBooleanTF{#1}{ + \tikz[remember picture,overlay] + \node[below,inner sep=0pt,outer sep=auto] at (current page.north) {\includegraphics[width=\paperwidth,#2]{#3}}; + }{ + \tikz[remember picture,overlay] + \node[scope fading=south,below,inner sep=0pt,outer sep=auto] at (current page.north) {\includegraphics[width=\paperwidth,#2]{#3}}; + } +} +\NewDocumentCommand{\LOWFadingImage}{ s o m }{ + \IfBooleanTF{#1}{ + \tikz[remember picture,overlay] + \node[above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#2]{#3}}; + }{ + \tikz[remember picture,overlay] + \node[scope fading=north,above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#2]{#3}}; + } +}
\ No newline at end of file |