![newlfm - addrfrom 和 addrto 在同一垂直高度](https://linux22.com/image/239913/newlfm%20-%20addrfrom%20%E5%92%8C%20addrto%20%E5%9C%A8%E5%90%8C%E4%B8%80%E5%9E%82%E7%9B%B4%E9%AB%98%E5%BA%A6.png)
当其中一个左对齐而另一个右对齐时,有没有办法将 addrfrom 和 addrto 放在相同的垂直高度?这基本上是我想要实现的布局:
--------------------------
[\addrto] [\addrfrom]
...
[\greetto]
[...msg...]
--------------------------
答案1
您可以使用\addrto
宏来手动放置两个地址\parbox
:
\documentclass[stdletter,addrtoleft]{newlfm}
\nameto{George Bush}
\namefrom{Paul Thompson}
\newlength\lento
\newlength\lenfrom
\setlength\lento{2in}% width of the box for \addrto
\setlength\lenfrom{2in}% width of the box for \addrfrom
\addrto{\parbox[t]{\lento}{The White House \\ Washington, DC}%
\hspace{\dimexpr\textwidth-\lento-\lenfrom}%
\parbox[t]{\lenfrom}{\raggedleft The Pink House in Avon \\ Belleville, IL}}
\greetto{Dear Mr. Bush,}
\begin{document}
\closeline{Sincerely yours,}
\begin{newlfm}
How are the azaleas?
\end{newlfm}
\end{document}