Skip to content
Snippets Groups Projects
petling.tex 3.88 KiB
Newer Older
bongo's avatar
bongo committed
%%%%
%%  LaTeX Logbook for a micro-sized cache
% Author: bongo 2011
% !!! you have to use the flag "-shell-escape" to use the barcode hack !!! 
%
%Usage of the embedded Logo under permission of Groundspeak Inc.
% "The Groundspeak Geocaching Logo may be used only on non-commercial items.
% These items may include, but are not limited to shirts, hats, coins, logbooks, stickers and
%cache containers" from https://www.geocaching.com/about/logousage.aspx at
%(22.06.11)
%
%% I don't provide the logo, but you could download it here:
%%% http://www.treasuresofthemountains.eu/images/Geocaching_Logo.jpg
%%% or https://shinaz.deviantart.com/art/GeoCaching-com-s-Logo-57016206 and modify the path 
%%%%
\documentclass[10pt]{article}
\usepackage[left=0.5cm,right=0.5cm,bottom=0cm,head=0cm,foot=0cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}

% Geocaching specific variables, please change!
\newcommand{\gccID}{GC2XXFA} % id @geocaching.com
\newcommand{\ocID}{OCC976} % id @ opencaching.de
% static, dont't necessarily change
\newcommand{\gccBaseURL}{http://www.geocaching.com/seek/cache_details.aspx?wp=}
\newcommand{\ocBaseURL}{http://www.opencaching.de/viewcache.php?wp=}

% German Includes %
\usepackage[ngerman]{babel}
\selectlanguage{ngerman}
\usepackage{ucs}
\usepackage[utf8x]{inputenc} 
% General optimization %
\usepackage{mdwlist} %for compact lists and so on...
\usepackage{hyperref}% url embedding
% Additional Document specific includes %
\usepackage{multicol} % multicolumn layout
	\setlength{\columnseprule}{0.01pt} % separation line width
\usepackage{forloop} % for content generating loop
\usepackage{graphicx} % embedding images
\usepackage{caption}
\usepackage[sfmath]{kpfonts} %% sfmath option only to make math in sans serif. 

% hacks to use pstricks dependent barcode generator in pdflatex %
\usepackage[pdf]{pstricks}
\usepackage{auto-pst-pdf}
\usepackage{pst-barcode} % for qr-codes

%  next line is from http://stackoverflow.com/questions/2553392/latex-rule-filling-the-line %
\newcommand{\fillrule}[2][0em]{\leaders\hbox{\rule[#1]{1pt}{#2}}\hfill}

\setlength{\topskip}{0pt}
\addtolength{\voffset}{-3.2cm} % move head into non-visible above page borders
\addtolength{\textheight}{3.2cm} % increase page size since we moved head ()  

\pagestyle{empty}
\begin{document}	
		\begin{multicols}{2}[][1mm]{
		\newcounter{col}
		\forloop[1]{col}{1}{\value{col} < 3}{	 	
			\begin{minipage}{\linewidth} %encapsulate text to prevent moving to other column
				\centering
				\begin{Huge}
					\fontfamily{kpsans}\selectfont				
						\sf % set sans serif
						\textbf{LOGBUCH}\\					
					\normalfont					

					\textbf{Cache} 
					\vspace*{-1cm}
					% the qr-code embedding the link to the cache listing(s)
					\begin{align*}
						\begin{pspicture}
		   						\psbarcode[scalex=0.65, scaley=0.65]{\gccBaseURL\gccID}{}{qrcode}
		  				\end{pspicture}
						&&\makebox[4.5cm][c]{\fillrule{0.1mm}}&&
						\begin{pspicture}
				   			\psbarcode[scalex=0.65, scaley=0.65]{\ocBaseURL\ocID}{}{qrcode}
				  		\end{pspicture}
					\end{align*}

					
					%\vspace*{0.3cm}
					\includegraphics[width=0.5\linewidth]{Geocaching_Logo.jpg} \\
					\vspace*{0.2cm}
					\textbf{Besitzer:} \\
					\vspace{5mm}
					\makebox[4cm][c]{\fillrule{0.1mm}}				
					\normalfont
				\end{Huge}
					\include{disclaimer_de}
			\end{minipage}
			\vfill	
			}
		}
	\end{multicols}
	\newpage % force new page
	%\addtolength{\textheight}{6cm} % increase page size since we moved head ()  
	\vspace*{-4cm}
	\begin{small}
	\begin{multicols}{6}[][1mm]{	
		\newcounter{line}	
		\forloop[1]{col}{1}{\value{col} < 7}{	 	
			\forloop[1]{line}{1}{\value{line} < 20}{
		 		Name: \fillrule{0.0002pt} \break
		 		Datum:\fillrule{0.0002pt} \break
		 			\setlength{\fboxsep}{0.8mm}
		 		Zeit: \noindent \fbox{\phantom{00}}\vspace{-3\fboxrule}\fbox{\phantom{00}}
		 		\break
				\null % empty hbox
				\par % end paragraph
			}
		}
	}	
	\end{multicols}
	\end{small}
\end{document}