fix multiline fields
This commit is contained in:
		
							parent
							
								
									53a83d838b
								
							
						
					
					
						commit
						24f42ab403
					
				
					 2 changed files with 19 additions and 33 deletions
				
			
		
							
								
								
									
										38
									
								
								cccbform.cls
									
										
									
									
									
								
							
							
						
						
									
										38
									
								
								cccbform.cls
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -259,7 +259,7 @@
 | 
			
		|||
 | 
			
		||||
% TextField*{label} - a single-line input (starred version uses all available space)
 | 
			
		||||
\RenewDocumentCommand{\TextField}{s m}{%
 | 
			
		||||
	\par%
 | 
			
		||||
	\par\addvspace{1.5\formskip}%
 | 
			
		||||
	\ifMultiColumn%
 | 
			
		||||
		\pgfmathsetmacro{\@tlen}{1.0}%
 | 
			
		||||
	\else%
 | 
			
		||||
| 
						 | 
				
			
			@ -269,19 +269,19 @@
 | 
			
		|||
	\fi%
 | 
			
		||||
	\begin{tikzpicture}[baseline]
 | 
			
		||||
		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
 | 
			
		||||
		\node[anchor=west] at (0, 0) {
 | 
			
		||||
		\node[anchor=base west] at (0, 0) {
 | 
			
		||||
			\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
 | 
			
		||||
		};
 | 
			
		||||
	\end{tikzpicture}%
 | 
			
		||||
	\par\addvspace{1.5\formskip}%
 | 
			
		||||
	\par\addvspace{\formskip}%
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
% ShortTextField[width]{label} - a single-line input with reduced width
 | 
			
		||||
\NewDocumentCommand{\ShortTextField}{o m}{%
 | 
			
		||||
	\par%
 | 
			
		||||
	\par\addvspace{1.5\formskip}%
 | 
			
		||||
	\IfValueTF{#1}{\pgfmathsetmacro{\@tlen}{#1}}{%
 | 
			
		||||
		\ifMultiColumn%
 | 
			
		||||
			\pgfmathsetmacro{\@tlen}{\normalfieldwidth}%
 | 
			
		||||
| 
						 | 
				
			
			@ -291,10 +291,10 @@
 | 
			
		|||
	}%
 | 
			
		||||
	\begin{tikzpicture}[baseline]
 | 
			
		||||
		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
 | 
			
		||||
		\node[anchor=west] at (0,0) {
 | 
			
		||||
		\node[anchor=base west] at (0,0) {
 | 
			
		||||
			\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
 | 
			
		||||
		};
 | 
			
		||||
	\end{tikzpicture}%
 | 
			
		||||
| 
						 | 
				
			
			@ -302,8 +302,8 @@
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
% MultilineTextField*[height]{label} - a multi-line input, starred version uses all available width
 | 
			
		||||
\NewDocumentCommand{\MultilineTextField}{s O{} m}{%
 | 
			
		||||
	\par\addvspace{\formskip}%
 | 
			
		||||
\NewDocumentCommand{\MultilineTextField}{s O{\formfieldheight} m}{%
 | 
			
		||||
	\par\addvspace{1.5\formskip}%
 | 
			
		||||
	\ifMultiColumn%
 | 
			
		||||
		\pgfmathsetmacro{\@tlen}{1.0}%
 | 
			
		||||
	\else%
 | 
			
		||||
| 
						 | 
				
			
			@ -312,11 +312,11 @@
 | 
			
		|||
			{\pgfmathsetmacro{\@tlen}{\normalfieldwidth}}%
 | 
			
		||||
	\fi%
 | 
			
		||||
	\begin{tikzpicture}[baseline]
 | 
			
		||||
		\useasboundingbox (0,0) rectangle (\@tlen\textwidth,\formfieldheight);
 | 
			
		||||
		\node[anchor=west] at (0,0) {
 | 
			
		||||
		\useasboundingbox (0,0) rectangle (\@tlen\textwidth, #2);
 | 
			
		||||
		\node[anchor=base west] at (0,0) {
 | 
			
		||||
			\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
 | 
			
		||||
		};
 | 
			
		||||
	\end{tikzpicture}
 | 
			
		||||
| 
						 | 
				
			
			@ -325,7 +325,7 @@
 | 
			
		|||
 | 
			
		||||
% Signature[label] - a field not fillable on the computer, big enough for a signature
 | 
			
		||||
\NewDocumentCommand{\Signature}{O{Datum, Unterschrift}}{%
 | 
			
		||||
	\par\addvspace{\formskip}%
 | 
			
		||||
	\par\addvspace{2\formskip}%
 | 
			
		||||
	\ifMultiColumn%
 | 
			
		||||
		\pgfmathsetmacro{\@tlen}{\normalfieldwidth}%
 | 
			
		||||
	\else%
 | 
			
		||||
| 
						 | 
				
			
			@ -333,26 +333,26 @@
 | 
			
		|||
	\fi%
 | 
			
		||||
	\begin{tikzpicture}[baseline]
 | 
			
		||||
		\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]
 | 
			
		||||
		};
 | 
			
		||||
		\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
 | 
			
		||||
		};
 | 
			
		||||
	\end{tikzpicture}
 | 
			
		||||
	\par\addvspace{2\formskip}%
 | 
			
		||||
	\par\addvspace{\formskip}%
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
% Notes[label] - a slightly taller fake field that fills the whole width
 | 
			
		||||
\NewDocumentCommand{\Notes}{O{Vermerke}}{%
 | 
			
		||||
	\par\addvspace{\formskip}%
 | 
			
		||||
	\par\addvspace{1.5\formskip}%
 | 
			
		||||
	\pgfmathsetmacro{\@tlen}{1.0}
 | 
			
		||||
	\begin{tikzpicture}[baseline]
 | 
			
		||||
		\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]
 | 
			
		||||
		};
 | 
			
		||||
		\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
 | 
			
		||||
		};
 | 
			
		||||
	\end{tikzpicture}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								doku.tex
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								doku.tex
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -297,7 +297,6 @@ end
 | 
			
		|||
\begin{itemize}
 | 
			
		||||
\item Inline-Textfeld
 | 
			
		||||
\item Grundsätze des aktuellen Designs
 | 
			
		||||
\item Bug: Höhe Multiline-Textfeld in example
 | 
			
		||||
\item \TeX-Intro zum Ende, +build info
 | 
			
		||||
\end{itemize}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -549,26 +548,17 @@ sollte sie immer angegeben werden -- ansonsten hat das Feld die Standard-Höhe
 | 
			
		|||
von normalen Textfeldern.
 | 
			
		||||
 | 
			
		||||
\begin{ShortExample}{multilinetextfield}{mehrzeiliges Textfeld}
 | 
			
		||||
%%% FIXME bug in preview (works in doc)
 | 
			
		||||
\Text{}
 | 
			
		||||
\MultilineTextField[2cm]{Kringel}
 | 
			
		||||
\Text{}
 | 
			
		||||
\end{ShortExample}
 | 
			
		||||
 | 
			
		||||
\begin{ShortExample}{multilinetextfieldbad}{einzeiliges mehrzeiliges Textfeld}
 | 
			
		||||
%%% FIXME bug in preview (works in doc)
 | 
			
		||||
\Text{}
 | 
			
		||||
\MultilineTextField{Kringel}
 | 
			
		||||
\Text{}
 | 
			
		||||
\end{ShortExample}
 | 
			
		||||
 | 
			
		||||
Auch hier gibt es wieder die Variante mit Stern für volle Breite:
 | 
			
		||||
 | 
			
		||||
\begin{ShortExample}{multilinetextfieldstar}{breites mehrzeiliges Textfeld}
 | 
			
		||||
%%% FIXME bug in preview (works in doc)
 | 
			
		||||
\Text{}
 | 
			
		||||
\MultilineTextField*[2cm]{Kringel}
 | 
			
		||||
\Text{}
 | 
			
		||||
\end{ShortExample}
 | 
			
		||||
 | 
			
		||||
\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.
 | 
			
		||||
 | 
			
		||||
\begin{ShortExample}{notes}{großes Feld}
 | 
			
		||||
%%% FIXME bug in preview (works in doc)
 | 
			
		||||
\Notes
 | 
			
		||||
\Text{}
 | 
			
		||||
\end{ShortExample}
 | 
			
		||||
 | 
			
		||||
Auch hier kann optional das Label geändert werden.
 | 
			
		||||
 | 
			
		||||
\begin{ShortExample}{notesopt}{großes Feld}
 | 
			
		||||
%%% FIXME bug in preview (works in doc)
 | 
			
		||||
\Notes[Stirnabdruck]
 | 
			
		||||
\Text{}
 | 
			
		||||
\end{ShortExample}
 | 
			
		||||
 | 
			
		||||
\subsection{Checkboxen}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue