fix multiline fields
This commit is contained in:
parent
53a83d838b
commit
24f42ab403
38
cccbform.cls
38
cccbform.cls
|
@ -259,7 +259,7 @@
|
||||||
|
|
||||||
% TextField*{label} - a single-line input (starred version uses all available space)
|
% TextField*{label} - a single-line input (starred version uses all available space)
|
||||||
\RenewDocumentCommand{\TextField}{s m}{%
|
\RenewDocumentCommand{\TextField}{s m}{%
|
||||||
\par%
|
\par\addvspace{1.5\formskip}%
|
||||||
\ifMultiColumn%
|
\ifMultiColumn%
|
||||||
\pgfmathsetmacro{\@tlen}{1.0}%
|
\pgfmathsetmacro{\@tlen}{1.0}%
|
||||||
\else%
|
\else%
|
||||||
|
@ -269,19 +269,19 @@
|
||||||
\fi%
|
\fi%
|
||||||
\begin{tikzpicture}[baseline]
|
\begin{tikzpicture}[baseline]
|
||||||
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
|
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
|
||||||
\node[anchor=west] at (0, 0) {
|
\node[anchor=base west] at (0, 0) {
|
||||||
\full@TextField[\@tlen]
|
\full@TextField[\@tlen]
|
||||||
};
|
};
|
||||||
\node[anchor=west,rotate=\labelangle] at (-1em,0.4\formfieldheight) {
|
\node[anchor=base west,rotate=\labelangle] at (-1em,0.6\formfieldheight) {
|
||||||
\ttfamily\footnotesize #2\strut
|
\ttfamily\footnotesize #2\strut
|
||||||
};
|
};
|
||||||
\end{tikzpicture}%
|
\end{tikzpicture}%
|
||||||
\par\addvspace{1.5\formskip}%
|
\par\addvspace{\formskip}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% ShortTextField[width]{label} - a single-line input with reduced width
|
% ShortTextField[width]{label} - a single-line input with reduced width
|
||||||
\NewDocumentCommand{\ShortTextField}{o m}{%
|
\NewDocumentCommand{\ShortTextField}{o m}{%
|
||||||
\par%
|
\par\addvspace{1.5\formskip}%
|
||||||
\IfValueTF{#1}{\pgfmathsetmacro{\@tlen}{#1}}{%
|
\IfValueTF{#1}{\pgfmathsetmacro{\@tlen}{#1}}{%
|
||||||
\ifMultiColumn%
|
\ifMultiColumn%
|
||||||
\pgfmathsetmacro{\@tlen}{\normalfieldwidth}%
|
\pgfmathsetmacro{\@tlen}{\normalfieldwidth}%
|
||||||
|
@ -291,10 +291,10 @@
|
||||||
}%
|
}%
|
||||||
\begin{tikzpicture}[baseline]
|
\begin{tikzpicture}[baseline]
|
||||||
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
|
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
|
||||||
\node[anchor=west] at (0,0) {
|
\node[anchor=base west] at (0,0) {
|
||||||
\full@TextField[\@tlen]
|
\full@TextField[\@tlen]
|
||||||
};
|
};
|
||||||
\node[anchor=west,rotate=\labelangle] at (-1em,0.4\formfieldheight) {
|
\node[anchor=base west,rotate=\labelangle] at (-1em,0.6\formfieldheight) {
|
||||||
\ttfamily\footnotesize #2\strut
|
\ttfamily\footnotesize #2\strut
|
||||||
};
|
};
|
||||||
\end{tikzpicture}%
|
\end{tikzpicture}%
|
||||||
|
@ -302,8 +302,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
% MultilineTextField*[height]{label} - a multi-line input, starred version uses all available width
|
% MultilineTextField*[height]{label} - a multi-line input, starred version uses all available width
|
||||||
\NewDocumentCommand{\MultilineTextField}{s O{} m}{%
|
\NewDocumentCommand{\MultilineTextField}{s O{\formfieldheight} m}{%
|
||||||
\par\addvspace{\formskip}%
|
\par\addvspace{1.5\formskip}%
|
||||||
\ifMultiColumn%
|
\ifMultiColumn%
|
||||||
\pgfmathsetmacro{\@tlen}{1.0}%
|
\pgfmathsetmacro{\@tlen}{1.0}%
|
||||||
\else%
|
\else%
|
||||||
|
@ -312,11 +312,11 @@
|
||||||
{\pgfmathsetmacro{\@tlen}{\normalfieldwidth}}%
|
{\pgfmathsetmacro{\@tlen}{\normalfieldwidth}}%
|
||||||
\fi%
|
\fi%
|
||||||
\begin{tikzpicture}[baseline]
|
\begin{tikzpicture}[baseline]
|
||||||
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
|
\useasboundingbox (0,0) rectangle (\@tlen\textwidth, #2);
|
||||||
\node[anchor=west] at (0,0) {
|
\node[anchor=base west] at (0,0) {
|
||||||
\full@MultilineTextField<#2>[\@tlen]
|
\full@MultilineTextField<#2>[\@tlen]
|
||||||
};
|
};
|
||||||
\node[anchor=west,rotate=\labelangle] at (-1em,0.4\formfieldheight) {
|
\node[anchor=base west,rotate=\labelangle] at (-1em,#2 - 0.4\formfieldheight) {
|
||||||
\ttfamily\footnotesize #3\strut
|
\ttfamily\footnotesize #3\strut
|
||||||
};
|
};
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
|
@ -325,7 +325,7 @@
|
||||||
|
|
||||||
% 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\addvspace{\formskip}%
|
\par\addvspace{2\formskip}%
|
||||||
\ifMultiColumn%
|
\ifMultiColumn%
|
||||||
\pgfmathsetmacro{\@tlen}{\normalfieldwidth}%
|
\pgfmathsetmacro{\@tlen}{\normalfieldwidth}%
|
||||||
\else%
|
\else%
|
||||||
|
@ -333,26 +333,26 @@
|
||||||
\fi%
|
\fi%
|
||||||
\begin{tikzpicture}[baseline]
|
\begin{tikzpicture}[baseline]
|
||||||
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,1.0cm);
|
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,1.0cm);
|
||||||
\node[anchor=west] at (0,0) {
|
\node[anchor=base west] at (0,0) {
|
||||||
\fake@MultilineTextField<1.0cm>[\@tlen]
|
\fake@MultilineTextField<1.0cm>[\@tlen]
|
||||||
};
|
};
|
||||||
\node[anchor=north west,rotate=\labelangle] at (-1em,1cm -0.4\formfieldheight) {
|
\node[anchor=base west,rotate=\labelangle] at (-1em,1cm - 0.4\formfieldheight) {
|
||||||
\ttfamily\footnotesize #1\strut
|
\ttfamily\footnotesize #1\strut
|
||||||
};
|
};
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
\par\addvspace{2\formskip}%
|
\par\addvspace{\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\addvspace{\formskip}%
|
\par\addvspace{1.5\formskip}%
|
||||||
\pgfmathsetmacro{\@tlen}{1.0}
|
\pgfmathsetmacro{\@tlen}{1.0}
|
||||||
\begin{tikzpicture}[baseline]
|
\begin{tikzpicture}[baseline]
|
||||||
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,1.5cm);
|
\useasboundingbox (0,0) rectangle (\@tlen\textwidth,1.5cm);
|
||||||
\node[anchor=west] at (0,0) {
|
\node[anchor=base west] at (0,0) {
|
||||||
\fake@MultilineTextField<1.5cm>[\@tlen]
|
\fake@MultilineTextField<1.5cm>[\@tlen]
|
||||||
};
|
};
|
||||||
\node[anchor=north west,rotate=\labelangle] at (-1em,1.5cm -0.9\formfieldheight) {
|
\node[anchor=base west,rotate=\labelangle] at (-1em,1.5cm - 0.4\formfieldheight) {
|
||||||
\ttfamily\footnotesize #1\strut
|
\ttfamily\footnotesize #1\strut
|
||||||
};
|
};
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
|
|
14
doku.tex
14
doku.tex
|
@ -297,7 +297,6 @@ end
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Inline-Textfeld
|
\item Inline-Textfeld
|
||||||
\item Grundsätze des aktuellen Designs
|
\item Grundsätze des aktuellen Designs
|
||||||
\item Bug: Höhe Multiline-Textfeld in example
|
|
||||||
\item \TeX-Intro zum Ende, +build info
|
\item \TeX-Intro zum Ende, +build info
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
|
@ -549,26 +548,17 @@ sollte sie immer angegeben werden -- ansonsten hat das Feld die Standard-Höhe
|
||||||
von normalen Textfeldern.
|
von normalen Textfeldern.
|
||||||
|
|
||||||
\begin{ShortExample}{multilinetextfield}{mehrzeiliges Textfeld}
|
\begin{ShortExample}{multilinetextfield}{mehrzeiliges Textfeld}
|
||||||
%%% FIXME bug in preview (works in doc)
|
|
||||||
\Text{}
|
|
||||||
\MultilineTextField[2cm]{Kringel}
|
\MultilineTextField[2cm]{Kringel}
|
||||||
\Text{}
|
|
||||||
\end{ShortExample}
|
\end{ShortExample}
|
||||||
|
|
||||||
\begin{ShortExample}{multilinetextfieldbad}{einzeiliges mehrzeiliges Textfeld}
|
\begin{ShortExample}{multilinetextfieldbad}{einzeiliges mehrzeiliges Textfeld}
|
||||||
%%% FIXME bug in preview (works in doc)
|
|
||||||
\Text{}
|
|
||||||
\MultilineTextField{Kringel}
|
\MultilineTextField{Kringel}
|
||||||
\Text{}
|
|
||||||
\end{ShortExample}
|
\end{ShortExample}
|
||||||
|
|
||||||
Auch hier gibt es wieder die Variante mit Stern für volle Breite:
|
Auch hier gibt es wieder die Variante mit Stern für volle Breite:
|
||||||
|
|
||||||
\begin{ShortExample}{multilinetextfieldstar}{breites mehrzeiliges Textfeld}
|
\begin{ShortExample}{multilinetextfieldstar}{breites mehrzeiliges Textfeld}
|
||||||
%%% FIXME bug in preview (works in doc)
|
|
||||||
\Text{}
|
|
||||||
\MultilineTextField*[2cm]{Kringel}
|
\MultilineTextField*[2cm]{Kringel}
|
||||||
\Text{}
|
|
||||||
\end{ShortExample}
|
\end{ShortExample}
|
||||||
|
|
||||||
\paragraph{Spezialfälle} Unterschriften sollen üblicherweise händisch gesetzt
|
\paragraph{Spezialfälle} Unterschriften sollen üblicherweise händisch gesetzt
|
||||||
|
@ -593,17 +583,13 @@ Das Label kann optional geändert werden.
|
||||||
Ebenfalls gibt es ein etwas größeres Feld für Notizen oder Vermerke.
|
Ebenfalls gibt es ein etwas größeres Feld für Notizen oder Vermerke.
|
||||||
|
|
||||||
\begin{ShortExample}{notes}{großes Feld}
|
\begin{ShortExample}{notes}{großes Feld}
|
||||||
%%% FIXME bug in preview (works in doc)
|
|
||||||
\Notes
|
\Notes
|
||||||
\Text{}
|
|
||||||
\end{ShortExample}
|
\end{ShortExample}
|
||||||
|
|
||||||
Auch hier kann optional das Label geändert werden.
|
Auch hier kann optional das Label geändert werden.
|
||||||
|
|
||||||
\begin{ShortExample}{notesopt}{großes Feld}
|
\begin{ShortExample}{notesopt}{großes Feld}
|
||||||
%%% FIXME bug in preview (works in doc)
|
|
||||||
\Notes[Stirnabdruck]
|
\Notes[Stirnabdruck]
|
||||||
\Text{}
|
|
||||||
\end{ShortExample}
|
\end{ShortExample}
|
||||||
|
|
||||||
\subsection{Checkboxen}
|
\subsection{Checkboxen}
|
||||||
|
|
Loading…
Reference in a new issue