我正在尝试为下图创建一个模板。注意:签名块的宽度等于文本宽度。
我写了以下代码:
\documentclass{article}
\newcommand{\Name}{Alpha Beta Gamma}
\newcommand{\Rank}{\LaTeX{} novice}
\newcommand{\Designation}{student}
\newcommand{\Organization}{MIT}
\newcommand{\OffExt}{3150}
\newcommand{\Encl}{\textbf{Encl:} as stated}
\newcommand{\SignatureBlock}{\vspace*{1.34in} \hfill \begin{tabular}{l l@{}}
& \MakeUppercase{\Name} \\
& \Rank \\
& \Designation \\
& \Organization \\
\Encl & \OffExt \\
\end{tabular} }
\begin{document}
\SignatureBlock
\end{document}
我无法对齐最后一行。
答案1
\documentclass{article}
\usepackage{lipsum}
\usepackage[usestackEOL]{stackengine}
\newcommand{\Name}{Alpha Beta Gamma}
\newcommand{\Rank}{\LaTeX{} novice}
\newcommand{\Designation}{student}
\newcommand{\Organization}{MIT}
\newcommand{\OffExt}{3150}
\newcommand{\Encl}{\textbf{Encl:} as stated}
\newcommand{\SignatureBlock}{\par\vspace*{1.34in}
\noindent\Encl \hfill \Longstack[l]{
\MakeUppercase{\Name} \\
\Rank \\
\Designation \\
\Organization \\
\OffExt}}
\begin{document}
\lipsum[1]
\SignatureBlock
\end{document}