我正在尝试制作签名行。除了使用表格环境,我想不出任何其他方法。
\documentclass[a4paper,12pt,icelandic]{report}
\begin{document}
\begin{table}[b] % force to the bottom.
\begin{flushright} % Flush table to right.
\begin{tabular}{l} % Text aligning to left.
\hspace{-6pt}City, Date \\ % Aligning the text with the signature line.
\\ \hline % Making the signature line. (No Text)
\hspace{-6pt}My full name under the line. % My full name written here.
\end{tabular}
\end{flushright}
\end{table}
\end{document}
效果正如我所愿……但是签名行下方的姓名离签名行太近了,我需要将其偏移。我还想让签名行与城市/日期文本之间留出更多间隙。- 我一直在尝试使用 \vspace{pt},但似乎不太合适。
有任何想法吗?
答案1
也许这是一个有点 hacky 的解决方案,我使用数组来摆脱不需要的空间,正如 DavidCarlisle 建议的那样;然后我插入了一个带有负间距的额外行分隔符。
\documentclass[a4paper,12pt,icelandic]{report}
\usepackage{array}
\begin{document}
\begin{table}[b] % force to the bottom.
\begin{flushright} % Flush table to right.
\begin{tabular}{@{}l@{}} % Text aligning to left.
City, Date \\ % Aligning the text with the signature line.
\\ \hline\\[-2ex] % Making the signature line. (No Text)
My full name under the line. % My full name written here.
\end{tabular}
\end{flushright}
\end{table}
\end{document}
答案2
您需要\vbox
向右移动一位:
\hfill\vbox{\hsize=.4\hsize \parindent=0pt
City, Date
\vskip 1cm
\hrule
\medskip
My full name under the line.
}