next version
This commit is contained in:
		
							parent
							
								
									1edec96c28
								
							
						
					
					
						commit
						88210546c4
					
				
					 3 changed files with 114 additions and 20 deletions
				
			
		
							
								
								
									
										127
									
								
								cccbform.cls
									
										
									
									
									
								
							
							
						
						
									
										127
									
								
								cccbform.cls
									
										
									
									
									
								
							|  | @ -2,8 +2,9 @@ | |||
| \ProvidesClass{cccbform}[2024-11-08 In the Beginning, There Was Chaos] | ||||
| 
 | ||||
| \LoadClass{scrartcl} | ||||
| \RequirePackage{geometry, calc, xparse, xcolor, hyperref, tikz, | ||||
| \RequirePackage{geometry, calc, xparse, xcolor, hyperref, tikz, tikzpagenodes, | ||||
| 		fontspec, changepage, letltxmacro, textpos} | ||||
| \usetikzlibrary{calc} | ||||
| 
 | ||||
| % address | ||||
| \newcommand{\address}{% | ||||
|  | @ -83,9 +84,9 @@ | |||
| \def\deflength#1#2{\newlength{#1}\setlength{#1}{#2}} | ||||
| \setlength{\parindent}{0pt} | ||||
| \setlength{\fboxsep}{0pt} | ||||
| \deflength{\formfieldheight}{14pt} | ||||
| \deflength{\formfieldheight}{16pt} | ||||
| \deflength{\formshrink}{4pt} | ||||
| \deflength{\formskip}{0.5em} | ||||
| \deflength{\formskip}{0.75em} | ||||
| \deflength{\colsep}{1.0em} | ||||
| \deflength{\indentstep}{1cm} | ||||
| \deflength{\borderwidth}{0.5pt} | ||||
|  | @ -96,11 +97,19 @@ | |||
| \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) | ||||
| \def\normalfieldwidth{0.65} | ||||
| \def\shortfieldwidth{0.35} | ||||
| % rotation angle | ||||
| \def\labelangle{4.20} | ||||
| 
 | ||||
| % counters | ||||
| \newcounter{fieldnum} | ||||
| \def\@autofieldname{field\thefieldnum} | ||||
| 
 | ||||
| % conditional flags | ||||
| \newif\ifMultiColumn | ||||
| 
 | ||||
| % abbreviations | ||||
| \def\@formdefaults{% | ||||
| 	backgroundcolor=fieldcolor,bordercolor=fieldcolor,% | ||||
|  | @ -230,44 +239,101 @@ | |||
| 	\par#1\par\vspace{\formskip} | ||||
| } | ||||
| 
 | ||||
| % TextField{label} - a single-line input | ||||
| % TextField*{label} - a single-line input (starred version uses all available space) | ||||
| \RenewDocumentCommand{\TextField}{s m}{% | ||||
| 	\par% | ||||
| 	{\ttfamily\footnotesize #2\strut}\\% | ||||
| 	\IfBooleanTF{#1}{\full@TextField}{\full@TextField[0.7]}% | ||||
| 	\ifMultiColumn% | ||||
| 		\pgfmathsetmacro{\@tlen}{1.0}% | ||||
| 	\else% | ||||
| 		\IfBooleanTF{#1}{\pgfmathsetmacro{\@tlen}{1.0}}{\pgfmathsetmacro{\@tlen}{\normalfieldwidth}}% | ||||
| 	\fi% | ||||
| 	\begin{tikzpicture}[baseline] | ||||
| 		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight); | ||||
| 		\node[anchor=west] at (0, 0) { | ||||
| 			\full@TextField[\@tlen] | ||||
| 		}; | ||||
| 		\node[anchor=west,rotate=\labelangle] at (-1em,0.4\formfieldheight) { | ||||
| 			\ttfamily\footnotesize #2\strut | ||||
| 		}; | ||||
| 	\end{tikzpicture}% | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
| % ShortTextField[width]{label} - a single-line input that doesn't have full width | ||||
| %                                (50% by default) | ||||
| \NewDocumentCommand{\ShortTextField}{O{0.35} m}{% | ||||
| % ShortTextField[width]{label} - a single-line input with reduced width | ||||
| \NewDocumentCommand{\ShortTextField}{o m}{% | ||||
| 	\par% | ||||
| 	{\ttfamily\footnotesize #2\strut}\\% | ||||
| 	\full@TextField[#1]% | ||||
| 	\IfValueTF{#1}{\pgfmathsetmacro{\@tlen}{#1}}{% | ||||
| 		\ifMultiColumn% | ||||
| 			\pgfmathsetmacro{\@tlen}{\normalfieldwidth}% | ||||
| 		\else% | ||||
| 			\pgfmathsetmacro{\@tlen}{\shortfieldwidth}% | ||||
| 		\fi% | ||||
| 	}% | ||||
| 	\begin{tikzpicture}[baseline] | ||||
| 		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight); | ||||
| 		\node[anchor=west] at (0,0) { | ||||
| 			\full@TextField[\@tlen] | ||||
| 		}; | ||||
| 		\node[anchor=west,rotate=\labelangle] at (-1em,0.4\formfieldheight) { | ||||
| 			\ttfamily\footnotesize #2\strut | ||||
| 		}; | ||||
| 	\end{tikzpicture}% | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
| % MultilineTextField[height]{label} - a multi-line input | ||||
| % MultilineTextField*[height]{label} - a multi-line input, starred version uses all available width | ||||
| \NewDocumentCommand{\MultilineTextField}{s O{} m}{% | ||||
| 	\par% | ||||
| 	{\ttfamily\footnotesize #3\strut}\\% | ||||
| 	\IfBooleanTF{#1}{\full@MultilineTextField<#2>}{\full@MultilineTextField<#2>[0.7]}% | ||||
| 	\ifMultiColumn% | ||||
| 		\pgfmathsetmacro{\@tlen}{1.0}% | ||||
| 	\else% | ||||
| 		\IfBooleanTF{#1}{\pgfmathsetmacro{\@tlen}{1.0}}{\pgfmathsetmacro{\@tlen}{\normalfieldwidth}}% | ||||
| 	\fi% | ||||
| 	\begin{tikzpicture}[baseline] | ||||
| 		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight); | ||||
| 		\node[anchor=west] at (0,0) { | ||||
| 			\full@MultilineTextField<#2>[\@tlen] | ||||
| 		}; | ||||
| 		\node[anchor=west,rotate=\labelangle] at (-1em,0.4\formfieldheight) { | ||||
| 			\ttfamily\footnotesize #3\strut | ||||
| 		}; | ||||
| 	\end{tikzpicture} | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
| % Signature[label] - a field not fillable on the computer, big enough for a signature | ||||
| \NewDocumentCommand{\Signature}{O{Datum, Unterschrift}}{% | ||||
| 	\par% | ||||
| 	{\ttfamily\footnotesize #1\strut}\\% | ||||
| 	\fake@MultilineTextField<1.0cm>[0.35]% | ||||
| 	\ifMultiColumn% | ||||
| 		\pgfmathsetmacro{\@tlen}{\normalfieldwidth}% | ||||
| 	\else% | ||||
| 		\pgfmathsetmacro{\@tlen}{\shortfieldwidth}% | ||||
| 	\fi% | ||||
| 	\begin{tikzpicture}[baseline] | ||||
| 		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight); | ||||
| 		\node[anchor=west] at (0,0) { | ||||
| 			\full@MultilineTextField<1.0cm>[\@tlen] | ||||
| 		}; | ||||
| 		\node[anchor=north west,rotate=\labelangle] at (-1em,1cm -0.4\formfieldheight) { | ||||
| 			\ttfamily\footnotesize #1\strut | ||||
| 		}; | ||||
| 	\end{tikzpicture} | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
| % Notes[label] - a slightly taller fake field that fills the whole width | ||||
| \NewDocumentCommand{\Notes}{O{Vermerke}}{% | ||||
| 	\par% | ||||
| 	{\ttfamily\footnotesize #1\strut}\\% | ||||
| 	\fake@MultilineTextField<1.5cm>% | ||||
| 	\pgfmathsetmacro{\@tlen}{1.0} | ||||
| 	\begin{tikzpicture}[baseline] | ||||
| 		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight); | ||||
| 		\node[anchor=west] at (0,0) { | ||||
| 			\full@MultilineTextField<1.5cm>[\@tlen] | ||||
| 		}; | ||||
| 		\node[anchor=north west,rotate=\labelangle] at (-1em,1.5cm -0.9\formfieldheight) { | ||||
| 			\ttfamily\footnotesize #1\strut | ||||
| 		}; | ||||
| 	\end{tikzpicture} | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
|  | @ -285,7 +351,7 @@ | |||
| \NewDocumentCommand{\InlineCheckbox}{}{\full@CheckBox} | ||||
| 
 | ||||
| % CheckboxOther[width]{label} - a checkbox for a write-in option | ||||
| \NewDocumentCommand{\CheckboxOther}{O{0.35} m}{% | ||||
| \NewDocumentCommand{\CheckboxOther}{O{\shortfieldwidth} m}{% | ||||
| 	\par% | ||||
| 	\full@CheckBox\quad#2\quad\full@TextField[#1]% | ||||
| 	\par\vspace{\formskip}% | ||||
|  | @ -325,13 +391,16 @@ | |||
| 
 | ||||
| % \begin{Indented}[factor] ... \end{Indented} - indent a section | ||||
| \NewDocumentEnvironment{Indented}{O{}}{% | ||||
| 	\vspace{-1\formskip} | ||||
| 	\begin{adjustwidth}{#1\indentstep}{0pt}% | ||||
| }{% | ||||
| 	\end{adjustwidth}% | ||||
| 	\vspace{\formskip} | ||||
| } | ||||
| 
 | ||||
| % TwoColumns{left}{right} - put two sections side-by-side | ||||
| \NewDocumentCommand{\TwoColumns}{m m}{% | ||||
| 	\MultiColumntrue | ||||
| 	\begin{minipage}[t]{0.5\linewidth - 0.5\colsep}% | ||||
| 		#1% | ||||
| 	\end{minipage}% | ||||
|  | @ -339,10 +408,12 @@ | |||
| 	\begin{minipage}[t]{0.5\linewidth - 0.5\colsep}% | ||||
| 		#2% | ||||
| 	\end{minipage}% | ||||
| 	\MultiColumnfalse | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
| \NewDocumentCommand{\ThreeColumns}{m m m}{% | ||||
| 	\MultiColumntrue | ||||
| 	\begin{minipage}[t]{0.333\linewidth - 0.66\colsep}% | ||||
| 		#1% | ||||
| 	\end{minipage}% | ||||
|  | @ -354,10 +425,12 @@ | |||
| 	\begin{minipage}[t]{0.333\linewidth - 0.66\colsep}% | ||||
| 		#3% | ||||
| 	\end{minipage}% | ||||
| 	\MultiColumnfalse | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
| \NewDocumentCommand{\FiveColumns}{m m m m m}{% | ||||
| 	\MultiColumntrue | ||||
| 	\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}% | ||||
| 		#1% | ||||
| 	\end{minipage}% | ||||
|  | @ -377,6 +450,7 @@ | |||
| 	\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}% | ||||
| 		#5% | ||||
| 	\end{minipage}% | ||||
| 	\MultiColumnfalse | ||||
| 	\par\vspace{\formskip}% | ||||
| } | ||||
| 
 | ||||
|  | @ -415,5 +489,20 @@ | |||
| % generate any at all | ||||
| \AtBeginDocument{ | ||||
| \Form[NeedAppearances=false] | ||||
| \PageFoldMarks | ||||
| } | ||||
| 
 | ||||
| \NewDocumentCommand{\PageFoldMarks}{}{ | ||||
| 	\begin{tikzpicture}[remember picture,overlay] | ||||
| 		\draw ($(current page.north west)!0.33!(current page.south west)$) -- ++(5mm,0cm); | ||||
| 		\draw ($(current page.north west)!0.50!(current page.south west)$) -- ++(1cm,0cm); | ||||
| 		\draw ($(current page.north west)!0.66!(current page.south west)$) -- ++(5mm,0cm); | ||||
| 	\end{tikzpicture} | ||||
| } | ||||
| 
 | ||||
| % fold markers | ||||
| \AddToHook{shipout/background}{% | ||||
| 	\PageFoldMarks | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,9 +1,11 @@ | |||
| \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:} | ||||
|  |  | |||
|  | @ -3,16 +3,18 @@ | |||
| \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} | ||||
| 	\TextField{Vor- und Zuname} | ||||
| 	\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{% | ||||
|  | @ -24,6 +26,7 @@ | |||
| \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:} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobody
						nobody