![如何获取特定格式](https://linux22.com/image/344663/%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E7%89%B9%E5%AE%9A%E6%A0%BC%E5%BC%8F.png)
答案1
您可以设置间隔开的[t]
op-aligned tabular
。在 内部tabular
,\parskip
没有效果:
\documentclass{article}
\usepackage{showframe,lipsum}
\newlength{\signaturelength}\newlength{\datelength}
\setlength{\signaturelength}{.5\linewidth}% Adjust to suit your needs
\setlength{\datelength}{.2\linewidth}% Adjust to suit your needs
\newcommand{\signatureblock}[1]{%
\begin{tabular}[t]{@{} p{\signaturelength} @{} }
\hline
#1
\end{tabular}}
\newcommand{\dateblock}[1]{%
\begin{tabular}[t]{@{} p{\datelength} @{} }
\hline
#1
\end{tabular}}
\begin{document}
\lipsum[1]
\vspace{4\bigskipamount}
\noindent
\signatureblock{Person 1 \\ Joe Schmoe} \hfill
\dateblock{Date}
\vspace{4\baselineskip}
\noindent
Approvided by:
\vspace{4\baselineskip}
\noindent
\signatureblock{Person 2 \\ Sally Sue} \hfill
\dateblock{Date}
\vspace{4\bigskipamount}
\noindent
\signatureblock{Person 3 \\ Jack Everyman} \hfill
\dateblock{Date}
\vspace{4\bigskipamount}
\noindent
\signatureblock{Person 4 \\ Lorem Ipsum} \hfill
\dateblock{Date}
\end{document}
\noindent
\parindent
删除每个段落开头的默认设置。
重新定义\signaturelength
并\datelength
满足您的需求。
答案2
该代码可能看起来有些矫枉过正,但是它将每个细节都放在一个地方,因此更容易统一地改变外观。
该框架是由于\usepackage{showframe}
,在生产版本中将其移除。
\documentclass{article}
\usepackage{parskip}
\usepackage{showframe,lipsum} % for the example
\newcommand{\sigrule}[1]{\makebox[#1\textwidth]{\hrulefill}}
\newcommand{\signatureblock}[1]{%
\par
\vspace{3\baselineskip} % adjust to suit
\noindent
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll@{}}
\sigrule{0.5} & \sigrule{0.2} \\ % adjust to suit
\begin{tabular}[t]{@{}l@{}} #1 \end{tabular} & Date
\end{tabular*}\par
}
\newcommand{\signote}[1]{%
\par
\vspace{3\baselineskip}% adjust to suit
\noindent#1\par
}
\begin{document}
\lipsum[1]
\signatureblock{Person 1 \\ Joe Schmoe}
\signote{Approved by:}
\signatureblock{Person 2 \\ Sally Sue}
\signatureblock{Person 3 \\ Jack Everyman}
\signatureblock{Person 4 \\ Lorem Ipsum}
\end{document}