Initial commit
[geocaching.git] / petling.tex
1 %%%%
2 %%  LaTeX Logbook for a micro-sized cache
3 % Author: bongo 2011
4 % !!! you have to use the flag "-shell-escape" to use the barcode hack !!! 
5 %
6 %Usage of the embedded Logo under permission of Groundspeak Inc.
7 % "The Groundspeak Geocaching Logo may be used only on non-commercial items.
8 % These items may include, but are not limited to shirts, hats, coins, logbooks, stickers and
9 %cache containers" from https://www.geocaching.com/about/logousage.aspx at
10 %(22.06.11)
11 %
12 %% I don't provide the logo, but you could download it here:
13 %%% http://www.treasuresofthemountains.eu/images/Geocaching_Logo.jpg
14 %%% or https://shinaz.deviantart.com/art/GeoCaching-com-s-Logo-57016206 and modify the path 
15 %%%%
16 \documentclass[10pt]{article}
17 \usepackage[left=0.5cm,right=0.5cm,bottom=0cm,head=0cm,foot=0cm]{geometry}
18 \geometry{a4paper}
19 \usepackage[parfill]{parskip}
20
21 % Geocaching specific variables, please change!
22 \newcommand{\gccID}{GC2XXFA} % id @geocaching.com
23 \newcommand{\ocID}{OCC976} % id @ opencaching.de
24 % static, dont't necessarily change
25 \newcommand{\gccBaseURL}{http://www.geocaching.com/seek/cache_details.aspx?wp=}
26 \newcommand{\ocBaseURL}{http://www.opencaching.de/viewcache.php?wp=}
27
28 % German Includes %
29 \usepackage[ngerman]{babel}
30 \selectlanguage{ngerman}
31 \usepackage{ucs}
32 \usepackage[utf8x]{inputenc} 
33 % General optimization %
34 \usepackage{mdwlist} %for compact lists and so on...
35 \usepackage{hyperref}% url embedding
36 % Additional Document specific includes %
37 \usepackage{multicol} % multicolumn layout
38         \setlength{\columnseprule}{0.01pt} % separation line width
39 \usepackage{forloop} % for content generating loop
40 \usepackage{graphicx} % embedding images
41 \usepackage{caption}
42 \usepackage[sfmath]{kpfonts} %% sfmath option only to make math in sans serif. 
43
44 % hacks to use pstricks dependent barcode generator in pdflatex %
45 \usepackage[pdf]{pstricks}
46 \usepackage{auto-pst-pdf}
47 \usepackage{pst-barcode} % for qr-codes
48
49 %  next line is from http://stackoverflow.com/questions/2553392/latex-rule-filling-the-line %
50 \newcommand{\fillrule}[2][0em]{\leaders\hbox{\rule[#1]{1pt}{#2}}\hfill}
51
52 \setlength{\topskip}{0pt}
53 \addtolength{\voffset}{-3.2cm} % move head into non-visible above page borders
54 \addtolength{\textheight}{3.2cm} % increase page size since we moved head ()  
55
56 \pagestyle{empty}
57 \begin{document}        
58                 \begin{multicols}{2}[][1mm]{
59                 \newcounter{col}
60                 \forloop[1]{col}{1}{\value{col} < 3}{           
61                         \begin{minipage}{\linewidth} %encapsulate text to prevent moving to other column
62                                 \centering
63                                 \begin{Huge}
64                                         \fontfamily{kpsans}\selectfont                          
65                                                 \sf % set sans serif
66                                                 \textbf{LOGBUCH}\\                                      
67                                         \normalfont                                     
68
69                                         \textbf{Cache} 
70                                         \vspace*{-1cm}
71                                         % the qr-code embedding the link to the cache listing(s)
72                                         \begin{align*}
73                                                 \begin{pspicture}
74                                                                 \psbarcode[scalex=0.65, scaley=0.65]{\gccBaseURL\gccID}{}{qrcode}
75                                                 \end{pspicture}
76                                                 &&\makebox[4.5cm][c]{\fillrule{0.1mm}}&&
77                                                 \begin{pspicture}
78                                                         \psbarcode[scalex=0.65, scaley=0.65]{\ocBaseURL\ocID}{}{qrcode}
79                                                 \end{pspicture}
80                                         \end{align*}
81
82                                         
83                                         %\vspace*{0.3cm}
84                                         \includegraphics[width=0.5\linewidth]{Geocaching_Logo.jpg} \\
85                                         \vspace*{0.2cm}
86                                         \textbf{Besitzer:} \\
87                                         \vspace{5mm}
88                                         \makebox[4cm][c]{\fillrule{0.1mm}}                              
89                                         \normalfont
90                                 \end{Huge}
91                                         \include{disclaimer_de}
92                         \end{minipage}
93                         \vfill  
94                         }
95                 }
96         \end{multicols}
97         \newpage % force new page
98         %\addtolength{\textheight}{6cm} % increase page size since we moved head ()  
99         \vspace*{-4cm}
100         \begin{small}
101         \begin{multicols}{6}[][1mm]{    
102                 \newcounter{line}       
103                 \forloop[1]{col}{1}{\value{col} < 7}{           
104                         \forloop[1]{line}{1}{\value{line} < 20}{
105                                 Name: \fillrule{0.0002pt} \break
106                                 Datum:\fillrule{0.0002pt} \break
107                                         \setlength{\fboxsep}{0.8mm}
108                                 Zeit: \noindent \fbox{\phantom{00}}\vspace{-3\fboxrule}\fbox{\phantom{00}}
109                                 \break
110                                 \null % empty hbox
111                                 \par % end paragraph
112                         }
113                 }
114         }       
115         \end{multicols}
116         \end{small}
117 \end{document}