On Sun, 06 Aug 2017 13:39:50 -0600, Pablo Rodriguez wrote: > 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 % section >> 3.0.1 % subsubsection >> >> 4 % section >> 4.1 % subsection >> 4.1.1 % 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 Thank you very much, Pablo. Here is a modified version: \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 \starttitle[title=Paper] \dorecurse{2}{% \startsection \startpar\input ward\stoppar \startparagraph\input ward\stopparagraph \startsubsubsection{} \startpar\input ward\stoppar \stopsubsubsection \dorecurse{2}{% \startsubsection \startpar\input ward\stoppar \startparagraph\input ward\stopparagraph \dorecurse{2}{% \startsubsubsection{} \startpar\input ward\stoppar \startparagraph\input ward\stopparagraph \stopsubsubsection } \startparagraph{\bf level 2} \input ward\stopparagraph \stopsubsection } \startparagraph{\bf level 1} \input ward\stopparagraph \stopsection } \stoptitle \stoptext Challenges: 1. How can we get automatic indentation for all heads *except* the first one that occurs after the \starttitle? 2. Look at the output of the adjusted version above - attached. Note that a subsubsection after a section gives 1.1 2.1 which are the same as those given by a subsection after a section. How can we get a subsubsection after a section to produce the following? 1.0.1 2.0.1 etc. Thanks again, Pablo! -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512