On Mon, 07 Aug 2017 13:57:56 -0600, Wolfgang Schuster <schuster.wolfg...@gmail.com> wrote:

Simpler version:
\defineseparatorset [ParagraphNumber][.,]
\definecounter[ParagraphNumber][numberseparatorset=ParagraphNumber,criterium=all]
\define\ParagraphNumber
  {\incrementcounter[ParagraphNumber]%
   \convertedcounter[ParagraphNumber][numbersegments=1]\quad}
\define\subParagraphNumber
  {\incrementcounter[ParagraphNumber][2]%
   \convertedcounter[ParagraphNumber][numbersegments=1:2]\quad}
\define\subsubParagraphNumber
  {\incrementcounter[ParagraphNumber][3]%
   \convertedcounter[ParagraphNumber][numbersegments=1:3]\quad}
\setupwhitespace[line]
\starttext
\ParagraphNumber\input ward
\subsubParagraphNumber\input ward
\subParagraphNumber\input ward
\subsubParagraphNumber\input ward
\subsubParagraphNumber\input ward
\subParagraphNumber\input ward
\subsubParagraphNumber\input ward
\ParagraphNumber\input ward
\stoptext


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
==============

There are surely ways to continue to improve this.. Thanks again, Wolfgang, and to everyone who has contributed.

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 via email to