diff options
author | Karl Berry <karl@freefriends.org> | 2024-05-06 20:17:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-05-06 20:17:16 +0000 |
commit | fe823ac5b1f5587a411cb25188d25ab03a8b21c4 (patch) | |
tree | 53bf06e0aec145eb8794609bf1e7b3fdf1bd620b /Master/texmf-dist/tex/latex | |
parent | 80c2b91ccf5e7cc46d7cac88dae0e9cb7797a33f (diff) |
fadingimage (6may24)
git-svn-id: svn://tug.org/texlive/trunk@71190 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty b/Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty index 6cfceced3bb..a4147cd3cf3 100644 --- a/Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty +++ b/Master/texmf-dist/tex/latex/fadingimage/fadingimage.sty @@ -1,5 +1,5 @@ %% *********************************************************** -%% Copyright 2024 by Mingyu Hsia <xiamyphys@gmail.com> * +%% Copyright 2024 by Mingyu Hsia <xiamyphys@hdu.edu.cn> * %% * %% This work may be distributed and/or modified under * %% the conditions of the LaTeX Project Public License * @@ -13,48 +13,48 @@ %% * %% The Current Maintainer of this work is Mingyu Hsia. * %% * -%% This work consists of the files fadingimage.cls, * +%% This work consists of the files fadingimage.sty, * %% and README.md. * %% available at https://github.com/xiamyphys/fadingimage * %% *********************************************************** % !Mode:: "TeX:UTF-8" \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesPackage{fadingimage}[2024/04/19/ v0.2a Package for adding fading full width picture at the top and bottom of a page.] +\ProvidesPackage{fadingimage}[2024/05/06/ v0.3a Package provides macros for inputting full width picture at the edges of pages quickly.] -\RequirePackage{tikz,xcolor} -\usetikzlibrary{fadings} -\NewDocumentCommand{\UPFadingImage}{ s O{} m }{ - \IfBooleanTF{#1} - { +\RequirePackage{tikz}\usetikzlibrary{fadings} +\NewDocumentCommand{\UPFadingImage}{ s O{} m t! }{ + \IfBooleanTF{#4}{ \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}}; - } + }\IfBooleanT{#1}{\leavevmode} } -\NewDocumentCommand{\LOWFadingImage}{ s O{} m }{ - \IfBooleanTF{#1} - { +\NewDocumentCommand{\LOWFadingImage}{ s O{} m t! }{ + \IfBooleanTF{#4}{ \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}}; - } + }\IfBooleanT{#1}{\leavevmode} } - -\NewDocumentCommand{\UPLOWFadingImage}{ s O{} m 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}}; - \node[above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#4]{#5}}; - } +\NewDocumentCommand{\LTFadingImage}{ s O{} m t! }{ + \IfBooleanTF{#4}{ + \tikz[remember picture,overlay] + \node[right,inner sep=0pt,outer sep=auto] at (current page.west) {\includegraphics[height=\paperheight,#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}}; - \node[scope fading=north,above,inner sep=0pt,outer sep=auto] at (current page.south) {\includegraphics[width=\paperwidth,#4]{#5}}; - } - } + \tikz[remember picture,overlay] + \node[scope fading=east,right,inner sep=0pt,outer sep=auto] at (current page.west) {\includegraphics[height=\paperheight,#2]{#3}}; + }\IfBooleanT{#1}{\leavevmode} +} +\NewDocumentCommand{\RITFadingImage}{ s O{} m t! }{ + \IfBooleanTF{#4}{ + \tikz[remember picture,overlay] + \node[left,inner sep=0pt,outer sep=auto] at (current page.east) {\includegraphics[height=\paperheight,#2]{#3}}; + }{ + \tikz[remember picture,overlay] + \node[scope fading=west,left,inner sep=0pt,outer sep=auto] at (current page.east) {\includegraphics[height=\paperheight,#2]{#3}}; + }\IfBooleanT{#1}{\leavevmode} }
\ No newline at end of file |