![为什么 \TextField 和 \ChoiceMenu 不从行首开始?](https://linux22.com/image/395166/%E4%B8%BA%E4%BB%80%E4%B9%88%20%5CTextField%20%E5%92%8C%20%5CChoiceMenu%20%E4%B8%8D%E4%BB%8E%E8%A1%8C%E9%A6%96%E5%BC%80%E5%A7%8B%EF%BC%9F.png)
即使\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%
}