![表格:表格中的 TextField 和 digsigfield](https://linux22.com/image/388779/%E8%A1%A8%E6%A0%BC%EF%BC%9A%E8%A1%A8%E6%A0%BC%E4%B8%AD%E7%9A%84%20TextField%20%E5%92%8C%20digsigfield.png)
注意:问题类似于形式:TextField 和 digsigfield 的表格排列
我使用 Martin Lottermoser 的 digsig.sty http://home.htp-tel.de/lottermose2/tex/dist/digsig.sty
我怎样才能尽可能无缝地以这种形状排列两个“TextField”和一个digsigfield?
我认为,我必须设置一个正确的值到
\renewcommand{\tabcolsep}{\dimexpr 0\fboxsep+1\fboxrule+\arrayrulewidth}
?
顺便提一句:我必须用表格来实现这一点,因为图片只是一种可能的特殊情况。
实际的:
\documentclass[fontsize=14pt]{scrreprt}
\usepackage[margin=1.75cm,
includefoot,
showframe=false
%headheight=2\baselineskip,
]{geometry}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{calc}
\usepackage[]{hyperref}
\usepackage{digsig}
\begin{document}
\begin{Form}
\setlength\arrayrulewidth{1pt}
\setlength\fboxrule{\arrayrulewidth}
\setlength{\fboxsep}{0pt}
\renewcommand{\tabcolsep}{\dimexpr 0\fboxsep+1\fboxrule+\arrayrulewidth}
\noindent\begin{tabularx}{\textwidth}{b{0.5\textwidth} X }
\noindent\color{blue}\fbox{\noindent\digsigfield{0.5\textwidth}{10cm}{test}} & \TextField[multiline,borderstyle=S, value=Text 1, height=10cm]{}\\
\TextField[multiline,borderstyle=S, value=Text 2, height=7cm, width=\textwidth]{}{}
\end{tabularx}
\end{Form}
\end{document}
答案1
文本字段必须有一个名称!
\documentclass[fontsize=14pt]{scrreprt}
\usepackage[margin=1.75cm,
includefoot,
showframe=false
%headheight=2\baselineskip,
]{geometry}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{calc}
\usepackage[]{hyperref}
\usepackage{digsig}
\usepackage{tikz}
\begin{document}
\begin{Form}
\def\LayoutTextField#1#2{#2} % yes you need this
\setlength\arrayrulewidth{1pt}
\setlength\fboxrule{\arrayrulewidth}
\setlength{\fboxsep}{0pt}
\renewcommand{\tabcolsep}{0.5\fboxrule}
\noindent\begin{tabularx}{\textwidth}{b{0.5\textwidth} X }
\noindent\color{blue}\fbox{\noindent\digsigfield{\dimexpr0.5\textwidth-2\fboxrule}{10cm}{test}} &
\noindent\TextField[name=box1,multiline,borderstyle=S, value=Text 1, height=10cm]{}\\[-0.3\normalbaselineskip]
\hspace{\fboxrule}\TextField[name=box2,multiline,borderstyle=S,
value=Text 2, height=7cm, width=\textwidth]{}{}
\end{tabularx}
\end{Form}
\end{document}