%\setupoutput[pdftex]
\setupcolors[state=start]
\setupbackground[state=start]
\setupinteraction[state=start,color=blue,style=bold,author=Zeljko Vrba,title=SPA,subject=Vjezbe iz kolegija SPA]
\placebookmarks[chapter,section,subsection,subsubsection]
\useencoding[lat2]
\mainlanguage[hr]

\setupbodyfont[cmr,10pt,rm]
\setuppagenumbering[location=footer,alternative=doublesided]
\setupwhitespace[medium]

\setuphead[chapter][style=\bfc,page=yes]
\setuphead[section][style=\bfb]
\setuphead[subsection][style=\bfa]
\setuphead[subsubsection][style=\bfa]
\setupbodyfontenvironment[default][em=italic]

%\defineframedtext[codeex][width=.9\textwidth,bodyfont=8pt]
\defineparagraphs[codeex][rule=on,n=2]
\setupparagraphs[codeex][1][width=6cm]
\definedescription[definition][location=hanging,headstyle=bold]

\starttext
An example of\footnote{working} footnote.

\startcodeex
This is an example\footnote{of non-working} footnote.
\codeex
\startCPP
void f(bar& x, bar &y, struct foo *z) {
  x += z->y;
  x.*ptr();
  z->*ptr();
  /* comment */
  y = 3;
  y += x;
}
\stopCPP
\stopcodeex
\stoptext
