<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">
<blockquote style="border: 0px none;" 
cite="mid:cbbb7ed9-982a-ff73-81c7-aba17cba14f8@gmx.es" type="cite">
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="width:100%;border-top:1px solid #EDEEF0;padding-top:5px">   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
        <a moz-do-not-send="true" href="mailto:oinos@gmx.es" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Pablo Rodriguez</a></div>   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
 right;">     <font color="#9FA2A5"><span style="padding-left:6px">26. 
Mai 2016 um 21:29</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><div><!----><br>In a much 
simpler case, it seems to work:<br><br>    \setuphead[section]<br>    
[style=\ss\tfa, after={\hrule\blank[samepage,big]}]<br>    %~ 
[style=\ss\tfa, after={\hrule\blank[big]}]<br><br>    
\setuphead[subsection]<br>    [style=\ss, 
after={\hrule\blank[samepage,medium]}]<br>    %~ [style=\ss, 
after={\hrule\blank[medium]}]<br><br>    \starttext<br>    
\dorecurse{10}{\section{Section}<br>    \input knuth<br>    
\subsection{Subsection}<br>    \input zapf}<br>    \stoptext<br><br>Do 
you really need headings to be inside framed texts?<br>
</div></div>
</blockquote>
A good idea but it can be improved.<br>
<br>
\definevspace[sectionrule][3mm]<br>
<br>
\setuphead<br>
  [section]<br>
  [       width=0.8\textwidth,<br>
   commandafter={\vspace[sectionrule]\hrule},<br>
         before={\blank[0.5cm]},<br>
          after={\blank[1cm]}]<br>
<br>
\starttext<br>
<br>
\section{\input ward }<br>
<br>
\subject{\input ward }<br>
<br>
\stoptext<br>
<br>
Wolfgang<br>
</body></html>