开发者

Add current time to \today with package datetime? (LaTeX)

I'm trying to have my LaTeX articles print with both the current date and the time. I found a package called datetime which lets me redefine \today to a variety of formats. But it doesn't have an obvious way to modify \today to include the time, and the code is so twisted that I can't figure it out myself. Is there an easy way to do this?

开发者_JAVA技巧EDIT

I want to have the time automatically printed with the date on the front page when I run the \maketitle command. As by default, it executes in the hidden command \date{\today}.


Nevermind my comment, I found something that works without all the makeatletters

\usepackage{datetime}
%...
\title{This is the Title}
\author{An Author's name}
\date{\currenttime}
\maketitle


datetime package provides a \currenttime command. I would recommend using \currenttime directly instead of trying to modify/redefine \today.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜