diff --git a/belegkopie.tex b/belegkopie.tex new file mode 100644 index 0000000..2960620 --- /dev/null +++ b/belegkopie.tex @@ -0,0 +1,36 @@ +\documentclass{cccbform} +\begin{document} +\TwoColumns{% + \vbox to 0pt{% + \begin{tikzpicture}[baseline] + \def\leftMargin{1cm} + \def\padding{0.5cm} + \def\receiptWidth{5.5cm} + \def\receiptHeight{10cm} + \def\cornerLength{0.5cm} + \coordinate (TL) at (\leftMargin,\receiptHeight); + \coordinate (TLp) at (\leftMargin+\padding,\receiptHeight-\padding); + \coordinate (TR) at (\leftMargin+\receiptWidth,\receiptHeight); + \coordinate (BL) at (\leftMargin,0); + \coordinate (BR) at (\leftMargin+\receiptWidth,0); + + \draw[thin] (TL) -- ++(\cornerLength,0); + \draw[thin] (TL) -- ++(0,-\cornerLength); + \draw[thin] (TR) -- ++(-\cornerLength,0); + \draw[thin] (TR) -- ++(0,-\cornerLength); + + \node[anchor=north west, text width=\receiptWidth-2*\padding, color=black!60] at (TLp) { + {\centering\LARGE\bfseries Kopiervorlage}\\[1em] + 1. Beleg hier auflegen\\[1ex] + 2. Kopie machen\\[1ex] + 3. Beleg mit einem Streifen Klebeband oben über der Kopie befestigen\\[1em] + 4. Vorlage wieder weglegen + }; + \end{tikzpicture}% + } +}{% + \LogoTitle{Beleg + Kopie} + \par\vfill\par + asdf +} +\end{document} diff --git a/cccbform.cls b/cccbform.cls index b253eda..b7a0a32 100644 --- a/cccbform.cls +++ b/cccbform.cls @@ -6,9 +6,14 @@ fontspec, changepage, letltxmacro, textpos} \usetikzlibrary{calc} +\newif\if@DoPdfForm +\@DoPdfFormtrue +\DeclareOption{noform}{\@DoPdfFormfalse} +\ProcessOptions\relax + % address \newcommand{\address}{% - Chaos Computer Club Berlin / CCC~(B)~e.~V.\\ + Chaos Computer Club Berlin~/ CCC~(B)~e.~V.\\ Marienstr.~11\\ 10117~Berlin } @@ -84,12 +89,15 @@ \def\deflength#1#2{\newlength{#1}\setlength{#1}{#2}} \setlength{\parindent}{0pt} \setlength{\fboxsep}{0pt} -\deflength{\formfieldheight}{16pt} -\deflength{\formshrink}{4pt} +\deflength{\normaltextheight}{\dimexpr \ht\strutbox + \dp\strutbox \relax} +% XXX design-relevant lengths +\deflength{\formfieldheight}{1.25\normaltextheight} \deflength{\formskip}{0.75em} \deflength{\colsep}{1.0em} \deflength{\indentstep}{1cm} \deflength{\borderwidth}{0.5pt} +% YYY these might need adjustments after changes +\deflength{\formshrink}{4pt} \def\checkboxtextshrink{\dimexpr \formfieldheight % width of checkbox +1em % the \quad separator's width @@ -97,10 +105,10 @@ \relax} \deflength{\htweak}{0.5pt} % manual adjustment of horizontal alignment of form elements \deflength{\hadj}{\dimexpr -0.5\formshrink - 0.5\fontdimen2\font + \htweak \relax} -% length factors (as percentage of \linewidth) +% XXX length factors (as percentage of \linewidth) \def\normalfieldwidth{0.65} \def\shortfieldwidth{0.35} -% rotation angle +% XXX rotation angle \def\labelangle{4.20} % counters @@ -171,8 +179,8 @@ \stepcounter{fieldnum} \expandafter\raw@CheckBox\expandafter[\@formdefaults, name=\@autofieldname, - width=\dimexpr \formfieldheight - \formshrink \relax, - height=\dimexpr \formfieldheight - \formshrink \relax + width=\dimexpr \normaltextheight - \formshrink \relax, + height=\dimexpr \normaltextheight - \formshrink \relax ]{}% } @@ -192,9 +200,9 @@ \NewDocumentCommand{\fake@CheckBox}{}{% \begin{tikzpicture}[baseline=0.6ex] \fill[fieldcolor] - (0,0) rectangle (\formfieldheight,\formfieldheight); + (0,0) rectangle (\normaltextheight,\normaltextheight); \draw[bordercolor,line width=\borderwidth] - (0,0) rectangle (\formfieldheight,\formfieldheight); + (0,0) rectangle (\normaltextheight,\normaltextheight); \end{tikzpicture}% } @@ -204,9 +212,11 @@ \node (background) [anchor=base west, inner sep=0pt, outer sep=0pt] at (0,0) { \fake@TextField<#1>[#2] }; - \node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) { - \kern\hadj\form@TextField<#1>[#2] - }; + \if@DoPdfForm + \node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) { + \kern\hadj\form@TextField<#1>[#2] + }; + \fi \end{tikzpicture} } @@ -215,9 +225,11 @@ \node (background) [anchor=base west, inner sep=0pt, outer sep=0pt] at (0,0) { \fake@MultilineTextField<#1>[#2] }; - \node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) { - \kern\hadj\form@MultilineTextField<#1>[#2] - }; + \if@DoPdfForm + \node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) { + \kern\hadj\form@MultilineTextField<#1>[#2] + }; + \fi \end{tikzpicture} } @@ -226,17 +238,19 @@ \node (background) [anchor=base west, inner sep=0pt, outer sep=0pt] at (0,0) { \fake@CheckBox }; - \node [anchor=center, inner sep=0pt] at (background.center) { - \kern\hadj\form@CheckBox - }; + \if@DoPdfForm + \node [anchor=center, inner sep=0pt] at (background.center) { + \kern\hadj\form@CheckBox + }; + \fi \end{tikzpicture} } % % % exposed form elements % Text{text…} - just text, with proper spacing -\NewDocumentCommand{\Text}{m}{% - \par#1\par\vspace{\formskip} +\NewDocumentCommand{\Text}{+m}{% + \par\vspace{\formskip}#1\par\vspace{\formskip} } % TextField*{label} - a single-line input (starred version uses all available space) @@ -283,7 +297,7 @@ % MultilineTextField*[height]{label} - a multi-line input, starred version uses all available width \NewDocumentCommand{\MultilineTextField}{s O{} m}{% - \par% + \par\vspace{\formskip}% \ifMultiColumn% \pgfmathsetmacro{\@tlen}{1.0}% \else% @@ -303,7 +317,7 @@ % Signature[label] - a field not fillable on the computer, big enough for a signature \NewDocumentCommand{\Signature}{O{Datum, Unterschrift}}{% - \par% + \par\vspace{\formskip}% \ifMultiColumn% \pgfmathsetmacro{\@tlen}{\normalfieldwidth}% \else% @@ -323,7 +337,7 @@ % Notes[label] - a slightly taller fake field that fills the whole width \NewDocumentCommand{\Notes}{O{Vermerke}}{% - \par% + \par\vspace{\formskip}% \pgfmathsetmacro{\@tlen}{1.0} \begin{tikzpicture}[baseline] \useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight); @@ -353,7 +367,7 @@ % CheckboxOther[width]{label} - a checkbox for a write-in option \NewDocumentCommand{\CheckboxOther}{O{\shortfieldwidth} m}{% \par% - \full@CheckBox\quad#2\quad\full@TextField[#1]% + \full@CheckBox\quad#2\quad\smash{\full@TextField[#1]}% \par\vspace{\formskip}% } @@ -373,20 +387,29 @@ \par\vspace{\formskip}% } +\NewDocumentCommand{\full@rule}{}{% + \noindent\makebox[\linewidth]{\rule{\maxdimen}{\borderwidth}}% +} + +\NewDocumentCommand{\text@rule}{}{% + \hfill\rule{0.75\textwidth}{\borderwidth}\hfill\hfill\null% +} + + % Rule - a horizontal rule, with correct spacing \NewDocumentCommand{\Rule}{}{% - \vspace{\formskip}% - \rule{\linewidth}{\borderwidth}% - \vspace{2\formskip}% + \par% + \text@rule% + \par\vspace{\formskip}% } % RuleSection - rule followed by a small note *immediately* below, before the spacing % (e.g. to separate public / internal sections of a form) \NewDocumentCommand{\RuleSection}{m}{% - \vspace{\formskip}% - \leavevmode\rule{\linewidth}{\borderwidth}\\[-1ex]% - {\details{#1}}% - \par\vspace{2\formskip} + \par\vspace{\formskip}% + \leavevmode\full@rule\\[-1ex]% + {\details{(#1)}}% + \par\vspace{\formskip} } % \begin{Indented}[factor] ... \end{Indented} - indent a section @@ -399,7 +422,7 @@ } % TwoColumns{left}{right} - put two sections side-by-side -\NewDocumentCommand{\TwoColumns}{m m}{% +\NewDocumentCommand{\TwoColumns}{+m +m}{% \MultiColumntrue \begin{minipage}[t]{0.5\linewidth - 0.5\colsep}% #1% @@ -412,7 +435,7 @@ \par\vspace{\formskip}% } -\NewDocumentCommand{\ThreeColumns}{m m m}{% +\NewDocumentCommand{\ThreeColumns}{+m +m +m}{% \MultiColumntrue \begin{minipage}[t]{0.333\linewidth - 0.66\colsep}% #1% @@ -429,7 +452,7 @@ \par\vspace{\formskip}% } -\NewDocumentCommand{\FiveColumns}{m m m m m}{% +\NewDocumentCommand{\FiveColumns}{+m +m +m +m +m}{% \MultiColumntrue \begin{minipage}[t]{0.2\linewidth - 0.8\colsep}% #1% @@ -481,7 +504,7 @@ \NewDocumentCommand{\AddressTitle}{s m}{ \IfBooleanT{#1}{\@logo} \@dinaddress - \\[1cm]\smash{{\titlefont\huge\bfseries #2}}\\[4cm] + \\[1cm]\smash{{\titlefont\huge\bfseries #2}}\\[4.5cm] } % need to emit \Form ; hyperref generates incomplete CheckBox appearance data, diff --git a/erstattung.tex b/erstattung.tex index 379b5fa..45e294a 100644 --- a/erstattung.tex +++ b/erstattung.tex @@ -1,11 +1,9 @@ \documentclass{cccbform} \begin{document} \AddressTitle*{Antrag auf Erstattung von Auslagen} -\vspace{0.5cm} \TextField{Name} \TextField{Verwendungszweck} \TextField{Erstattungsbetrag} -\medskip \Text{Ich bitte um Erstattung} \Checkbox{in bar} \Checkbox{auf mein Konto:} @@ -13,15 +11,14 @@ \TextField{IBAN} \TextField{BIC} \end{Indented} -\medskip \Text{Der entsprechende Beleg / Nachweis ist diesem Formular beigefügt.\\Vielen Dank.} \Signature -\RuleSection{(Erstattung)} +\RuleSection{Erstattung} \Text{Betrag erstattet an:} \Checkbox{Antragsteller} \CheckboxOther{Stellvertreter:} \Signature -\RuleSection{(Buchhaltung)} +\RuleSection{Buchhaltung} \TwoColumns{ \Notes[Konto / Gegenkonto / Vermerke] }{ diff --git a/mitgliedsantrag.tex b/mitgliedsantrag.tex index ace72ad..f04c51f 100644 --- a/mitgliedsantrag.tex +++ b/mitgliedsantrag.tex @@ -1,4 +1,4 @@ -\documentclass{cccbform} +\documentclass[noform]{cccbform} \begin{document} \LogoTitle{Antrag auf Mitgliedschaft im\\\strut{\LARGE Chaos Computer Club Berlin / CCC~(B)~e.~V.}} \Checkbox{Ja, ich habe die Satzung des Chaos Computer Club Berlin e.~V., die Beitragsordnung in der aktuellen Fassung und die Hinweise zur Mitgliedschaft gelesen und möchte Mitglied im CCCB~e.~V. werden.} @@ -7,14 +7,12 @@ \TextField{Pseudonym} \TextField{E-Mail} \end{Indented} -\medskip \Text{Ich beantrage folgende Mitgliedschaft:} \begin{Indented} \Checkbox{Reguläre Mitgliedschaft (20€ pro Monat)} \Checkbox{Ermäßigte Mitgliedschaft (10€ pro Monat) -- bitte Beleg beilegen!} \CheckboxOther[0.17]{Mitgliedschaft mit Sonderbeitrag nach Art.~6 Abs.~2 der Satzung:} \end{Indented} -\medskip \Text{Ich werde den Mitgliedsbeitrag auf das folgende Konto überweisen:} \begin{Indented} \Text{% @@ -26,22 +24,26 @@ \end{Indented} \Text{Hinweis: Die Rechtsgrundlage dieser Datenverarbeitung ist Art.~6 Abs.~1 lit.~b) DSGVO.} \ShortTextField{Ort, Datum} -\medskip \Signature[Unterschrift] \RuleSection{Miss- oder Vertrauenspersonen} \Text{Die folgenden Aktiven sind für eine Aufnahme:} \TwoColumns{ - \TextField*{\#1} + \TextField{\#1} }{ - \TextField*{\#2} + \TextField{\#2} } \RuleSection{Vorstand} \TwoColumns{ \Text{% - \InlineCheckbox~Abgelehnt\\[\formskip] + \vspace{-2\formskip} + \InlineCheckbox~Abgelehnt + \Rule \InlineCheckbox~Verpeilt - \InlineCheckbox~Wiedergefunden\\[\formskip] + \quad + \InlineCheckbox~Wiedergefunden + \par\smallskip \InlineCheckbox~Eingetragen + \quad \InlineCheckbox~Mail gesendet% } }{