即使\TextField
和\ChoiceMenu
是 行中的第一个对象\noindent
,它们也不会开始于行的开头,而是有一点间隙。为什么?
\documentclass{article}
\usepackage{hyperref}
\usepackage{showframe}
\begin{document}
\begin{Form}[action=mailto:[email protected]?subject={The submitted form},encoding=html, method=post]
\noindent Why doesn't the following field begin at the start of the line?
\vspace{1ex}
\noindent\TextField[name=a,width=5cm,charsize=8pt, height=.5cm]{}
\vspace{4ex}
\noindent Adding \texttt{bordersep=0pt} doesn't help:
\vspace{1ex}
\noindent\TextField[bordersep=0pt,name=b,width=5cm, height=.5cm]{}
\vspace{4ex}
\noindent The same with a choice menu:
\vspace{1ex}
\noindent\ChoiceMenu[combo, name=choice, width=5cm]{}{Choice 1, Choice 2}
\end{Form}
\end{document}
答案1
空间来自
\def\LayoutTextField#1#2{% label, field
#1 #2%
}
如果你这样做了#1#2
,它就会运行,但与“缺少 % 的空格”不同,它显然是故意添加的,所以我不确定这是一个错误还是设计使然,它是一组类似的定义之一
\def\LayoutTextField#1#2{% label, field
#1 #2%
}
\def\LayoutChoiceField#1#2{% label, field
#1 #2%
}
\def\LayoutCheckField#1#2{% label, field
#1 #2%
}