Guest User

Untitled

a guest
Jan 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{lipsum}
  3. usepackage{tikz}
  4. usetikzlibrary{fadings,shadings}
  5. usepackage{eso-pic}
  6. usepackage{lastpage,refcount}
  7. deffinaltrans{0.5} % adjust this value to make the end more or less transparent
  8. begin{document}
  9.  
  10. newcounter{lastpagenumber}%
  11. setcounter{lastpagenumber}{getrefbykeydefault{LastPage}{page}{1}}%
  12. AddToShipoutPictureFG{% Add picture to background of every page
  13. AtPageLowerLeft{%
  14. makebox[paperwidth]{
  15. begin{tikzpicture}
  16. pgfmathsetmacro{opaone}{100*(1-finaltrans*(thepage)/(thelastpagenumber+1))}
  17. pgfmathsetmacro{opatwo}{100*(1-finaltrans*(thepage+1)/(thelastpagenumber+1))}
  18. tikzfading[name=fade down thepage,
  19. top color=transparent!opaone,
  20. bottom color=transparent!opatwo]
  21. fill[white,path fading=fade down thepage] (0,0) rectangle (paperwidth,paperheight);
  22. end{tikzpicture}}%
  23. }%
  24. }
  25.  
  26.  
  27. lipsum[1-20]
  28. end{document}
Add Comment
Please, Sign In to add comment