0

i am working on a tex-file that looks something like this:

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{caption}
\usepackage{amssymb}
\usepackage{hyperref} 
\usepackage{graphicx}
\usepackage{float}
\usepackage{floatflt}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{wrapfig}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} 
\renewcommand*{\DefaultHeightofTextMultiline}{6\baselineskip} 
\renewcommand*{\LayoutTextField}[2]{\makebox[3.5cm][l]{#1: }%
  \raisebox{\baselineskip}{\raisebox{-\height}{#2}}}
\def\LayoutChoiceField#1#2{\makebox[6em][l]{#1: }#2}
\newdimen\longline
\longline=\textwidth\advance\longline-6em

\begin{document}
\begin{Form}

\TextField[name=Beschreibung,multiline=true,height=8\baselineskip,
width=\longline,borderwidth=0,backgroundcolor={.85 .85 .85}]
{\textbf{foobar foobar foobar foobar foobar foobar foobar foobar }}\vskip2ex
\end{Form}
\end{document}

As you can see the foobar text doesn't align on the left side, but instead goes under the textfield. I tried to use a break, but this doesn't work. I'd be glad if you could help me.

0

I am not sure that I understand what output you want, but perhaps you mean

enter image description here

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{caption}
\usepackage{amssymb}
\usepackage{hyperref} 
\usepackage{graphicx}
\usepackage{float}
\usepackage{floatflt}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{wrapfig}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} 
\renewcommand*{\DefaultHeightofTextMultiline}{6\baselineskip} 
\renewcommand*{\LayoutTextField}[2]{\makebox[3.5cm][l]{#1: }%
  \raisebox{\baselineskip}{\raisebox{-\height}{#2}}}
\def\LayoutChoiceField#1#2{\makebox[6em][l]{#1: }#2}
\newdimen\longline
\longline=\textwidth\advance\longline-6em

\begin{document}
\begin{Form}

\TextField[name=Beschreibung,multiline=true,height=8\baselineskip,
width=\longline,borderwidth=0,backgroundcolor={.85 .85 .85}]
{\textbf{\parbox[t]{3cm}{\raggedleft foobar foobar foobar foobar foobar foobar foobar foobar}}}%
\vspace{2ex}%
\end{Form}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.