ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: methods for numbered paragraphs (ii)
Date: Sun, 6 Aug 2017 21:39:50 +0200	[thread overview]
Message-ID: <b942db12-55b2-9556-e6d6-92b6c5adf376@gmx.es> (raw)
In-Reply-To: <op.y4jx9gcpejo439@desktop-mt1m160>

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
___________________________________________________________________________________

  reply	other threads:[~2017-08-06 19:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-05 20:08 Idris Samawi Hamid ادريس سماوي حامد
2017-08-06  3:28 ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-06 13:54   ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-06 19:39     ` Pablo Rodriguez [this message]
2017-08-06 21:08       ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-07 15:08         ` Pablo Rodriguez
2017-08-07 18:57           ` Hans Hagen
2017-08-07 21:03             ` Pablo Rodriguez
2017-08-07 22:37               ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-08  7:36               ` Hans Hagen
2017-08-08 12:42                 ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-08 16:00                   ` Pablo Rodriguez
2017-08-08 20:43                 ` Pablo Rodriguez
2017-08-09  7:58                   ` Hans Hagen
2017-08-06 19:49     ` Pablo Rodriguez
2017-08-06 21:14       ` Idris Samawi Hamid ادريس سماوي حامد

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b942db12-55b2-9556-e6d6-92b6c5adf376@gmx.es \
    --to=oinos@gmx.es \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).