summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/fadingimage/fadingimage.tex
blob: ad1ebbc3ae00cf12df4b82165a6f34306e6e8639 (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
\documentclass[11pt,svgnames]{article}
\usepackage{geometry,indentfirst,titlesec,authblk,hyperref,hologo}
\titleformat*{\section}{\bfseries\large}
\hologoFontSetup{general=\sffamily}
\usepackage{datetime}\yyyymmdddate
\usepackage[libertine,mono=false]{newtx}
\usepackage{fadingimage}
\hypersetup{colorlinks,urlcolor=MidnightBlue}
\def\pkg#1{\textcolor{DarkGreen}{\textsf{#1}}}
\def\mode#1{\textcolor{Indigo}{\textsf{#1}}}
\def\cmd#1{\textcolor{MidnightBlue}{\texttt{\string#1}}}

\title{\bfseries The \pkg{fadingimage} Package}
\author{Mingyu Hsia, \href{mailto:xiamyphys@hdu.edu.cn}{\ttfamily xiamyphys@hdu.edu.cn}}
\affil{Hangzhou Dianzi University}
\date{\today\quad Version 0.3a\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 macros for inputting full width picture at the edges of pages quickly. This package is contained in the \pkg{LiteBook} and \pkg{LiteSolution} class.

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}.

\end{abstract}

\section{Installing \pkg{fadingimage} and loading it}

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

Simply download \verb|fadingimage.cls| file from \href{https://github.com/xiamyphys/fadingimage}{GitHub} or \href{https://ctan.org/pkg/fadingimage}{CTAN} and save it under your working directory. However, I strongly suggest to use terminal to install and update all packages to the latest version

\begin{verbatim}
    sudo tlmgr update --self --all
\end{verbatim}

To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \hologo{TeX} distribution?}

\section{Macros in this package}

\begin{verbatim}
    \UPFadingImage  <*> [<keyval list>] {<file>} <!> % fading from top
    \LOWFadingImage <*> [<keyval list>] {<file>} <!> % fading from bottom
    \LTFadingImage  <*> [<keyval list>] {<file>} <!> % fading from left
    \RITFadingImage <*> [<keyval list>] {<file>} <!> % fading from right
\end{verbatim}

The four commands all have 2 variables and the first one is optional. The second variable 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.

If an exclamation \verb|<!>| is added at the end of the commands, the image inserted won't be faded. If a star \verb|<*>| is added after the commands it will automatically exit vertical mode \verb|\leavevmode| after inserting the image.


\end{document}