\setupcolors[state=start]
\setuppapersize[letter][letter]
\setupbodyfont[10pt]
%\setupbackground[textbackgrounds=screen,corner=round,leftoffset=10pt,topoffset=3pt,rightoffset=10pt,bottomoffset=3pt] 
%\setuptyping[before={\startbackground},after=\stopbackground]

\definetextbackground[A][frame=off,location=paragraph,backgroundcolor=gray]
\setuptyping[before={\starttextbackground[A]},after={\stoptextbackground}]

\setuphead[chapter][page=no,style={\bfb\ss},]
\setupheadertexts[][chapter]
\setuppagenumbering[location={header,margin},left=--~,right=~--]


\setupinteraction[state=start,color=red,contrastcolor=blue]





\starttext
\completecontent
\chapter{Logic Structure of a Project}

\starttyping 
\startproject name_of_project
\environment  name_of_environ
\product      name_of_product
\stopproject

A product could be composed of different ``components.''
\stoptyping


\chapter{Page Dimensions}
\starttyping
\setuppapersize[..1..][..2.._]
1. A3 A4_ A5 A6 letter ... CD landscape mirrored rotated 90 180 270
2. A3 A4_ A5 A6 letter ... landscape mirrored rotated negative 90 180 270

\definepapersize[name][..=..]
width, height, offset: dimension
scale: number
\stoptyping

\chapter{Layout}

\starttyping
\showframe[text,margin,edge]
\showsetups
\showlayout

\setuplayout[..=..]
HORIZONTAL:
  leftedge, leftmargin, leftmargindistance = backspace
  width: dimension/fit/middle
  rightmargindistance, rightmargin, rightedget = cutspace
VERTICAL:
  topsapce, header, headerdistance
  height: dimension/fit/middle (=header+text+footer)
  footerdistance, footer, bottomspace
OTHER
  grid=yes/no_
  horoffset, veroffset
  style: normal, bold, slanted, boldslanted, type, cap, small ...command
  marking: on/off_/color
  location: left, middle, right, bottom, top, singlesided_, doublesided
  scale: dimen
  
\adaptlayout[page_numbers][height,lines]  
\makeupwidth, \makeupheight, \textwidth, \textheight (=height-header-footer)
\stoptyping

\chapter{Logo}

\starttyping
\definelogo[name][2][3][..=..]
2. top header footer bottom
3. none page leftedge leftmargin left middle right rightmargin rightedge
command
state
\stoptyping

\chapter{Spacing}

\starttyping
\setupinterlinespace[..._][..=..]
..._ reset small_ medium big on off
height, depth, top, bottom: number
line: dimen

\setupwhitespace[...]
none_, small, medium, big, line, fixed, fix, dimen
\whitespace
\nowhitespace

\blank[..]
n*small n*medium n*big nowhite back white disable force reset line halfline formula fixed flexible

\setupblank[..]
normal_ standard line dimen big medium small fixed flexible

\defineblank[name][...]
same as \setupblank

\packed
\startpacked ... \stoppacked
\startunpacked ... \stopunpacked

\setupspacing[broad,packed]
\space, \nospace, fixedspaces
\stoptyping

\chapter{Indentation}

\starttyping
\setupindenting[...]
none_, small, medium, big, yes, next, first

\noindenting

\indenting[..]
never_, not, no yes, always, first, next

\startnarrower[...] ... \stopnarrower
n*left n*middle n*right
\setupnarrower[..=...]
left, right, middle
\stoptyping

\chapter{Header and Footer}
\starttyping
\setupheadertexts[.1._][.2.][.3.]
1. text_ margin edge
2. <text> <section> date <mark> pagenumber
3. same as 2.

\setupfootertexts

\setupheader[.._][..=..]
._ text_ margin edge
state=normal_ (visible)
      none (invisible, no whitespace)
      empty (one page visible, whitespace)
      high (one page visible, no whitespace)
      start (visible)
      nomarking (leave out marks)
      stop (invisible, whitespace)
      strut=yes/no
style
leftstyle
rightstyle
leftwidth
rightwidth
before
after

\setupfooter

\noheaderandfooterlines
\stoptyping

\chapter{Page Numbers}
\starttyping
\setuppagenumber[..=..]
number: number
state=start/stop/keep

\setuppagenumbering[..=..]
alternative=singlesided/doublesided
location=header/footer/left/right/middle/margin/marginedge/inleft/inright
converstion=numbers/characters/Characters/romannumerals/Romannumerals
style
left: text
right: text
way: bytext/by<section>/bypart_
text: text
numberseparator: text
textseparator: text
sectionnumber: yes/no
separator: text
strut: yes_/no
state: start_/stop
command: \command#1
\stoptyping

\chapter{Footnotes}
\starttyping
\setupfootnotes[..=..]
conversion=numbers/characters/Characters/romannumerals/Romannumerals
way=bytext/by<section>
location=page_/text/columns/high/none
rule=on/off_
before
after
width
height
bodyfont=5pt..12pt/small_/big
style
distance
columndistance
margindistance
n: number
split=tolerant/strict/verystrict/<number>
Those of \framed

\startlocalfootnotes[n=0] ... \footnote ... \placefootnotes
\stoplocalfootnotes

\setupfootnotedefinition[..=..]
Those of \definedescription
\stoptyping


\chapter{Columns}

\starttyping
\setupcolumns[..=..]
n: number
ntop: number
rule=on/off_
height: dimen
tolerance=verystrict/strict/tolerant_/verytolerant/stretch
distance: dimen
balance=yes_/no
align=yes/no/text
blank=fixed_/halfline/line_/flexible/big/medium/small
option=background
direction=left/right
Those of \setupframed

\defineparagraphs[name][..=..]
n: number
rule=on/off_
height=fit/dimen
before: command
after: command
inner: command
distance: dimen
tolerance
align=left/right/middle
\setupparagraphs[name][2.._][..=..]
2. <number>/each
style
width
height
align=left/right/middle/width/breedte_
tolerance
distance
before
after
inner
command
rule=on/off

\start<paragraph> ...\<paragraph> \stop<paragraph>
\stoptyping

\chapter{Marginal Text}
\starttyping
\inmargin[.._][ref_]{...}
+ - low
\inright
\inleft
\inothermargin
\margintext

\setupinmargin[..._][..=..]
..._ left right number
location=left/right/both_
style
before
after
align=inner_/outer/left/right/middle/normal/no/yes
line: number
distance
separator: text
those of \setupframed

\startcolumns .. \column .. \stopcolumns
\stoptyping


\chapter{Alignment}
\starttyping
\leftaligned{...}
\midaligned{...}
\rightaligned{...}
\wordright{...}

\startalignment ... \stopalignment
\setupalign[...]
width left right middle inner outer wide broad height bottom line reset hanging nothanging hyphenated nothyphenated
\stoptyping


\chapter{Lines}
\starttyping
\crlf
\startlines ... \stoplines
\setuplines[..=..]
before, after, inbetween, indenting=yes/no_/even/odd

\startlinenumbering[...] ... \stoplinenumbering
continue
\setuplinenumbering[..=..]
conversion=numbers/characters/Characters/romannumerals/Romannumerals/text
start: number
step: number
width: dimen
location=intext/inmargin_
style
prefix: text
referencing=on/off
\stoptyping

\chapter{Pages}
\starttyping
\page[..]
yes_ makeup no preference bigpreference left right disable last quadruple even odd blank empty reset
\stoptyping



\chapter{Aligned Boxes}
\starttyping
\hbox \vbox \vtop
\cbox \lbox \rbox
\sbox \tbox \bbox

\setbox0=...
\makecutbox0\box0
\stoptyping


\chapter{Makeup}

\starttyping
\startstandardmakeup .. \stopstandardmakeup
\setupmakeup[name][..=..]
width height voffset hoffset: dimen
page=left/yes/right
commands
doublesided=yes/no/empty_
headerstate=normal/stop/start/empty_/none/nomarking
footerstate
textstate
topstate=stop/start
bottomstate
pagestate
color: name

\definemakeup[name][..=..]
\start<name>makeup ... \stop<name>makeup
\stoptyping







\stoptext