GeneralFile name and time in compilation

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

File name and time in compilation

Post by cbustaam »

Hi all,
How can I add automatically in the header or in the footer the filename and the time of the compilation? For example, I want a header/footer like:

mytesis.tex - 14/11/2009 01:17 hr

Thanks in advance
"Show me your .emacs and I'll tell you who you are." -- modified proverb

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

magicmoose
Posts: 90
Joined: Fri Nov 06, 2009 7:29 am

File name and time in compilation

Post by magicmoose »

Hi,

For the file name, the \jobname command should be sufficient.

For the time, you could try using the datetime package and the code

Code: Select all

\settimeformat{ampmtime}
\today \currenttime
NB: I haven't tested the datetime package, but looking through it's documentation, it should do what you want


Hope that helps
User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

Re: File name and time in compilation

Post by cbustaam »

Thanks a lot magicmoose. Works great.
Bests
"Show me your .emacs and I'll tell you who you are." -- modified proverb
Post Reply