%D \module
%D   [      file=s-mod-01,
%D        version=very-old,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Documentation Paper Environment,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This module looks like crap, is not documented, will
%D change, and used to be called modu-*.tex.

\usemodule[mod-00,abr-01]

\dontcomplain

\unprotect

\setupbodyfont
  [10pt]

\definetypeface
  [narrowtt] [tt]
  [mono] [modern-cond] [default] [encoding=\defaultencoding]

\setuptyping[\v!typing][\c!style=\narrowtt]
\setuptype  [\v!type]  [\c!style=\narrowtt]

\mainlanguage
  [en]

\setupwhitespace
  [\v!big]

\setuptolerance
  [\v!verytolerant,\v!stretch]

\setuplayout
  [\c!backspace=3.5cm,
   \c!leftmargin=1.75cm,
   \c!rightmargin=0cm,
   \c!margindistance=.5cm,
   \c!leftedgedistance=.25cm,
   \c!rightedgedistance=.5cm,
   \c!edge=1.5cm,
   \c!width=15.55333cm,         % 13.998cm at 9pt => 15.55333 at 10pt
   \c!topspace=2cm,
   \c!header=1.25cm,
   \c!footer=1.25cm,
   \c!height=middle,
   \c!style=\ss]

\setupsetup
  [\c!reference=1]

\startnotmode[single]

  \setuppagenumbering
    [\c!alternative={\v!doublesided,\v!singlesided}]

\stopnotmode

\setuppagenumbering
  [\c!location=]

\expanded{\setupfootertexts
  [\v!edge]
  [][\v!pagenumber]}

\startmode[single]

  \setupfootertexts
    [\v!margin]
    [\filename{\Modulefile}][]

\stopmode

\startnotmode[single]

  \setupfootertexts
    [\v!margin]
    [\filename{\Modulefile}][]
    [\filename{\Modulefile}][]

\stopnotmode

\setupfootertexts
  [\v!text]
  [\CONTEXT]
  [\Moduletitle]

\setupheadertexts
  [\v!text]
  []
  [\Modulesubtitle]

\setupinmargin
  [\c!location=\v!left]

\setupheads
  [\c!alternative=\v!inmargin]

\setuphead
  [\v!chapter]
  [\c!style=\ssc,
   \c!page=\v!right,
   \c!header=\v!empty]

\setuphead
  [\v!section]
  [\c!style=\ssb,
   \c!page=\v!right]

\setuplist
  [\v!chapter]
  [\c!style=\v!bold,
   \c!after=\blank]

\setupcombinedlist
  [\v!content]
  [\c!width=3em,
   \c!aligntitle=\v!yes]

\setupregister
  [\v!index]
  [\c!balance=\v!yes,
   \c!indicator=\v!no]

\startnotmode[nocolor]

\setupcolors
  [\c!state=\v!start]

\stopnotmode

\startnotmode[color]

  \setupcolors
    [\c!conversion=\v!always]

  \setuptyping
    [\c!palet=graypretty]

\stopnotmode

\setupinteraction
  [\c!state=\v!start,
   \c!color=,
   \c!style=]

\protect \endinput
