| 1 |
|
| 2 |
|
| 3 |
TIKZ PAGE |
| 4 |
|
| 5 |
|
| 6 |
Small macro to help building nice and complex page layout materials. |
| 7 |
|
| 8 |
|
| 9 |
Build |
| 10 |
|
| 11 |
You can build the whole package using the make command. |
| 12 |
|
| 13 |
|
| 14 |
Installation |
| 15 |
|
| 16 |
To install the tkiz-page package copy its directory to either to: |
| 17 |
|
| 18 |
- $TEXHOME/tex/latex/ |
| 19 |
- $TEXMFHOME/tex/latex/ |
| 20 |
- ~/texmf/tex/latex/ |
| 21 |
- ~/Library/texmf/tex/latex/ |
| 22 |
|
| 23 |
|
| 24 |
Usage |
| 25 |
|
| 26 |
A simple page: |
| 27 |
|
| 28 |
\documentclass{article} |
| 29 |
\usepackage{tikz-page} |
| 30 |
\usepackage{lipsum} |
| 31 |
\newcommand{\tikzpagelayout}{ |
| 32 |
\tpshowframes |
| 33 |
\tikzpageputanchors |
| 34 |
} |
| 35 |
\pagestyle{plain} |
| 36 |
\begin{document} |
| 37 |
\lipsum |
| 38 |
\end{document} |
| 39 |
|
| 40 |
A more complex document: |
| 41 |
|
| 42 |
\documentclass{article} |
| 43 |
\usepackage{tikz-page} |
| 44 |
\usepackage{lipsum} |
| 45 |
\definecolor{halfgray}{gray}{0.55} |
| 46 |
\newcommand\anglei{-45} |
| 47 |
\newcommand\angleii{45} |
| 48 |
\newcommand\angleiii{225} |
| 49 |
\newcommand\angleiv{135} |
| 50 |
\newcommand{\tikzpagelayout}{ |
| 51 |
\tpflip{ |
| 52 |
\coordinate (aux1) at ([yshift=-15pt]page.northeast); |
| 53 |
\coordinate (aux2) at ([yshift=-410pt]page.northeast); |
| 54 |
\coordinate (aux3) at ([xshift=-4.5cm]page.northeast); |
| 55 |
\coordinate (aux4) at ([yshift=-150pt]page.northeast); |
| 56 |
}{ |
| 57 |
\coordinate (aux1) at ([yshift=-15pt]page.northwest); |
| 58 |
\coordinate (aux2) at ([yshift=-410pt]page.northwest); |
| 59 |
\coordinate (aux3) at ([xshift=4.5cm]page.northwest); |
| 60 |
\coordinate (aux4) at ([yshift=-150pt]page.northwest); |
| 61 |
\renewcommand\anglei{-135} |
| 62 |
\renewcommand\angleii{135} |
| 63 |
\renewcommand\angleiii{-45} |
| 64 |
\renewcommand\angleiv{45} |
| 65 |
} |
| 66 |
\begin{scope}[halfgray!40,line width=12pt,rounded corners=12pt] |
| 67 |
\draw (aux1) -- coordinate (a) ++(\angleiii:5) -- ++(\anglei:5.1) coordinate (b); |
| 68 |
\draw[shorten <= -10pt] (aux3) -- (a) -- (aux1); |
| 69 |
\draw[opacity=0.6,halfgray,shorten <= -10pt] (b) -- ++(\angleiii:2.2) -- ++(\anglei:2.2); |
| 70 |
\end{scope} |
| 71 |
\draw[halfgray,line width=8pt,rounded corners=8pt,shorten <= -10pt] |
| 72 |
(aux4) -- ++(\angleiii:0.8) -- ++(\anglei:0.8); |
| 73 |
\begin{scope}[halfgray!70,line width=6pt,rounded corners=8pt] |
| 74 |
\draw[shorten <= -10pt] (aux2) -- ++(\angleiii:3) coordinate[pos=0.45] (c) -- ++(\anglei:3.1); |
| 75 |
\draw (aux2) -- (c) -- ++(\angleiv:2.5) -- ++(\angleii:2.5) -- ++(\anglei:2.5) coordinate[pos=0.3] (d); |
| 76 |
\draw (d) -- +(\angleii:1); |
| 77 |
\end{scope} |
| 78 |
} |
| 79 |
\pagestyle{plain} |
| 80 |
\begin{document} |
| 81 |
\lipsum |
| 82 |
\end{document} |
| 83 |
|
| 84 |
See tikz-page.pdf for further help. |
| 85 |
|
| 86 |
|
| 87 |
Example |
| 88 |
|
| 89 |
[tikz example] |
| 90 |
|
| 91 |
|
| 92 |
License |
| 93 |
|
| 94 |
This program is free software. It comes without any warranty, to the |
| 95 |
extent permitted by applicable law. You can redistribute it and/or |
| 96 |
modify it under the terms of the Do What The Fuck You Want To Public |
| 97 |
License, Version 2, as published by Sam Hocevar. See |
| 98 |
http://sam.zoy.org/wtfpl/COPYING for more details. |
| 99 |
|
| 100 |
This file may be distributed and/or modified under the conditions of the |
| 101 |
LaTeX Project Public License, either version 1.3c of this license or (at |
| 102 |
your option) any later version. The latest version of this license is |
| 103 |
in: |
| 104 |
|
| 105 |
http://www.latex-project.org/lppl.txt |
| 106 |
|
| 107 |
and version 1.3c or later is part of all distributions of LaTeX version |
| 108 |
2006/05/20 or later. |