ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: formating paragraph question
Date: Thu, 28 Oct 1999 15:02:53 +0100	[thread overview]
Message-ID: <3818578D.E50D4A18@wxs.nl> (raw)
In-Reply-To: <41256818.004B197F.00@smtp02.seinf.abb.se>

grzegorz.sapijaszko@pl.abb.com wrote:

> \defineparagraphs[limeryk]
>    [n=1,before={\startnarrower\startlines},after={\stopnarrower\stoplines}]

a matter of nesting and symmetry:                  
\stoplines\stopnarrower

> is there a way to format automatically these 5 (optionally, with author name, 6)
>  limerick lines, that is add (in macro) \hskip for 3-th and 4th line?
> 
> 1  The Swiss kicked him out on his ass.
> 2  M. Papon will no longer pass
> 3  \hskip1.3em For a free man. Long due,
> 4  \hskip1.3em Will a sentence come through?
> 5  We hope so. It should be a gas.
> \vskip1.5ex
> 6 \hskip2em David Franks

There is odd/even indentation support, but this limerick would go beyond
logic -)

\def\StartLimeric%
  {\startpacked
   \newcounter\LimericLine
   \def\\%
     {\increment\LimericLine\relax
      \ifcase\LimericLine\relax
      \or   \endgraf
      \or   \endgraf \hskip.3em
      \or   \endgraf \hskip.3em  
      \or   \endgraf
      \or   \endgraf \vskip.5ex 
      \else \endgraf \fi}

\def\StopLimeric%
  {\stoppacked}

\StartLimeric 
  line 1 \\ 
  line 2 \\ 
  line 3 \\ 
  line 4 \\
  line 5 \\
  line 6 \\
\StopLimeric

Untested, but that's the way. We could collect such macros in a poetry
module. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


  reply	other threads:[~1999-10-28 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-28 13:37 grzegorz.sapijaszko
1999-10-28 14:02 ` Hans Hagen [this message]
1999-10-28 15:13 ` Taco Hoekwater
1999-10-28 14:39   ` Hans Hagen
1999-10-28 21:03 Grzegorz Sapijaszko

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=3818578D.E50D4A18@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).