Re: [NTG-context] typesetting verse?

2006-08-23 Thread Hans Hagen
Derek Schmidt wrote:
 Hi,

 Another simple question--have at it!

 I'd like to typeset some poetry. It should be indented, obey lines,
 and the lines should be close together, not like separate paragraphs.
 So far I've got

 \definestartstop[verse][commands=\obeylines]


 What next?
   
\startlines...\stoplines

has provisions for odd/even indentation and such

also, indentation settings can handle odd/even stuff

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.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting verse?

2006-08-23 Thread John R. Culleton
On Tuesday 22 August 2006 23:39, Derek Schmidt wrote:
 Hi,

 Another simple question--have at it!

 I'd like to typeset some poetry. It should be indented, obey lines,
 and the lines should be close together, not like separate paragraphs.
 So far I've got

 \definestartstop[verse][commands=\obeylines]


 What next?

 All best,
 Derek
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

In a book being set in plain pdftex I used the following;

\newcount\numberoflines
\newcount\stanza
\stanza=5


\def\bpoem{%
\\
\begingroup
\everypar={\kern .18\hsize\advance\numberoflines1
\ifodd\numberoflines
\ifnum\numberoflines=\the\stanza
\vskip-\baselineskip\medskip\numberoflines=0\relax\fi%
\else%
\quad\fi}%
\obeylines}

\def\epoem{\everypar={}\par\endgroup\bigskip}

For each poem the quantity \stanza would be set first. Stanza is
the number of lines in each stanza plus one. A four lines per
stanza poem gets the value of 5.

Then the poem would be enclosed in \bpoem \epoem statements. 

Most pdftex statements will execute in Context. But if not, then
the above can be used as pseudocode to guide the process. 


The poems themselves would look like e.g:

\bpoem
`` The things of Christ the Spirit takes,
And to our heart reveals,
Our bodies He His temple makes,
And our redemption seals.

Almighty Spirit! Visit thus,
Our hearts, and guide our ways,
Pour down thy quickening grace on us,
And tune our lips to praise.''
\epoem

Most pdftex statements will execute in Context. But if not, then
the above can be used as pseudocode to guide the process. 



-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting verse?

2006-08-23 Thread Derek Schmidt
Ah, this has been very helpful indeed. Thanks all.

On 8/23/06, John R. Culleton [EMAIL PROTECTED] wrote:
 On Tuesday 22 August 2006 23:39, Derek Schmidt wrote:
  Hi,
 
  Another simple question--have at it!
 
  I'd like to typeset some poetry. It should be indented, obey lines,
  and the lines should be close together, not like separate paragraphs.
  So far I've got
 
  \definestartstop[verse][commands=\obeylines]
 
 
  What next?
 
  All best,
  Derek
  ___
  ntg-context mailing list
  ntg-context@ntg.nl
  http://www.ntg.nl/mailman/listinfo/ntg-context

 In a book being set in plain pdftex I used the following;

 \newcount\numberoflines
 \newcount\stanza
 \stanza=5


 \def\bpoem{%
 \\
 \begingroup
 \everypar={\kern .18\hsize\advance\numberoflines1
 \ifodd\numberoflines
 \ifnum\numberoflines=\the\stanza
 \vskip-\baselineskip\medskip\numberoflines=0\relax\fi%
 \else%
 \quad\fi}%
 \obeylines}

 \def\epoem{\everypar={}\par\endgroup\bigskip}
 
 For each poem the quantity \stanza would be set first. Stanza is
 the number of lines in each stanza plus one. A four lines per
 stanza poem gets the value of 5.

 Then the poem would be enclosed in \bpoem \epoem statements.

 Most pdftex statements will execute in Context. But if not, then
 the above can be used as pseudocode to guide the process.


 The poems themselves would look like e.g:

 \bpoem
 `` The things of Christ the Spirit takes,
 And to our heart reveals,
 Our bodies He His temple makes,
 And our redemption seals.

 Almighty Spirit! Visit thus,
 Our hearts, and guide our ways,
 Pour down thy quickening grace on us,
 And tune our lips to praise.''
 \epoem

 Most pdftex statements will execute in Context. But if not, then
 the above can be used as pseudocode to guide the process.



 --
 John Culleton
 Able Indexing and Typesetting
 Precision typesetting (tm) at reasonable cost.
 Satisfaction guaranteed.
 http://wexfordpress.com




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting verse?

2006-08-23 Thread Aditya Mahajan
On Wed, 23 Aug 2006, Hans Hagen wrote:

 Derek Schmidt wrote:
 Hi,

 Another simple question--have at it!

 I'd like to typeset some poetry. It should be indented, obey lines,
 and the lines should be close together, not like separate paragraphs.
 So far I've got

 \definestartstop[verse][commands=\obeylines]


 What next?

 \startlines...\stoplines

 has provisions for odd/even indentation and such

 also, indentation settings can handle odd/even stuff

Aparantly not! The following simple example does not give me indenting 
of odd lines (unless I misunderstood the feature)

\setupindenting[medium]
\setuplines[indenting=odd]

\starttext
\startlines
first
second
third
fourth
\stoplines

\stoptext


Aditya

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting verse?

2006-08-23 Thread Hans Hagen
Aditya Mahajan wrote:
 On Wed, 23 Aug 2006, Hans Hagen wrote:

   
 Derek Schmidt wrote:
 
 Hi,

 Another simple question--have at it!

 I'd like to typeset some poetry. It should be indented, obey lines,
 and the lines should be close together, not like separate paragraphs.
 So far I've got

 \definestartstop[verse][commands=\obeylines]


 What next?

   
 \startlines...\stoplines

 has provisions for odd/even indentation and such

 also, indentation settings can handle odd/even stuff
 

 Aparantly not! The following simple example does not give me indenting 
 of odd lines (unless I misunderstood the feature)

 \setupindenting[medium]
 \setuplines[indenting=odd]

 \starttext
 \startlines
 first
 second
 third
 fourth
 \stoplines

 \stoptext
   
\showframe

\starttext

\setupindenting[medium,first]

\setuplines[indenting=no]

\startlines
first
second
third
fourth

first
second
third
fourth
\stoplines

\setuplines[indenting=yes]

\startlines
first
second
third
fourth

first
second
third
fourth
\stoplines

\setuplines[indenting=odd]

\startlines
first
second
third
fourth

first
second
third
fourth
\stoplines

\setuplines[indenting=even]

\startlines
first
second
third
fourth

first
second
third
fourth
\stoplines

\page

\setupindenting[no]

first \par second \par third \par fourth \blank first \par second \par third 
\par fourth \blank

\setupindenting[yes]

first \par second \par third \par fourth \blank first \par second \par third 
\par fourth \blank

\setupindenting[odd]

first \par second \par third \par fourth \blank first \par second \par third 
\par fourth \blank

\setupindenting[even]

first \par second \par third \par fourth \blank first \par second \par third 
\par fourth \blank

\setupindenting[next]

first \par second \par third \par fourth \blank first \par second \par third 
\par fourth \blank

\setupindenting[first]

first \par second \par third \par fourth \blank first \par second \par third 
\par fourth \blank

\stoptext

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting verse?

2006-08-23 Thread Derek Schmidt
Aditya,

With the first group of code, I get indenting=yes actually appearing
in there; yet the lines aren't indented or closer together
(vertically). I removed the '%' but that didn't seem to make a
difference.

On 8/23/06, Aditya Mahajan [EMAIL PROTECTED] wrote:
 On Tue, 22 Aug 2006, Derek Schmidt wrote:

  Hi,
 
  Another simple question--have at it!
 
  I'd like to typeset some poetry. It should be

  indented,

 \startnarrower  \stopnarrower

  obey lines,

 \startlines ... \stoplines (it is more customizable than \obeylines)

 You can actually say

 \setupindenting[medium] \startlines[indenting=yes] (other options are
 no, yes, odd, even) and see which one you like.

  and the lines should be close together, not like separate paragraphs.

 \setupinterlinespace[line=2em]  \endgraf (default is 2.4 em)

  So far I've got
 
  \definestartstop[verse][commands=\obeylines]

 So you can try

 \def\startverse%
{\bgroup
 \setupinterlinespace[line=2em]
 \startlines[indenting=yes]}

 \def\stopverse%
 {\stoplines
  \endgraf\egroup}


 You could have also done the equivalent

 \definestartstop[verse][before={\setupinterlinespace[line=2em]\startlines},
  after={\stoplines\endgraf}]

 Aditya
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting verse?

2006-08-23 Thread Aditya Mahajan
On Wed, 23 Aug 2006, Derek Schmidt wrote:

 Aditya,

 With the first group of code, I get indenting=yes actually appearing
 in there; yet the lines aren't indented or closer together
 (vertically). I removed the '%' but that didn't seem to make a
 difference.

Sorry, that should have been \setuplines[indenting=yes]. Have a look 
at the code posted by Hans sometime back.

Aditya

 On 8/23/06, Aditya Mahajan [EMAIL PROTECTED] wrote:
 On Tue, 22 Aug 2006, Derek Schmidt wrote:

 Hi,

 Another simple question--have at it!

 I'd like to typeset some poetry. It should be

 indented,

 \startnarrower  \stopnarrower

 obey lines,

 \startlines ... \stoplines (it is more customizable than \obeylines)

 You can actually say

 \setupindenting[medium] \startlines[indenting=yes] (other options are
 no, yes, odd, even) and see which one you like.

 and the lines should be close together, not like separate paragraphs.

 \setupinterlinespace[line=2em]  \endgraf (default is 2.4 em)

 So far I've got

 \definestartstop[verse][commands=\obeylines]

 So you can try

 \def\startverse%
{\bgroup
 \setupinterlinespace[line=2em]
 \startlines[indenting=yes]}

 \def\stopverse%
 {\stoplines
  \endgraf\egroup}


 You could have also done the equivalent

 \definestartstop[verse][before={\setupinterlinespace[line=2em]\startlines},
  after={\stoplines\endgraf}]

 Aditya
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context




-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting verse?

2006-08-23 Thread Derek Schmidt
Ok guys, thanks. I eventually went with this:

\setupindenting[medium,first]

\def\startverse%
{\bgroup
\setupinterlinespace[medium]
\setuplines[indenting=yes]
\startlines}


\def\stopverse%
   {\stoplines
\endgraf\egroup}

On 8/23/06, Aditya Mahajan [EMAIL PROTECTED] wrote:
 On Wed, 23 Aug 2006, Derek Schmidt wrote:

  Aditya,
 
  With the first group of code, I get indenting=yes actually appearing
  in there; yet the lines aren't indented or closer together
  (vertically). I removed the '%' but that didn't seem to make a
  difference.

 Sorry, that should have been \setuplines[indenting=yes]. Have a look
 at the code posted by Hans sometime back.

 Aditya

  On 8/23/06, Aditya Mahajan [EMAIL PROTECTED] wrote:
  On Tue, 22 Aug 2006, Derek Schmidt wrote:
 
  Hi,
 
  Another simple question--have at it!
 
  I'd like to typeset some poetry. It should be
 
  indented,
 
  \startnarrower  \stopnarrower
 
  obey lines,
 
  \startlines ... \stoplines (it is more customizable than \obeylines)
 
  You can actually say
 
  \setupindenting[medium] \startlines[indenting=yes] (other options are
  no, yes, odd, even) and see which one you like.
 
  and the lines should be close together, not like separate paragraphs.
 
  \setupinterlinespace[line=2em]  \endgraf (default is 2.4 em)
 
  So far I've got
 
  \definestartstop[verse][commands=\obeylines]
 
  So you can try
 
  \def\startverse%
 {\bgroup
  \setupinterlinespace[line=2em]
  \startlines[indenting=yes]}
 
  \def\stopverse%
  {\stoplines
   \endgraf\egroup}
 
 
  You could have also done the equivalent
 
  \definestartstop[verse][before={\setupinterlinespace[line=2em]\startlines},
   after={\stoplines\endgraf}]
 
  Aditya
  ___
  ntg-context mailing list
  ntg-context@ntg.nl
  http://www.ntg.nl/mailman/listinfo/ntg-context
 
  ___
  ntg-context mailing list
  ntg-context@ntg.nl
  http://www.ntg.nl/mailman/listinfo/ntg-context
 
 
 

 --
 Aditya Mahajan, EECS Systems, University of Michigan
 http://www.eecs.umich.edu/~adityam || Ph: 7342624008
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] typesetting verse?

2006-08-22 Thread Derek Schmidt
Hi,

Another simple question--have at it!

I'd like to typeset some poetry. It should be indented, obey lines,
and the lines should be close together, not like separate paragraphs.
So far I've got

\definestartstop[verse][commands=\obeylines]


What next?

All best,
Derek
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context