On Fri, May 28, 2010 at 5:33 AM, Daniel Lohmann <
[email protected]> wrote:
>
> On 28.05.2010, at 00:30, Tim Wescott wrote:
>
>
> Assuming you are compiling with pdftex as backend (which is most probably
> the case, as all more or less recent LaTeX-Distributions use it by default
> -- even when compiling to dvi), you can use the \pdffilemoddate{<filename>}
> built-in command to retrieve the "last modified" date of <filename>.
>
> LyXically and applied for the own source file this comes down to the
> following two lines, which should be inserted into your document's preamble:
>
> \def\parsedate #1:20#2#3#4#5#6#7#8\empty{20#2#3/#4#5/#6#7}
> \date{\expandafter\parsedate\pdffilemoddate{\jobname.tex}\empty}
>
> (You can alter the display format, e.g., to use full stops instead of
> hyphens as separators, by modifying the \empty{} part of the first line.
>
>
Nice trick. But wouldn't the final result be identical to the print date,
since pdftex checks the modification date of a tex file created on the fly
by lyx at print time? Or there is something more involved I don't
understand?
Cheers,
Stefano
--
__________________________________________________
Stefano Franchi
Department of Philosophy Ph: (1) 979 862-2211
Texas A&M University Fax: (1) 979 845-0458
College Station, Texas, USA