# This is -*- tcl -*- script which adds page footers of following
# format:
#
#<copyright sign> <year> Jet Infosystems
#
# and page headers with small cap'ed current section name.
#
# $Id: jet_pages,v 1.11 1999/03/12 12:13:01 tobotras Exp $

# Can't be used with page_headers (yet).

global TEItools_page_headers_in_use
if { [info exists TEItools_page_headers_in_use] } {
    puts stderr "\n*** 'jet_pages' style can't be used with 'page_headers'!\n"
    exit 1
}

rename pageLayout pageLayout_JetPages

proc pageLayout {} {

    set date [exec date +%Y]
    withNode doctree descendant element DOCDATE {
	set date "\\TEItoolsDate\{\}"
    }
    
    return "
% Page layout

\\usepackage{fancyhdr}
\\pagestyle{fancy}
\\fancyhead{}
\\fancyfoot\[C\]{}
\\fancyhead\[C\]{\\hfil\\rightmark\\hfil}
\\fancyhead\[L,R\]{}
\\fancyfoot\[LO,RE\]{\\textit{\\cyr [authorMacro 0], ${date}}}
\\fancyfoot\[LE,RO\]{\\thepage}
\\renewcommand{\\headrulewidth}{0.75pt}
\\renewcommand{\\footrulewidth}{0.75pt}
\\renewcommand{\\sectionmark}\[1\]{\\markright{\\textsc{\\small \#1}}}
\\renewcommand{\\subsectionmark}\[1\]{}
\\renewcommand{\\subsubsectionmark}\[1\]{}
\\renewcommand{\\paragraphmark}\[1\]{}
\\renewcommand{\\subparagraphmark}\[1\]{}
%\\addtolength{\\headheight}{2\\baselineskip}
% 

[pageLayout_JetPages]
"
}

rename defineTitlePageStyle {}

proc defineTitlePageStyle {} {
    return "%\\thispagestyle{empty}\n"
}
