# $Id$
#
# >>Title::	Document Style
#
# >>Copyright::
# Copyright (c) 1992-1996, Ian Clatworthy (ianc@mincom.com).
# You may distribute under the terms specified in the LICENSE file.
#
# >>History::
# -----------------------------------------------------------------------
# Date      Who     Change
# 01-Oct-96 ianc    SDF 2.000
# -----------------------------------------------------------------------
#
# >>Purpose::
# {{document}} is an [[SDF]] style for normal documents.
#
# >>Description::
# If a document name is not set, the text of the first level heading is used.
# (This makes the output for a single topic a little nicer.)
#
# >>Limitations::
#

# Load the cover page definitions
!use "covers"

# Provide the default cover page setting
!default DOC_COVER "original"

# Setup defaults to eliminate warning messages for files without a title
!block default; family="DOC"
Name            Value
NAME            ''
TYPE            ''
PROJECT         ''
ID              ''
URL             ''
OWNER           ''
!endblock

# Build the borders
!default OPT_BORDERS 2
!build_borders

# Define the number of header/footer lines
!default OPT_HEADINGS 2

# Define the first page footer
!define PAGE_FIRST_FOOTER_INNER1  ''
!define PAGE_FIRST_FOOTER_INNER2  ''
!define PAGE_FIRST_FOOTER_CENTER1 "{{B:[[FULL:DOC_MODIFIED]]}}"
!define PAGE_FIRST_FOOTER_CENTER2 ''
!define PAGE_FIRST_FOOTER_OUTER1  ''
!define PAGE_FIRST_FOOTER_OUTER2  ''

# Define the right page header
!define PAGE_RIGHT_HEADER_INNER1   '[[DOC_PROJECT]]'
!define PAGE_RIGHT_HEADER_INNER2   ''
!define PAGE_RIGHT_HEADER_CENTER1  ''
!define PAGE_RIGHT_HEADER_CENTER2  ''
!define PAGE_RIGHT_HEADER_OUTER1   '{{B:[[$var{"DOC_NAME"} || "{{PARATEXT:H1,A1,P1}}"]]}}'
!define PAGE_RIGHT_HEADER_OUTER2   '[[DOC_TYPE]]'

# Define the right page footer
!define PAGE_RIGHT_FOOTER_INNER1   FULL:DOC_MODIFIED
!define PAGE_RIGHT_FOOTER_INNER2   '[[DOC_URL]]'
!if DOC_OWNER
!define PAGE_RIGHT_FOOTER_CENTER1  "[[c]] [[YEAR:DOC_START]], [[DOC_OWNER]]"
!else
!define PAGE_RIGHT_FOOTER_CENTER1  ""
!endif
!define PAGE_RIGHT_FOOTER_CENTER2  ''
!define PAGE_RIGHT_FOOTER_OUTER1   "Page {{PAGENUM:}} of {{PAGECOUNT:}}"
!define PAGE_RIGHT_FOOTER_OUTER2   '[[DOC_ID]][[$var{"DOC_STATUS"} ? " ($var{\'DOC_STATUS\'})" : ""]]'

# Build the left page as a mirror of the right page
!left_mirror_right_page
