2

I use Texmaker as my LaTeX editor. I prefer to split my input into multiple files and I would like to have a way where on top/bottom of each (tex) file there is an automatic time stamp, saying when the file was last opened.

This is a version control issue but I am wondering if there is a low-key solution to this at all?

azetina
  • 28,884
DBS
  • 599
  • 3
  • 6
  • 12
  • 1
    All operating systems have the date captured next to the filename. Info is probably of little value if there is no record of why the file was opened, changes etc. Rather have a look at fossil as a low-key solution. – yannisl Mar 07 '13 at 03:21
  • When you say open do you mean atime, mtime, or possibly ctime? Does the answer have to be robust to people manually setting the atime and mtime? – StrongBad Mar 07 '13 at 09:17

1 Answers1

4

Are you talking about when the .tex file was opened (for editing), or when a particular .tex file was last compiled. If the later then I might have some answers:

Opened? Not that I know of. Compiled? Yes. I do this all the time. Check out the currfile and datemod packages. For example I use the following to put the 'last time compiled' stamp in the footer of the first page (which I specify as 'plain') of each chapter of one of my books:

\usepackage{currfile}
\usepackage{filemod}
\usepackage{fancyhdr}

\renewcommand*{\thefilemoddate}[3]{#2.#3.#1}


 \fancypagestyle{plain}{%
  %\fancyhf{} % clear all header and footer fields
  \fancyhead[R]{}
  \fancyhead[L]{}
   \fancyfoot[R]{\footnotesize{\sffamily\filemodprintdate{\currfilepath}}}
   %\fancyfoot[R]{\footnotesize\sffamily{c. \mdyydate\today}} % compile date - lower right
    \fancyfoot[L]{\footnotesize\sffamily{\copyright~my name (2013)}}
  • No, DBS does not ask for a time stamp in the output, but in the TEX files! – Speravir Mar 07 '13 at 02:12
  • Thanks @user67322, nut as Speravir pointed out, I am looking for a time stamp on the .tex file. But I didn't know about these packages and I would check them out anyway! – DBS Mar 07 '13 at 02:57