\uline 和 \hspace 不会在换行开头呈现

\uline 和 \hspace 不会在换行开头呈现

不知道发生了什么。似乎\ulinewith only\hspace不会在换行开头渲染 if。

\documentclass[12pt]{article}

\usepackage{geometry}
\usepackage{mathptmx}
\usepackage{parskip}
\usepackage{ulem}

\geometry{a4paper, margin = 1in}

\begin{document}

This Non-Disclosure and Confidentially Agreement (the ``Agreement``) is entered into as of \uline{\hspace{1in}}, 20\uline{\hspace{0.5in}} (the ``Effective Date``) by and between:

\end{document}

是的,我知道我可以实现类似的目标\makebox[1in]{\hrulefill}(必须弄清楚如何降低它),但仍然好奇为什么这种\uline方法不起作用。

谢谢你!

答案1

\hspace在行首(即换行符处)不产生任何输出。这通常是所需的。要强制输出,您可以编写\hspace*而不是\hspace并获得所需的输出:

This Non-Disclosure and Confidentially Agreement (the ``Agreement``) is entered into as of \uline{\hspace*{1in}}, 20\uline{\hspace*{0.5in}} (the ``Effective Date``) by and between:

相关内容