| 1 |
\documentclass[11pt,svgnames]{article} |
| 2 |
\usepackage{geometry,indentfirst,titlesec,authblk,hyperref,hologo} |
| 3 |
\titleformat*{\section}{\bfseries\large} |
| 4 |
\hologoFontSetup{general=\sffamily} |
| 5 |
\usepackage{datetime}\yyyymmdddate |
| 6 |
\usepackage[libertine,mono=false]{newtx} |
| 7 |
\usepackage{fadingimage} |
| 8 |
\hypersetup{colorlinks,urlcolor=MidnightBlue} |
| 9 |
\def\pkg#1{\textcolor{DarkGreen}{\textsf{#1}}} |
| 10 |
\def\mode#1{\textcolor{Indigo}{\textsf{#1}}} |
| 11 |
\def\cmd#1{\textcolor{MidnightBlue}{\texttt{\string#1}}} |
| 12 |
|
| 13 |
\title{\bfseries The \pkg{fadingimage} Package} |
| 14 |
\author{Mingyu Hsia, \href{mailto:[email protected]}{\ttfamily [email protected]}} |
| 15 |
\affil{Hangzhou Dianzi University} |
| 16 |
\date{\today\quad Version 0.3a\thanks{\url{https://github.com/xiamyphys/fadingimage}}} |
| 17 |
|
| 18 |
\begin{document} |
| 19 |
\maketitle |
| 20 |
\UPFadingImage*[trim={0 {.96\paperheight} 0 0},clip]{Beautiful-realities} |
| 21 |
\LOWFadingImage*[trim={0 0 0 {.96\paperheight}},clip]{Beautiful-realities} |
| 22 |
|
| 23 |
\vspace{-6ex} |
| 24 |
\begin{abstract} |
| 25 |
|
| 26 |
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. |
| 27 |
|
| 28 |
Welcome to feedback bugs or ideas via email \href{mailto:[email protected]}{\ttfamily [email protected]} or \href{https://github.com/xiamyphys/fadingimage}{GitHub}. |
| 29 |
|
| 30 |
\end{abstract} |
| 31 |
|
| 32 |
\section{Installing \pkg{fadingimage} and loading it} |
| 33 |
|
| 34 |
This package requires \pkg{tikz} package to node images and \pkg{fading} library to support fading image. |
| 35 |
|
| 36 |
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 |
| 37 |
|
| 38 |
\begin{verbatim} |
| 39 |
sudo tlmgr update --self --all |
| 40 |
\end{verbatim} |
| 41 |
|
| 42 |
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?} |
| 43 |
|
| 44 |
\section{Macros in this package} |
| 45 |
|
| 46 |
\begin{verbatim} |
| 47 |
\UPFadingImage <*> [<keyval list>] {<file>} <!> % fading from top |
| 48 |
\LOWFadingImage <*> [<keyval list>] {<file>} <!> % fading from bottom |
| 49 |
\LTFadingImage <*> [<keyval list>] {<file>} <!> % fading from left |
| 50 |
\RITFadingImage <*> [<keyval list>] {<file>} <!> % fading from right |
| 51 |
\end{verbatim} |
| 52 |
|
| 53 |
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. |
| 54 |
|
| 55 |
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. |
| 56 |
|
| 57 |
|
| 58 |
\end{document} |