This commit is contained in:
nobody 2024-11-12 17:25:27 +01:00
parent ac2df824f5
commit 056bf105df
3 changed files with 106 additions and 21 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
*.aux
*.log
*.out
*.pdf

View file

@ -17,7 +17,18 @@
\pagestyle{empty}
% fonts
\setmainfont{Barlow}
% cmr: 0 / 2.502 / 1.251 / 0.834 / 2.586 / 6.0 / 0.834 || -3
\setmainfont{Barlow} % 0 / 1.2 / 0.6 / 0.4 / 3.036 / 6.0 / 0.4 || -2
%\setmainfont{Monaspace Neon} % 0 / 3.72 / 1.86 / 1.24 / 3.081 / 6.0 / 1.24 || -7
%\setmainfont{Baltic Sund} % 0 / 1.476 / 0.738 / 0.492 / 3.0 / 6.0 / 0.492 || -3
%\setmainfont{Cabin Sketch} % 0 / 1.35 / 0.675 / 0.45 / 3.03 / 6.0 / 0.45 || -2
%\setmainfont{Consolas} % 0 / 3.2988 / 0 / 0 / 2.941 / 6.0 / 0 || -6
%\setmainfont{Eagle Lake} % 0 / 1.787 / 0.89355 / 0.5957 / 3.2 / 6.0 / 0.5957 || -3
%\setmainfont{Fira Sans} % 0 / 1.59 / 0.795 / 0.53 / 3.162 / 6.0 / 0.53 || -3
%\setmainfont{Gentium Book Plus} % 0 / 1.32 / 0.66 / 0.44 / 2.72 / 6.0 / 0.44 || -2
%\setmainfont{Ubuntu} % 0 / 1.38 / 0.69 / 0.46 / 3.12 / 6.0 / 0.46 || -2
%\setmainfont{Ubuntu Condensed} % 0 / 1.17 / 0.58 / 0.39 / 3.12 / 6.0 / 0.39 || -2
%\setmainfont{Ubuntu Mono} % 0 / 3.0 / 0 / 0 / 3.12 / 6.0 / 0 || -5
% colors
\definecolor{fieldcolor}{gray}{0.94}
@ -28,9 +39,18 @@
\setlength{\parindent}{0pt}
\setlength{\fboxsep}{0pt}
\deflength{\formfieldheight}{14pt}
\deflength{\formshrink}{4pt}
\deflength{\formskip}{0.5em}
\deflength{\colsep}{1.0em}
\deflength{\indentstep}{1cm}
\deflength{\borderwidth}{0.5pt}
\def\checkboxtextshrink{\dimexpr
\formfieldheight % width of checkbox
+1em % the \quad separator's width
+\formshrink % wild guess, -2\borderwidth leaves 1pt overfull
\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}
% counters
\newcounter{fieldnum}
@ -78,8 +98,8 @@
\stepcounter{fieldnum}
\expandafter\raw@TextField\expandafter[\@formdefaults,
name=\@autofieldname,
width=\dimexpr #2\linewidth - 4pt \relax,
height=\dimexpr #1 - 3pt \relax
width=\dimexpr #2\linewidth - \formshrink \relax,
height=\dimexpr #1 - \formshrink \relax
]{}%
}
@ -88,8 +108,8 @@
\expandafter\raw@TextField\expandafter[\@formdefaults,
name=\@autofieldname,
multiline=true,
width=\dimexpr #2\linewidth - 4pt \relax,
height=\dimexpr #1 - 3pt \relax
width=\dimexpr #2\linewidth - \formshrink \relax,
height=\dimexpr #1 - \formshrink \relax
]{}%
}
@ -97,8 +117,8 @@
\stepcounter{fieldnum}
\expandafter\raw@CheckBox\expandafter[\@formdefaults,
name=\@autofieldname,
width=\dimexpr \formfieldheight - 3pt \relax,
height=\dimexpr \formfieldheight - 3pt \relax
width=\dimexpr \formfieldheight - \formshrink \relax,
height=\dimexpr \formfieldheight - \formshrink \relax
]{}%
}
@ -110,7 +130,7 @@
\draw[dash pattern=on 0.5\borderwidth off 5\borderwidth,bordercolor,
line width=\borderwidth, line cap=round]
(0,0) -- (#2\linewidth - 2\borderwidth,0);
\end{tikzpicture}
\end{tikzpicture}%
}
\LetLtxMacro\fake@MultilineTextField\fake@TextField
@ -121,23 +141,41 @@
(0,0) rectangle (\formfieldheight,\formfieldheight);
\draw[bordercolor,line width=\borderwidth]
(0,0) rectangle (\formfieldheight,\formfieldheight);
\end{tikzpicture}
\end{tikzpicture}%
}
% "full" stacked version of fake + actual form field
\NewDocumentCommand{\full@TextField}{O{\formfieldheight} m}{%
\leavevmode\smash{\rlap{\fake@TextField[#1]{#2}}}%
\raisebox{-1.5pt}{\kern-0.5pt\form@TextField[#1]{#2}}%
\begin{tikzpicture}[baseline]
\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}
};
\end{tikzpicture}
}
\NewDocumentCommand{\full@MultilineTextField}{O{\formfieldheight} m}{%
\leavevmode\smash{\rlap{\fake@MultilineTextField[#1]{#2}}}%
\raisebox{-1.5pt}{\kern-0.5pt\form@MultilineTextField[#1]{#2}}%
\begin{tikzpicture}[baseline]
\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}
};
\end{tikzpicture}
}
\NewDocumentCommand{\full@CheckBox}{}{%
\leavevmode\smash{\rlap{\fake@CheckBox}}%
\raisebox{-1.75pt}{\kern-0.5pt\form@CheckBox}%
\begin{tikzpicture}[baseline]
\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
};
\end{tikzpicture}
}
% % % exposed form elements
@ -192,12 +230,15 @@
\NewDocumentCommand{\Checkbox}{m}{%
\par%
\full@CheckBox\quad%
\begin{minipage}[t]{\dimexpr \linewidth - \formfieldheight - 1em \relax}%
\begin{minipage}[t]{\dimexpr \linewidth - \checkboxtextshrink \relax}%
#1%
\end{minipage}%
\par\vspace{\formskip}%
}
% InlineCheckbox - just the box
\NewDocumentCommand{\InlineCheckbox}{}{\;\full@CheckBox\;}
% CheckboxOther[width]{label} - a checkbox for a write-in option
\NewDocumentCommand{\CheckboxOther}{O{0.5} m}{%
\par%
@ -246,16 +287,54 @@
% TwoColumns{left}{right} - put two sections side-by-side
\NewDocumentCommand{\TwoColumns}{m m}{%
\begin{minipage}[t]{0.48\linewidth}%
\begin{minipage}[t]{0.5\linewidth - 0.5\colsep}%
#1%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.48\linewidth}%
\begin{minipage}[t]{0.5\linewidth - 0.5\colsep}%
#2%
\end{minipage}%
\par
}
\NewDocumentCommand{\ThreeColumns}{m m m}{%
\begin{minipage}[t]{0.333\linewidth - 0.66\colsep}%
#1%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.333\linewidth - 0.66\colsep}%
#2%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.333\linewidth - 0.66\colsep}%
#3%
\end{minipage}%
\par
}
\NewDocumentCommand{\FiveColumns}{m m m m m}{%
\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}%
#1%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}%
#2%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}%
#3%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}%
#4%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}%
#5%
\end{minipage}%
\par
}
% details{text} - (use instead of font sizes, small text)
\NewDocumentCommand{\details}{m}{%
{\scriptsize #1}%

View file

@ -1,6 +1,6 @@
\documentclass{cccbform}
\begin{document}
\LogoTitle{Antrag auf Mitgliedschaft im\\{\LARGE Chaos Computer Club Berlin / CCC~(B)~e.~V.}}
\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.}
\begin{Indented}
\TextField{Vor- und Zuame}
@ -17,7 +17,7 @@
\begin{Indented}
\Text{%
Chaos Computer Club Berlin / CCC (B) e. V.\\
Verwendungszweck: "Mitgliedsbeitrag"\\
Verwendungszweck: "Mitgliedsbeitrag \emph{$\langle$dein Name oder Pseudonym$\rangle$}"\\
IBAN: DE13 1007 0024 0721 2756 00\\
Deutsche Bank
}
@ -34,6 +34,8 @@
}
\RuleSection{Vorstand}
\CheckboxOther{Mitgliedsantrag abgelehnt, weil:}
\Checkbox{Mitgliedsantrag bearbeitet}
\Text{Ablauf: \InlineCheckbox1.~Gesehen \InlineCheckbox2.~Verpeilt
\InlineCheckbox3.~Wiedergefunden \InlineCheckbox4.~Eingetragen
\InlineCheckbox5.~Mail gesendet.}
\Signature[Datum / Kürzel]
\end{document}