ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: paragraph question
Date: Thu, 5 Mar 2009 14:44:53 +0100	[thread overview]
Message-ID: <7DD27721-D0DD-4DEA-85F1-4F55ED09E4DB@gmail.com> (raw)
In-Reply-To: <326847810903050525l64eb60e4qdbc02212f5f4d088@mail.gmail.com>


Am 05.03.2009 um 14:25 schrieb Alan Stone:

> After giving it some further thought and with reference to "specifies
> the number of lines in the
> paragraph so far", I don't need to know the paragraph's number of
> lines but whether its "number of lines" = 1 or not.


You can test whether the last paragraph had 1 or more lines and make
your decision dependent on the result but this can be done only after
the paragraph ist finished.

\def\paragraphlines
   {\blank % Finish the last paragraph
    \ifnum\prevgraf=1 What I want.\else Too many lines.\fi
    \blank}

\starttext

\dorecurse{30}{text }\paragraphlines

\dorecurse{10}{text }\paragraphlines

\dorecurse{50}{text }\paragraphlines

\stoptext

Wolfgang

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-03-05 13:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 11:49 Alan Stone
2009-03-04 16:02 ` Alan Stone
2009-03-04 16:32   ` Hans Hagen
2009-03-04 16:33   ` Hans Hagen
2009-03-04 17:40     ` Alan Stone
2009-03-04 22:38   ` Marcin Borkowski
2009-03-04 23:15     ` Wolfgang Schuster
2009-03-05  8:05     ` Hans Hagen
2009-03-05 12:45       ` Alan Stone
2009-03-05 12:55         ` Hans Hagen
2009-03-05 13:25           ` Alan Stone
2009-03-05 13:44             ` Wolfgang Schuster [this message]
2009-03-05 14:05               ` Marcin Borkowski
2009-03-05 14:14                 ` Wolfgang Schuster
2009-03-05 15:22                   ` Marcin Borkowski
2009-03-05 14:08               ` Alan Stone
2009-03-05 14:17                 ` Wolfgang Schuster
2009-03-05 16:09                 ` Hans Hagen
2009-03-05 16:21                   ` Alan Stone
2009-03-05 18:35                     ` Hans Hagen
2009-03-06  9:42                       ` Alan Stone
2009-03-06 14:05                         ` Hans Hagen
2009-03-06 14:25                           ` Alan Stone

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=7DD27721-D0DD-4DEA-85F1-4F55ED09E4DB@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).