On 08/06/2017 03:54 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> [...]
> Something along the lines of the following would be a sufficient (and
> easier) first step for the current project, although we may want to
> revisit the above for the future:
> 
> 3 <par>     % section
> 3.0.1 <par>  % subsubsection
> 
> 4 <par>     % section
> 4.1 <par>   % subsection
> 4.1.1 <par>  % subsubsection
> 
> How can we automate this?

Hi Idris,

if you only need a printed version, I think the following approach might
help:

    \setupwhitespace[big]

    \setuphead[section]
        [alternative=margintext,
         color=white,
         style=\tfxx,
         before=,
         after=,
         commandafter={\setupparagraphintro[first]
            [{{\bf \getmarking[sectionnumber][current]
                \hspace[big]}}]}]

    \setuphead[subsection]
        [commandafter={\setupparagraphintro[first]
            [{{\bf \getmarking[subsectionnumber][current]
                \hspace[big]}}]}]

    \setuphead[subsubsection]
        [commandafter={\setupparagraphintro[first]
            [{{\bf \getmarking[subsubsectionnumber][current]
                \hspace[big]}}]}]

    \starttext

    \dorecurse{3}{\section{}
    \startpar\input ward\stoppar
    \startpar\input ward\stoppar
    \dorecurse{3}{\subsection{}
    \startpar\input ward\stoppar
    \startpar\input ward\stoppar
    \dorecurse{3}{\subsubsection{}
    \startpar\input ward\stoppar
    \startpar\input ward\stoppar
    \startpar\input ward\stoppar}
    \startpar\input ward\stoppar}
    \startpar\input ward\stoppar}

    \stoptext

I hope it helps,

Pablo

-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________
  • [NTG-context] methods fo... Idris Samawi Hamid ادريس سماوي حامد
    • Re: [NTG-context] m... Idris Samawi Hamid ادريس سماوي حامد
      • Re: [NTG-contex... Idris Samawi Hamid ادريس سماوي حامد
        • Re: [NTG-co... Pablo Rodriguez
          • Re: [NT... Idris Samawi Hamid ادريس سماوي حامد
            • Re... Pablo Rodriguez
              • ... Hans Hagen
                • ... Pablo Rodriguez
                • ... Idris Samawi Hamid ادريس سماوي حامد
                • ... Hans Hagen
                • ... Idris Samawi Hamid ادريس سماوي حامد
                • ... Pablo Rodriguez
                • ... Pablo Rodriguez
                • ... Hans Hagen

Reply via email to