我有一个文本字段的表格排列。
是否有一种简单的方法可以动态地扩大下面的文本字段直到页面末尾?
\documentclass[fontsize=14pt]{scrreprt}
\usepackage[margin=1.75cm,
includefoot, includehead,
showframe=false
headheight=2\baselineskip,
]{geometry}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{calc}
\usepackage[ headsepline,footsepline]{scrlayer-scrpage}
\chead{Some stuff here... \\ Some stuff there...}
\usepackage[]{hyperref}
\begin{document}
Some stuff here...
\bigskip
Please describe:\par
\begin{Form}
\def\LayoutTextField#1#2{#2} % yes you need this
\setlength\arrayrulewidth{1pt}
\renewcommand{\tabcolsep}{0.5\fboxrule}
\noindent\begin{tabularx}{\textwidth}{b{0.5\textwidth} X }
\TextField[name=box0,multiline,borderstyle=S, value=Text 0,width=0.5\textwidth, height=10cm]{}
&
\noindent\TextField[name=box1,multiline,borderstyle=S, value=Text 1,width=0.5\textwidth, height=10cm]{}
\\[-0.3\normalbaselineskip]
\TextField[name=box2,multiline,borderstyle=S,
value=Text 2, height=10cm, width=\textwidth]{}{}
\end{tabularx}
\end{Form}
\end{document}
答案1
\documentclass[fontsize=14pt]{scrreprt}
\usepackage[margin=1.75cm,
includefoot, includehead,
showframe=true,
headheight=2\baselineskip,
]{geometry}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{calc}
\usepackage[ headsepline,footsepline]{scrlayer-scrpage}
\chead{Some stuff here... \\ Some stuff there...}
\usepackage[]{hyperref}
\newcommand\fieldheight{}
\begin{document}
Some stuff here...
\bigskip
Please describe:\par
\edef\fieldheight{\the\dimexpr\pagegoal-\pagetotal-10cm\relax}
\begin{Form}
\def\LayoutTextField#1#2{#2}% % yes you need this
\setlength\arrayrulewidth{1pt}%
\renewcommand{\tabcolsep}{0.5\fboxrule}%
\noindent\begin{tabularx}{\textwidth}{b{0.5\textwidth} X }
\TextField[name=box0,multiline,borderstyle=S, value=Text 0,width=0.5\textwidth, height=10cm]{}
&
\noindent\TextField[name=box1,multiline,borderstyle=S, value=Text 1,width=0.5\textwidth, height=10cm]{}
\\[-0.3\normalbaselineskip]
\TextField[name=box2,multiline,borderstyle=S,
value=Text 2, height=\fieldheight, width=\textwidth]{}{}
\end{tabularx}
\end{Form}
\end{document}