我正在尝试用 Latex 写信,从letter
文档类开始:
\documentclass{letter}
\usepackage{hyperref}
\signature{Joe Bloggs}
\address{21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}
\begin{document}
\begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
\\ Newport \\ Ipswich IP3 5RT}
\opening{Dear Sir or Madam:}
I am writing to you on behalf of the Wikipedia project (http://www.wikipedia.org/),
an endeavour to build a fully-fledged multilingual encyclopaedia in an entirely
open manner, to ask for permission to use your copyrighted material.
% The \ldots command produces dots in a way that will not upset
% the typesetting of the document.
\ldots
That said, allow me to reiterate that your material will be used to the noble end of
providing a free collection of knowledge for everyone; naturally enough, only if you
agree. If that is the case, could you kindly fill in the attached form and post it
back to me? We shall greatly appreciate it.
Thank you for your time and consideration.
I look forward to your reply.
\closing{Yours Faithfully,}
\ps
P.S. You can find the full text of GFDL license at
\url{http://www.gnu.org/copyleft/fdl.html}.
\encl{Copyright permission form}
\end{letter}
\end{document}
这将打印今天的日期。虽然这很好,而且可能主要是某人的意图,但显然有些情况下日期不应与最后一次 Latex 运行一致。
如何可能(有哪些推荐的方法)将这封信中的日期设定为 2041 年 10 月 21 日?
答案1
\date{}
只需在 之前某处添加即可\begin{opening}
。例如,在您的文档中:
\documentclass{letter}
\usepackage{hyperref}
\signature{Joe Bloggs}
\address{21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}
\begin{document}
\begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
\\ Newport \\ Ipswich IP3 5RT}
\date{October 21, 2014}
\opening{Dear Sir or Madam:}
...
答案2
将其放在字母开始之前。在其他地方,日期仍然采用系统定义的今天的日期。
\documentclass{letter}
\usepackage{hyperref}
\signature{Joe Bloggs}
\address{21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}
\begin{document}
\date{October 21, 2041} % <== this is the correct place to put it
\begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
\\ Newport \\ Ipswich IP3 5RT}
\opening{Dear Sir or Madam:}