v3, improved design
This commit is contained in:
parent
f5e0ce047a
commit
4fc9a75d12
89
cccbform.cls
89
cccbform.cls
|
@ -24,11 +24,11 @@
|
||||||
Scale=0.9,
|
Scale=0.9,
|
||||||
UprightFeatures={
|
UprightFeatures={
|
||||||
RawFeature={+ss01,+ss02,+ss08,+case},
|
RawFeature={+ss01,+ss02,+ss08,+case},
|
||||||
RawFeature={+axis={MONO=0.2,CASL=0.2,slnt=0,CRSV=0,wght=400}}
|
RawFeature={+axis={MONO=0.0,CASL=0.2,slnt=0,CRSV=0,wght=400}}
|
||||||
},
|
},
|
||||||
BoldFeatures={RawFeature={+axis={MONO=0.2,CASL=0.2,slnt=0,CRSV=0,wght=700}}},
|
BoldFeatures={RawFeature={+axis={MONO=0.0,CASL=0.2,slnt=0,CRSV=0,wght=700}}},
|
||||||
BoldItalicFeatures={RawFeature={+axis={MONO=0.2,CASL=0.2,slnt=-15,CRSV=1,wght=700}}},
|
BoldItalicFeatures={RawFeature={+axis={MONO=0.0,CASL=0.2,slnt=-15,CRSV=1,wght=700}}},
|
||||||
ItalicFeatures={RawFeature={+axis={MONO=0.2,CASL=0.2,slnt=-15,CRSV=1,wght=400}}}
|
ItalicFeatures={RawFeature={+axis={MONO=0.0,CASL=0.2,slnt=-15,CRSV=1,wght=400}}}
|
||||||
]{Recursive}
|
]{Recursive}
|
||||||
|
|
||||||
\setmonofont[
|
\setmonofont[
|
||||||
|
@ -54,11 +54,11 @@
|
||||||
Scale=0.9,
|
Scale=0.9,
|
||||||
UprightFeatures={
|
UprightFeatures={
|
||||||
RawFeature={+ss01,+ss02,+ss08,+case},
|
RawFeature={+ss01,+ss02,+ss08,+case},
|
||||||
RawFeature={+axis={MONO=0.0,CASL=1.0,slnt=-5,CRSV=1,wght=500}}
|
RawFeature={+axis={MONO=0.0,CASL=0.4,slnt=0,CRSV=1,wght=500}}
|
||||||
},
|
},
|
||||||
BoldFeatures={RawFeature={+axis={MONO=0.0,CASL=1.0,slnt=-5,CRSV=1,wght=800}}},
|
BoldFeatures={RawFeature={+axis={MONO=0.0,CASL=0.4,slnt=0,CRSV=1,wght=800}}},
|
||||||
BoldItalicFeatures={RawFeature={+axis={MONO=0.0,CASL=1.0,slnt=-15,CRSV=1,wght=800}}},
|
BoldItalicFeatures={RawFeature={+axis={MONO=0.0,CASL=0.4,slnt=-15,CRSV=1,wght=800}}},
|
||||||
ItalicFeatures={RawFeature={+axis={MONO=0.0,CASL=1.0,slnt=-15,CRSV=1,wght=500}}}
|
ItalicFeatures={RawFeature={+axis={MONO=0.0,CASL=0.4,slnt=-15,CRSV=1,wght=500}}}
|
||||||
]{Recursive}
|
]{Recursive}
|
||||||
|
|
||||||
% fonts
|
% fonts
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
%\setmainfont{Ubuntu Mono} % 0 / 3.0 / 0 / 0 / 3.12 / 6.0 / 0 || -5
|
%\setmainfont{Ubuntu Mono} % 0 / 3.0 / 0 / 0 / 3.12 / 6.0 / 0 || -5
|
||||||
|
|
||||||
% colors
|
% colors
|
||||||
\definecolor{fieldcolor}{gray}{0.8}
|
\definecolor{fieldcolor}{gray}{0.85}
|
||||||
\definecolor{bordercolor}{gray}{0.1}
|
\definecolor{bordercolor}{gray}{0.1}
|
||||||
|
|
||||||
% lengths
|
% lengths
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
\let\CheckBox\relax
|
\let\CheckBox\relax
|
||||||
|
|
||||||
% wrapped form fields with defaults filled in
|
% wrapped form fields with defaults filled in
|
||||||
\NewDocumentCommand{\form@TextField}{O{\formfieldheight} m}{%
|
\NewDocumentCommand{\form@TextField}{D<>{\formfieldheight} O{1.0}}{%
|
||||||
\stepcounter{fieldnum}
|
\stepcounter{fieldnum}
|
||||||
\expandafter\raw@TextField\expandafter[\@formdefaults,
|
\expandafter\raw@TextField\expandafter[\@formdefaults,
|
||||||
name=\@autofieldname,
|
name=\@autofieldname,
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
]{}%
|
]{}%
|
||||||
}
|
}
|
||||||
|
|
||||||
\NewDocumentCommand{\form@MultilineTextField}{O{\formfieldheight} m}{%
|
\NewDocumentCommand{\form@MultilineTextField}{D<>{\formfieldheight} O{1.0}}{%
|
||||||
\stepcounter{fieldnum}
|
\stepcounter{fieldnum}
|
||||||
\expandafter\raw@TextField\expandafter[\@formdefaults,
|
\expandafter\raw@TextField\expandafter[\@formdefaults,
|
||||||
name=\@autofieldname,
|
name=\@autofieldname,
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
% fake form fields to put *under* the PDF form fields
|
% fake form fields to put *under* the PDF form fields
|
||||||
\NewDocumentCommand{\fake@TextField}{O{\formfieldheight} m}{%
|
\NewDocumentCommand{\fake@TextField}{D<>{\formfieldheight} O{1.0}}{%
|
||||||
\begin{tikzpicture}[baseline=0.6ex]
|
\begin{tikzpicture}[baseline=0.6ex]
|
||||||
\fill[fieldcolor]
|
\fill[fieldcolor]
|
||||||
(0,0) rectangle (#2\linewidth - 2\borderwidth,#1);
|
(0,0) rectangle (#2\linewidth - 2\borderwidth,#1);
|
||||||
|
@ -190,24 +190,24 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
% "full" stacked version of fake + actual form field
|
% "full" stacked version of fake + actual form field
|
||||||
\NewDocumentCommand{\full@TextField}{O{\formfieldheight} m}{%
|
\NewDocumentCommand{\full@TextField}{D<>{\formfieldheight} O{1.0}}{%
|
||||||
\begin{tikzpicture}[baseline]
|
\begin{tikzpicture}[baseline]
|
||||||
\node (background) [anchor=base west, inner sep=0pt, outer sep=0pt] at (0,0) {
|
\node (background) [anchor=base west, inner sep=0pt, outer sep=0pt] at (0,0) {
|
||||||
\fake@TextField[#1]{#2}
|
\fake@TextField<#1>[#2]
|
||||||
};
|
};
|
||||||
\node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) {
|
\node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) {
|
||||||
\kern\hadj\form@TextField[#1]{#2}
|
\kern\hadj\form@TextField<#1>[#2]
|
||||||
};
|
};
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
}
|
}
|
||||||
|
|
||||||
\NewDocumentCommand{\full@MultilineTextField}{O{\formfieldheight} m}{%
|
\NewDocumentCommand{\full@MultilineTextField}{D<>{\formfieldheight} O{1.0}}{%
|
||||||
\begin{tikzpicture}[baseline]
|
\begin{tikzpicture}[baseline]
|
||||||
\node (background) [anchor=base west, inner sep=0pt, outer sep=0pt] at (0,0) {
|
\node (background) [anchor=base west, inner sep=0pt, outer sep=0pt] at (0,0) {
|
||||||
\fake@MultilineTextField[#1]{#2}
|
\fake@MultilineTextField<#1>[#2]
|
||||||
};
|
};
|
||||||
\node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) {
|
\node[anchor=center, inner sep=0pt, outer sep=0pt] at (background.center) {
|
||||||
\kern\hadj\form@MultilineTextField[#1]{#2}
|
\kern\hadj\form@MultilineTextField<#1>[#2]
|
||||||
};
|
};
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
}
|
}
|
||||||
|
@ -231,43 +231,43 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
% TextField{label} - a single-line input
|
% TextField{label} - a single-line input
|
||||||
\RenewDocumentCommand{\TextField}{m}{%
|
\RenewDocumentCommand{\TextField}{s m}{%
|
||||||
\par%
|
\par%
|
||||||
{\small #1\strut}\\%
|
{\ttfamily\footnotesize #2\strut}\\%
|
||||||
\full@TextField{}%
|
\IfBooleanTF{#1}{\full@TextField}{\full@TextField[0.7]}%
|
||||||
\par\vspace{\formskip}%
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% ShortTextField[width]{label} - a single-line input that doesn't have full width
|
% ShortTextField[width]{label} - a single-line input that doesn't have full width
|
||||||
% (50% by default)
|
% (50% by default)
|
||||||
\NewDocumentCommand{\ShortTextField}{O{0.5} m}{%
|
\NewDocumentCommand{\ShortTextField}{O{0.35} m}{%
|
||||||
\par%
|
\par%
|
||||||
{\small #2\strut}\\%
|
{\ttfamily\footnotesize #2\strut}\\%
|
||||||
\full@TextField{#1}%
|
\full@TextField[#1]%
|
||||||
\par\vspace{\formskip}%
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% MultilineTextField[height]{label} - a multi-line input
|
% MultilineTextField[height]{label} - a multi-line input
|
||||||
\NewDocumentCommand{\MultilineTextField}{O{} m}{%
|
\NewDocumentCommand{\MultilineTextField}{s O{} m}{%
|
||||||
\par%
|
\par%
|
||||||
{\small #2\strut}\\%
|
{\ttfamily\footnotesize #3\strut}\\%
|
||||||
\full@MultilineTextField[#1]{}%
|
\IfBooleanTF{#1}{\full@MultilineTextField<#2>}{\full@MultilineTextField<#2>[0.7]}%
|
||||||
\par\vspace{\formskip}%
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% Signature[label] - a field not fillable on the computer, big enough for a signature
|
% Signature[label] - a field not fillable on the computer, big enough for a signature
|
||||||
\NewDocumentCommand{\Signature}{O{Datum, Unterschrift}}{%
|
\NewDocumentCommand{\Signature}{O{Datum, Unterschrift}}{%
|
||||||
\par%
|
\par%
|
||||||
{\small #1\strut}\\%
|
{\ttfamily\footnotesize #1\strut}\\%
|
||||||
\fake@MultilineTextField[1.0cm]{0.5}%
|
\fake@MultilineTextField<1.0cm>[0.35]%
|
||||||
\par\vspace{\formskip}%
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% Notes[label] - a slightly taller fake field that fills the whole width
|
% Notes[label] - a slightly taller fake field that fills the whole width
|
||||||
\NewDocumentCommand{\Notes}{O{Vermerke}}{%
|
\NewDocumentCommand{\Notes}{O{Vermerke}}{%
|
||||||
\par%
|
\par%
|
||||||
{\small #1\strut}\\%
|
{\ttfamily\footnotesize #1\strut}\\%
|
||||||
\fake@MultilineTextField[1.5cm]{}%
|
\fake@MultilineTextField<1.5cm>%
|
||||||
\par\vspace{\formskip}%
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,9 +285,9 @@
|
||||||
\NewDocumentCommand{\InlineCheckbox}{}{\full@CheckBox}
|
\NewDocumentCommand{\InlineCheckbox}{}{\full@CheckBox}
|
||||||
|
|
||||||
% CheckboxOther[width]{label} - a checkbox for a write-in option
|
% CheckboxOther[width]{label} - a checkbox for a write-in option
|
||||||
\NewDocumentCommand{\CheckboxOther}{O{0.5} m}{%
|
\NewDocumentCommand{\CheckboxOther}{O{0.35} m}{%
|
||||||
\par%
|
\par%
|
||||||
\full@CheckBox\quad#2\quad\full@TextField{#1}%
|
\full@CheckBox\quad#2\quad\full@TextField[#1]%
|
||||||
\par\vspace{\formskip}%
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@
|
||||||
% (e.g. to separate public / internal sections of a form)
|
% (e.g. to separate public / internal sections of a form)
|
||||||
\NewDocumentCommand{\RuleSection}{m}{%
|
\NewDocumentCommand{\RuleSection}{m}{%
|
||||||
\vspace{\formskip}%
|
\vspace{\formskip}%
|
||||||
\leavevmode\rule{\linewidth}{\borderwidth}\\%
|
\leavevmode\rule{\linewidth}{\borderwidth}\\[-1ex]%
|
||||||
{\details{#1}}%
|
{\details{#1}}%
|
||||||
\par\vspace{2\formskip}
|
\par\vspace{2\formskip}
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@
|
||||||
\begin{minipage}[t]{0.5\linewidth - 0.5\colsep}%
|
\begin{minipage}[t]{0.5\linewidth - 0.5\colsep}%
|
||||||
#2%
|
#2%
|
||||||
\end{minipage}%
|
\end{minipage}%
|
||||||
\par
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
\NewDocumentCommand{\ThreeColumns}{m m m}{%
|
\NewDocumentCommand{\ThreeColumns}{m m m}{%
|
||||||
|
@ -354,7 +354,7 @@
|
||||||
\begin{minipage}[t]{0.333\linewidth - 0.66\colsep}%
|
\begin{minipage}[t]{0.333\linewidth - 0.66\colsep}%
|
||||||
#3%
|
#3%
|
||||||
\end{minipage}%
|
\end{minipage}%
|
||||||
\par
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
\NewDocumentCommand{\FiveColumns}{m m m m m}{%
|
\NewDocumentCommand{\FiveColumns}{m m m m m}{%
|
||||||
|
@ -377,7 +377,7 @@
|
||||||
\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}%
|
\begin{minipage}[t]{0.2\linewidth - 0.8\colsep}%
|
||||||
#5%
|
#5%
|
||||||
\end{minipage}%
|
\end{minipage}%
|
||||||
\par
|
\par\vspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% details{text} - (use instead of font sizes, small text)
|
% details{text} - (use instead of font sizes, small text)
|
||||||
|
@ -387,20 +387,27 @@
|
||||||
|
|
||||||
% % % common title patterns
|
% % % common title patterns
|
||||||
|
|
||||||
% LogoTitle{title} - logo on the right, title on the left
|
% put the logo in the top right corner
|
||||||
\NewDocumentCommand{\LogoTitle}{m}{
|
\NewDocumentCommand{\@logo}{}{
|
||||||
\begin{tikzpicture}[remember picture, overlay]
|
\begin{tikzpicture}[remember picture, overlay]
|
||||||
\node[anchor=north east] at (current page.north east) [xshift=-1.5cm, yshift=-1.5cm] {%
|
\node[anchor=north east] at (current page.north east) [xshift=-1.5cm, yshift=-1.5cm] {%
|
||||||
\includegraphics[width=3cm]{logo.pdf}%
|
\includegraphics[width=3cm]{logo.pdf}%
|
||||||
};
|
};
|
||||||
\end{tikzpicture}%
|
\end{tikzpicture}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% LogoTitle{title} - logo on the right, title on the left
|
||||||
|
\NewDocumentCommand{\LogoTitle}{m}{
|
||||||
|
\@logo
|
||||||
\\[1cm]{\titlefont\huge\bfseries #1}\\[1.5cm]
|
\\[1cm]{\titlefont\huge\bfseries #1}\\[1.5cm]
|
||||||
}
|
}
|
||||||
|
|
||||||
% AddressTitle{title} - title at the top, address, then the form below
|
% AddressTitle{title} - title at the top, address, then the form below
|
||||||
\NewDocumentCommand{\AddressTitle}{m}{
|
% AddressTitle*{title} - same, plus logo
|
||||||
|
\NewDocumentCommand{\AddressTitle}{s m}{
|
||||||
|
\IfBooleanT{#1}{\@logo}
|
||||||
\@dinaddress
|
\@dinaddress
|
||||||
\\[1cm]\smash{{\titlefont\huge\bfseries #1}}\\[4cm]
|
\\[1cm]\smash{{\titlefont\huge\bfseries #2}}\\[4cm]
|
||||||
}
|
}
|
||||||
|
|
||||||
% need to emit \Form ; hyperref generates incomplete CheckBox appearance data,
|
% need to emit \Form ; hyperref generates incomplete CheckBox appearance data,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
\documentclass{cccbform}
|
\documentclass{cccbform}
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\AddressTitle{Antrag auf Erstattung von Auslagen}
|
\AddressTitle*{Antrag auf Erstattung von Auslagen}
|
||||||
\TextField{Name}
|
\TextField{Name}
|
||||||
\TextField{Verwendungszweck}
|
\TextField{Verwendungszweck}
|
||||||
\TextField{Erstattungsbetrag}
|
\TextField{Erstattungsbetrag}
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
\RuleSection{Miss- oder Vertrauenspersonen}
|
\RuleSection{Miss- oder Vertrauenspersonen}
|
||||||
\Text{Die folgenden Aktiven sind für eine Aufnahme:}
|
\Text{Die folgenden Aktiven sind für eine Aufnahme:}
|
||||||
\TwoColumns{
|
\TwoColumns{
|
||||||
\TextField{\#1}
|
\TextField*{\#1}
|
||||||
}{
|
}{
|
||||||
\TextField{\#2}
|
\TextField*{\#2}
|
||||||
}
|
}
|
||||||
\RuleSection{Vorstand}
|
\RuleSection{Vorstand}
|
||||||
\TwoColumns{
|
\TwoColumns{
|
||||||
|
|
Loading…
Reference in a new issue