summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fadingimage/doc/fadingimage.tex
blob: 043d13b1294a4182e6d4c9068a5f79df4a524fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
\documentclass[11pt]{article}
\usepackage{geometry,indentfirst,titlesec,authblk,hyperref}
\titleformat*{\section}{\bfseries\large}
\usepackage{datetime}
\usepackage[libertine,mono=false]{libertine}
\usepackage{fadingimage}
\hypersetup{colorlinks,urlcolor=moducolor}
\definecolor{pkgcolor}{Hsb}{103,.8,.5}
\definecolor{moducolor}{Hsb}{290,.8,.5}
\definecolor{cmdcolor}{Hsb}{188,.8,.5}
\def\pkg#1{\texorpdfstring{\textcolor{pkgcolor}{
    \href{https://ctan.org/pkg/#1}{\textsf{#1}}}}{“#1”}}
\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
\def\datechange#1#2{%
  \noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
  \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}

\title{\bfseries The \pkg{FadingImage} Package}
\author{Hsia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
\yyyymmdddate\date{\today}
\affil{\href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com}}
\date{\today\quad Version 0.1d\thanks{\url{https://github.com/xiamyphys/FadingImage}}}
\begin{document}

\maketitle
\UPFadingImage[trim={0 {.96\paperheight} 0 0},clip]{Beautiful-realities}
\LOWFadingImage[trim={0 0 0 {.96\paperheight}},clip]{Beautiful-realities}

\vspace{-6ex}
\begin{abstract}
This is \textsf{\textbf{not only the document but also the demo}} for the \pkg{FadingImage} package, which provides three commands for adding fading full width picture at the top, bottom or both of them on a page. And this package is used for my template \pkg{LiteBook} and \pkg{LiteSolution}.
\end{abstract}

\section{The purpose of this package}
This package provides three commands for adding fading full width picture at the top or bottom of a page. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/fadingimage}{GitHub}.

This package requires \pkg{tikz} package to node images and \pkg{fading} library to support fading image.

\section{Loading \pkg{FadingImage}}
I strongly advise you to use terminal/cmd to implement the commands to update all the packages (and install this package) to the latest version or switch to portable version instead
\begin{verbatim}
  sudo tlmgr update --self --all
\end{verbatim}

\section{Commands \cmd{UPFadingImage}, \cmd{LOWFadingImage} and \cmd{UPLOWFadingImage}}
\begin{small}
\begin{verbatim}
  \UPFadingImage [<keyval list>]{<file>} \LOWFadingImage[<keyval list>]{<file>}
  \UPFadingImage [<keyval list>]{<file>} [<keyval list>]{<file>}
\end{verbatim}
\end{small}

The first two commands all have 2 variables and the first one is optional. The second variable of the commands can assign the image that you want to insert, and the first one can assign the parameters of command \cmd{includegraphics}, such as clip to the inserted image.

The third command is a combination of the first two commands and it will call the \cmd{tikz} environment for only once time to reduce compile time.

If a star (*) is added after the commands (such as \verb|\UPFadingImage*[...]{...}|), then the image you inserted won't be faded.

\end{document}