% UTF-8 {{{
\enableregime[utf-8]                % Enters unicode 
%\setupencoding[default=uc]       % Uses unicode fonts only
% }}}

\setupinteraction[state=start, color=red] % active links

% LANGUAGE {{{
\mainlanguage[fr]
\setcharacterspacing [frenchpunctuation]
% }}}

% LAYOUT {{{
\setuppapersize[A5][A5]           % sets layout to A5, places it in an A5
\setuplayout[
    backspace=50mm,
    topspace=15mm,
    width=80mm,
    height=185mm,
    leftmargin=35mm,
    rightmargin=0mm,
    header=0mm,
]
% }}}

% TYPOGRAPHY {{{
\usemodule[simplefonts]
\setmainfont[umepgothic]
\setupbodyfont[8pt]
\setuppagenumbering[location=footer]
\setuptolerance[tolerant]
\interlinepenalty=8000
% }}}

% ALEX'S TEST: put title on everypage, rotated {{{
%\defineoverlay[side][{\rotate[rotation=90]{\getmarking[section]}}]
%\setupbackgrounds[state=repeat]
%\setupbackgrounds[page][rightmargin][background=side]

%\define[1]\sectionname{
%       \inmargin{\rotate[rotation=90]{Hello #1!}}
%   }
%\def\MyPageNumber#1%
   %{{--~Page #1 / \lastpage~--}}%use lastpage for total page count
%\define\MyPageNumber{
%        \inmargin{\rotate[rotation=90]{Hello}}
%    }
% }}}

% TOC {{{
\setupcombinedlist[content][interaction=all, color=black]
\setuplist[section][width=0mm]
\setuplist[subsection][width=7mm]
% }}}

% SECTIONS AND HEADINGS {{{
\setuphead[section][
    number=no,
    align={center, nothyphenated, verytolerant},
    page=yes,
    after=\nowhitespace,
    textstyle=underbar,
    %command={\sectionname{you}}, % alex's test
    %command=\MyPageNumber, % alex's test
]
\setuphead[subsection][
    number=no,
    align={center, nothyphenated, verytolerant},
    page=yes,
]
\setuphead[title][
    align={center, nothyphenated, verytolerant},
]

\definehead[role][subsubject]
\setuphead[role][
    distance=0mm,
    before=\nowhitespace,
    after=\blank,
    textstyle=,
]
\definehead[playtitle][subsubject]
\setuphead[playtitle][
    distance=0mm,
    before={\nowhitespace},
    textstyle=underbar,
    %alternative=text, command=\InMargin,
]
\def\InMargin#1#2{\inleftmargin{#1 #2}} % puts content in margin
% }}}

% PARAGRAPHS {{{
%\setupwhitespace[none]           % sets an empty line after each paragraph

% INDENTATION
\setupindenting[yes, medium, next]
\define[1]\realpar{\blank\noindentation}
\define[1]\subpar{\blank[nowhite]\indentation}

\defineparagraphs[infos][n=1] 
\setupparagraphs[infos][1][style={\switchtobodyfont[6pt]}] 

%\defineparagraphs[signature][n=1] 
%\setupparagraphs[signature][1][before={\startnarrower[10pt,0pt]},after={\stopnarrower}]
% }}}

% DEFINITION LISTS {{{
\definedescription[descr][
  headstyle={\switchtobodyfont[6pt]},
  style={\switchtobodyfont[6pt]},
  width=64pt,
  before={\nowhitespace},
  after=\nowhitespace,
]
% }}}

% CONTENT {{{
\starttext
\title{Théâtre de la balsamine  Programme 2011-2012}
\completecontent[criterium=all]
\input fromhtml.tex 
\stoptext
% }}}
