von MoonKid » Mo 2. Feb 2015, 15:50
Der Code hier stammt nicht von mir, sondern von
hier. Das ergebnis ist ein PDF der Größe A4 mit 10 Visitenkarten drauf.
Aber ich sehe nicht, wo im Code die Größe bestimmt wird. An welcher Stelle wird die Karte (picture?) verzehnfacht?
Ich sehe nicht mal, wo die Seitengröße A4 (vermutlich default?) gesetzt wird.
\documentclass[11pt]{article}
\usepackage[dvips]{graphicx}
\usepackage{times}
\pagestyle{empty}
\setlength{\textwidth}{7in}
\setlength{\hoffset}{0in}
\setlength{\voffset}{0in}
\setlength{\oddsidemargin}{-.8in}
\setlength{\evensidemargin}{-.8in}
\setlength{\textheight}{10in}
\setlength{\topmargin}{-0.87in}
\newcommand{\xname}{}
\newcommand{\xtitleA}{Tux Penguin}
\newcommand{\xtitleB}{Igloo Number 2/6}
\newcommand{\xtitleC}{Tuxhausen}
\newcommand{\xtitleD}{TX - 17892 }
\newcommand{\xtitleE}{Mobil: 2041521915}
\newcommand{\xtitleF}{eMail: tux@tuxhausen.tx}
\newcommand{\xtitleG}{Phone: 2041521915}
%
% The PGP keys are printed in a tiny little font along the bottom
% edge of the card. If you come up with a better way to fit them in,
% let me know.
%
% You can get the fingerprint by doing : 'pgp -kvc <userid>'
\newcommand{\xpgpkeyidA}{52T7U7X4}
\newcommand{\xpgpbitsA}{1024D}
\newcommand{\xpgpfingerprintA}{T808 0702 5U5F 3992 031X 9BT3 0U3X 0A6A 52T7 U7X4}
\newcommand{\xpgpkeyA}{\xpgpbitsA/\xpgpkeyidA: \xpgpfingerprintA}
\newcommand{\pgpfont}{\tt \fontsize{.08in}{.096in}\selectfont}
%
\begin{document}
\setlength{\unitlength}{1mm}
\begin{picture}(178,253)(-7,-1)
% Vert ticks along the bottom
\put(0,-1){\line(0,-1){3}}
\put(89,-1){\line(0,-1){3}}
\put(179,-1){\line(0,-1){3}}
% Vert ticks along the top
\put(0,255){\line(0,1){3}}
\put(89,255){\line(0,1){3}}
\put(179,255){\line(0,1){3}}
\put(-1,-1){\line(-1,0){3}}
\put(180,-1){\line(1,0){3}}
\multiput(0,0)(0,51.0){5}{%
% Ticks on the side of each card
\put(-1,51){\line(-1,0){3}}
\put(180,51){\line(1,0){3}}
\multiput(0,0)(89,0){2}{%
\begin{picture}(89,51)(0,0)
%
% Line across the top of the card.
%
\put(3,48){\line(1,0){83}}
%
\put(35,42){\scriptsize\xname}
\put(30,39){\textsc{\normalsize\xtitleA}}
\put(30,15){\textsc{\tiny\xtitleE}}
\put(30,12){\textsc{\tiny\xtitleF}}
\put(30,18){\textsc{\tiny\xtitleG}}
\put(30,30){\textsc{\scriptsize\xtitleB}}
\put(30,27){\textsc{\scriptsize\xtitleC}}
\put(30,24){\textsc{\scriptsize\xtitleD}}
% For one key [1.2x]
\put(5,6){\textsf{\pgpfont \xpgpkeyA}}
% For two keys
%\put(5,8){\textsf{\pgpfont \xpgpkeyA}}
%\put(5,6){\textsf{\pgpfont \xpgpkeyB}}
%\put(5,4){\textsf{\pgpfont \xpgpkeyC}} % For three keys
% Line across the bottom of the card.
%
\put(3,3){\line(1,0){83}}
\end{picture}}}
\end{picture}
\end{document}
Der Code hier stammt nicht von mir, sondern von [url=http://wiki.linux-club.de/opensuse/Visitenkarte_mit_LaTeX]hier[/url]. Das ergebnis ist ein PDF der Größe A4 mit 10 Visitenkarten drauf.
Aber ich sehe nicht, wo im Code die Größe bestimmt wird. An welcher Stelle wird die Karte (picture?) verzehnfacht?
Ich sehe nicht mal, wo die Seitengröße A4 (vermutlich default?) gesetzt wird.
[code]\documentclass[11pt]{article}
\usepackage[dvips]{graphicx}
\usepackage{times}
\pagestyle{empty}
\setlength{\textwidth}{7in}
\setlength{\hoffset}{0in}
\setlength{\voffset}{0in}
\setlength{\oddsidemargin}{-.8in}
\setlength{\evensidemargin}{-.8in}
\setlength{\textheight}{10in}
\setlength{\topmargin}{-0.87in}
\newcommand{\xname}{}
\newcommand{\xtitleA}{Tux Penguin}
\newcommand{\xtitleB}{Igloo Number 2/6}
\newcommand{\xtitleC}{Tuxhausen}
\newcommand{\xtitleD}{TX - 17892 }
\newcommand{\xtitleE}{Mobil: 2041521915}
\newcommand{\xtitleF}{eMail: tux@tuxhausen.tx}
\newcommand{\xtitleG}{Phone: 2041521915}
%
% The PGP keys are printed in a tiny little font along the bottom
% edge of the card. If you come up with a better way to fit them in,
% let me know.
%
% You can get the fingerprint by doing : 'pgp -kvc <userid>'
\newcommand{\xpgpkeyidA}{52T7U7X4}
\newcommand{\xpgpbitsA}{1024D}
\newcommand{\xpgpfingerprintA}{T808 0702 5U5F 3992 031X 9BT3 0U3X 0A6A 52T7 U7X4}
\newcommand{\xpgpkeyA}{\xpgpbitsA/\xpgpkeyidA: \xpgpfingerprintA}
\newcommand{\pgpfont}{\tt \fontsize{.08in}{.096in}\selectfont}
%
\begin{document}
\setlength{\unitlength}{1mm}
\begin{picture}(178,253)(-7,-1)
% Vert ticks along the bottom
\put(0,-1){\line(0,-1){3}}
\put(89,-1){\line(0,-1){3}}
\put(179,-1){\line(0,-1){3}}
% Vert ticks along the top
\put(0,255){\line(0,1){3}}
\put(89,255){\line(0,1){3}}
\put(179,255){\line(0,1){3}}
\put(-1,-1){\line(-1,0){3}}
\put(180,-1){\line(1,0){3}}
\multiput(0,0)(0,51.0){5}{%
% Ticks on the side of each card
\put(-1,51){\line(-1,0){3}}
\put(180,51){\line(1,0){3}}
\multiput(0,0)(89,0){2}{%
\begin{picture}(89,51)(0,0)
%
% Line across the top of the card.
%
\put(3,48){\line(1,0){83}}
%
\put(35,42){\scriptsize\xname}
\put(30,39){\textsc{\normalsize\xtitleA}}
\put(30,15){\textsc{\tiny\xtitleE}}
\put(30,12){\textsc{\tiny\xtitleF}}
\put(30,18){\textsc{\tiny\xtitleG}}
\put(30,30){\textsc{\scriptsize\xtitleB}}
\put(30,27){\textsc{\scriptsize\xtitleC}}
\put(30,24){\textsc{\scriptsize\xtitleD}}
% For one key [1.2x]
\put(5,6){\textsf{\pgpfont \xpgpkeyA}}
% For two keys
%\put(5,8){\textsf{\pgpfont \xpgpkeyA}}
%\put(5,6){\textsf{\pgpfont \xpgpkeyB}}
%\put(5,4){\textsf{\pgpfont \xpgpkeyC}} % For three keys
% Line across the bottom of the card.
%
\put(3,3){\line(1,0){83}}
\end{picture}}}
\end{picture}
\end{document}[/code]