Posts tagged ‘Gutschein’

Einen Gutschein mit LaTeX entwerfen

Hier der Code, um einen Gutschein mit LaTeX zu entwerfen. Der Code stammt vor allem aus der Anleitung von pgfornaments. Der Code ist nicht „minimal“, das liefere ich gelegentlich nach.

\documentclass[ngerman, a5paper]{article} 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}  
\usepackage{graphicx,rotating} 
\usepackage[object=vectorian]{pgfornament}
\usepackage{tkzexample,tikzrput,pict2e,picture} 
\usetikzlibrary{shapes.geometric,calc} 
\usepackage{eso-pic,calc} 
\usepackage{fancyvrb}
\fvset{fontsize=\normalsize}  
 
\makeatletter
\AddToShipoutPicture{%
  \begingroup 
    \setlength{\@tempdima}{2mm}%
    \setlength{\@tempdimb}{\paperwidth-\@tempdima-2cm}%
    \setlength{\@tempdimc}{\paperheight-\@tempdima}%
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimc}){%
            \pgfornament[color=Maroon,anchor=north west,width=2cm]{63}} 
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdima}){%
            \pgfornament[color=Maroon,anchor=south west,width=2cm,symmetry=h]{63}}
    \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdimc}){%
            \pgfornament[color=Maroon,anchor=north east,width=2cm,symmetry=v]{63}} 
    \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdima}){%
            \pgfornament[color=Maroon,anchor=south east,width=2cm,symmetry=c]{63}}    
  \endgroup  
} 
\let\strippt\strip@pt     
\makeatother   
\newcommand{\eachpageornament}{%
\begin{picture}(0,0)
\put(0,0){\pgfornament[width=1cm]{41}};
\put(\strippt\textwidth,0){\pgfornament[width=1cm,symmetry=v]{41}}; 
\put(0,-\strippt\textheight){\pgfornament[width=1cm,symmetry=h]{41}}; 
\put(\strippt\textwidth,-\strippt\textheight){\pgfornament[width=1cm,symmetry=c]{41}};  % 
\end{picture}}   
 
 \usepackage{aurical}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\usepackage{array,booktabs} % book-quality tables
\usepackage{multicol} % multiple column layout facilities
\usepackage[babel=true]{microtype}
\usepackage[ngerman]{babel}   
\usepackage{blindtext} 
\pagestyle{empty}
 
\begin{document}
 \Fontlukas
 
\begin{center}
{\Huge Gutschein}
\end{center}
 
\large\noindent \blindtext
 
\vspace*{1.5em}\noindent Max\hfill Moritz
 
\end{document}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website