ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: Context <ntg-context@ntg.nl>
Subject: Re: Enumerating paragraphs
Date: Tue, 19 Sep 2000 16:31:59 +0200	[thread overview]
Message-ID: <3.0.6.32.20000919163159.01853100@pop.wxs.nl> (raw)
In-Reply-To: <wkzol4my2x.fsf@multiline.com.au>

At 07:16 PM 9/19/00 +0800, Guy Worthington wrote:

>\newcount\paragraphno    % enumerate paragraphs
>\def\paragraph#1\par{\advance\paragraphno by 1
>    \llap{\sl \the\paragraphno\kern1pc}#1\par}%  number to left of text
>
>\setupbodyfont[ber,10pt]
>\setupwhitespace[big]
>
>\starttext
>
>\section[sec-language]{How this Book Teaches You The Language}
>
>\paragraph Java is an object oriented programming language.  When you
>use an object oriented programming language, your program consists of
>class definitions.
>
>\stoptext

\newcounter\ParNum

\def\paragraph{\doglobal\increment\ParNum\inleft{\ParNum}}

So, \inleft \inleftmargin \margintitle are the commands to use since they
also honor the margindistance and so. You can even say: 

\margintitle{\NextPar} 

some text 

with \def\NextPar{\doglobal\increment\ParNum\ParNum}

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  parent reply	other threads:[~2000-09-19 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-19 11:16 Guy Worthington
2000-09-19 13:39 ` Ed L Cashin
2000-09-19 14:36   ` Hans Hagen
2000-09-19 14:31 ` Hans Hagen [this message]
2000-09-20  2:31 Guy Worthington
2001-11-09 18:06 enumerating paragraphs Mathias.Picker
2001-11-11 12:27 ` Patrick Gundlach
2001-11-12  9:29   ` Hans Hagen

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=3.0.6.32.20000919163159.01853100@pop.wxs.nl \
    --to=pragma@wxs.nl \
    --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).