Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% This is the file "examples/edrxheadfoot.tex" of dednat4.
% See: http://angg.twu.net/dednat4.html
%      http://angg.twu.net/dednat4/examples/edrxheadfoot.tex
%      http://angg.twu.net/dednat4/examples/edrxheadfoot.tex.html
% Author: Eduardo Ochs <eduardoochs@gmail.com>
% Version: 2008oct09
% Public domain.
%
% This doesn't have much to do with dednat4, but let me explain. :-)
% I "\input" this file from most of my LaTeX files. It changes the
% code for headers and footers to make the page number appear in the
% header and the filename (the "\jobname", actually) and the date of
% the compilation appear of at the footer. Including it in dednat4
% made some examples easier to write.
%   (find-dn4ex "edrxmain41.tex")
%   (find-dn4ex "edrxmain41a.tex")

% (find-lsrcfile "base/ltpage.dtx"      "Page Style Commands")
% (find-source2epage (+ 9 360) "65.1     Page Style Commands")
% (find-source2etext           "65.1     Page Style Commands")
% (find-lshortfile "src/things.tex"  "Page Styles")
% (find-lshorttext           "1.6.3   Page Styles")
% (find-lshortpage (+ 14 13) "1.6.3   Page Styles")
% (find-es "tex"      "book.cls")
% (find-lsrcfile "base/book.cls"   "\\if@twoside" "\\def\\ps@headings")
% (find-source2efile "classes.dtx" "\\if@twoside" "\\def\\ps@headings")
% (find-source2efile "classes.dtx" "The page style")
% (find-source2efile "classes.dtx" "<!book>\\pagestyle{plain}")
% (find-source2efile "nfssfont.dtx" "time")
%
\makeatletter
\newcount\m \newcount\n
\def\twodigits#1{\ifnum #1<10 0\fi \number#1}
\def\hours{\n=\time \divide\n 60
  \m=-\n \multiply\m 60 \advance\m \time
  \twodigits\n:\twodigits\m}
%
\def\draftfooter{\jobname{} \today{} \hours}
\def\footertext{\draftfooter}
\def\ps@headings{%
  \def\@oddfoot{\hfil \footertext \hfil}
  \let\@evenfoot\@oddfoot
  \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
  \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markright {\MakeUppercase{%
      \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
          \@chapapp\ \thechapter. \ %
        \fi
      \fi
      ##1}}}}
\ps@headings
\makeatother
%
\def\shorttoday{%
  \number\year%
  \ifcase\month\or jan\or feb\or mar\or apr\or may\or
     jun\or jul\or aug\or sep\or oct\or nov\or dec\fi
  \twodigits\day}
\def\edrxnotesfooter#1{{\tiny #1 (typeset \shorttoday{} \hours)
  {\tt Edrx http://angg.twu.net/}}}
\def\edrxnotes#1{\gdef\footertext{\edrxnotesfooter{#1}}}
\def\noedrxfooter{\gdef\footertext{}}
%
% (find-es "tex" "edrxnotes")
% (find-fline "/usr/share/texmf-tetex/tex/generic/babel/portuges.ldf")
% (find-fline "/usr/share/texmf-tetex/tex/generic/babel/portuges.sty")






% Local Variables:
% coding:               raw-text-unix
% ee-delimiter-percent: "\n%*\n"
% ee-anchor-format:     "«%s»"
% End: