ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Idris Samawi Hamid ادريس سماوي حامد" <Idris.Hamid@colostate.edu>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Could you look at this?
Date: Tue, 08 Aug 2017 22:14:15 -0600	[thread overview]
Message-ID: <op.y4ord1qqejo439@desktop-mt1m160> (raw)
In-Reply-To: <op.y4nogkjfejo439@desktop-mt1m160>

On Tue, 08 Aug 2017 08:13:22 -0600, Idris Samawi Hamid ادريس سماوي حامد

> Here is a first attempt to combine this paragraph numbering with  
> sectioning:
>
> \defineseparatorset [ParagraphNumber][.,] % no second decimal for  
> susubparagraphs
> % \defineseparatorset [ParagraphNumber][.,.] % second decimal for  
> susubparagraphs
>
> \definecounter[ParagraphNumber][numberseparatorset=ParagraphNumber,criterium=all]
>
> \define\ParagraphNumber
>    {{\bf \incrementcounter[ParagraphNumber]%
>     \convertedcounter[ParagraphNumber][numbersegments=1]}\quad}
>
> \define\subParagraphNumber
>    {{\bf \incrementcounter[ParagraphNumber][2]%
>     \convertedcounter[ParagraphNumber][numbersegments=1:2]}\quad}
>
> \define\subsubParagraphNumber
>    {{\bf \incrementcounter[ParagraphNumber][3]%
>     \convertedcounter[ParagraphNumber][numbersegments=1:3]}\quad}
>
> \setuphead[section]
>     [style=\bf,
>      alternative=text,
>      criterium=all,
>      number=no]
>
> \setuphead[subsection]
>     [style=\bf,
>      alternative=text,
>      criterium=all,
>      number=no]
>
> \setuphead[subsubsection]
>     [style=\bf,
>      alternative=text,
>      criterium=all,
>      number=no]
>
> \setupwhitespace[line]
>
> \def\startsectionpar{\startsection[title={\ParagraphNumber}]}
> \def\startsubsectionpar{\startsection[title={\subParagraphNumber}]}
> \def\startsubsubsectionpar{\startsection[title={\subsubParagraphNumber}]}
> \def\stopsectionpar{\stopsection}
> \def\stopsubsectionpar{\stopsubsection}
> \def\stopsubsubsectionpar{\stopsubsubsection}
>
> \starttext
> \startsectionpar[title=\ParagraphNumber]
> \input ward
> \startsubsectionpar[title=\subParagraphNumber]
> \input ward
> \startsubsubsectionpar[title=\subsubParagraphNumber]
> \input ward
> \stopsubsubsectionpar
> \stopsubsectionpar
> \stopsectionpar
>
> \startsectionpar[title=\ParagraphNumber]
> \input ward
> \startsubsubsectionpar[title=\subsubParagraphNumber]
> \input ward
> \stopsubsubsectionpar
> \stopsection
> \stoptext
> ==============

Wikified by Pablo:

http://wiki.contextgarden.net/Paragraph_Enumeration#Using_Section_Numbering_to_Improve_Paragraph_Numbering

And coming soon to a beta near you:

http://wiki.contextgarden.net/Titles#Complete_Section_Numbering

Many thanks to Wolfgang, Pablo, and of course Hans.

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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-09  4:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 13:54 Idris Samawi Hamid ادريس سماوي حامد
2017-08-07 18:17 ` Wolfgang Schuster
2017-08-07 19:57   ` Wolfgang Schuster
2017-08-07 22:32     ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-08  7:29       ` Hans Hagen
2017-08-08 14:04         ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-08 14:13     ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-09  4:14       ` Idris Samawi Hamid ادريس سماوي حامد [this message]
2017-08-09  5:32         ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-07 22:26   ` Idris Samawi Hamid ادريس سماوي حامد
2017-08-08  7:34     ` Jean-Pierre Delange
2017-08-08 14:04       ` 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=op.y4ord1qqejo439@desktop-mt1m160 \
    --to=idris.hamid@colostate.edu \
    --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).