ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* typesetting verse?
@ 2006-08-23  3:39 Derek Schmidt
  2006-08-23  4:24 ` Aditya Mahajan
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Derek Schmidt @ 2006-08-23  3:39 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23  3:39 typesetting verse? Derek Schmidt
@ 2006-08-23  4:24 ` Aditya Mahajan
  2006-08-23 22:35   ` Derek Schmidt
  2006-08-23  8:09 ` Hans Hagen
  2006-08-23 14:02 ` John R. Culleton
  2 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2006-08-23  4:24 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23  3:39 typesetting verse? Derek Schmidt
  2006-08-23  4:24 ` Aditya Mahajan
@ 2006-08-23  8:09 ` Hans Hagen
  2006-08-23 14:44   ` Aditya Mahajan
  2006-08-23 14:02 ` John R. Culleton
  2 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2006-08-23  8:09 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23  3:39 typesetting verse? Derek Schmidt
  2006-08-23  4:24 ` Aditya Mahajan
  2006-08-23  8:09 ` Hans Hagen
@ 2006-08-23 14:02 ` John R. Culleton
  2006-08-23 14:12   ` Derek Schmidt
  2 siblings, 1 reply; 10+ messages in thread
From: John R. Culleton @ 2006-08-23 14:02 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23 14:02 ` John R. Culleton
@ 2006-08-23 14:12   ` Derek Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: Derek Schmidt @ 2006-08-23 14:12 UTC (permalink / raw)


Ah, this has been very helpful indeed. Thanks all.

On 8/23/06, John R. Culleton <john@wexfordpress.com> 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
>
>
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23  8:09 ` Hans Hagen
@ 2006-08-23 14:44   ` Aditya Mahajan
  2006-08-23 22:17     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2006-08-23 14:44 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23 14:44   ` Aditya Mahajan
@ 2006-08-23 22:17     ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2006-08-23 22:17 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23  4:24 ` Aditya Mahajan
@ 2006-08-23 22:35   ` Derek Schmidt
  2006-08-23 22:38     ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Derek Schmidt @ 2006-08-23 22:35 UTC (permalink / raw)


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 <adityam@umich.edu> 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
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23 22:35   ` Derek Schmidt
@ 2006-08-23 22:38     ` Aditya Mahajan
  2006-08-24  0:22       ` Derek Schmidt
  0 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2006-08-23 22:38 UTC (permalink / raw)


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 <adityam@umich.edu> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: typesetting verse?
  2006-08-23 22:38     ` Aditya Mahajan
@ 2006-08-24  0:22       ` Derek Schmidt
  0 siblings, 0 replies; 10+ messages in thread
From: Derek Schmidt @ 2006-08-24  0:22 UTC (permalink / raw)


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 <adityam@umich.edu> 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 <adityam@umich.edu> 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
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-08-24  0:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-23  3:39 typesetting verse? Derek Schmidt
2006-08-23  4:24 ` Aditya Mahajan
2006-08-23 22:35   ` Derek Schmidt
2006-08-23 22:38     ` Aditya Mahajan
2006-08-24  0:22       ` Derek Schmidt
2006-08-23  8:09 ` Hans Hagen
2006-08-23 14:44   ` Aditya Mahajan
2006-08-23 22:17     ` Hans Hagen
2006-08-23 14:02 ` John R. Culleton
2006-08-23 14:12   ` Derek Schmidt

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).