[tex-eplain] Poetry environment

Adam Fenn acwfenn at ntlworld.com
Wed Jan 13 12:59:03 CET 2010


On 12 Jan 2010, at 19:53, John Frampton wrote:

>
> Is this what you want?
>
> \def\beginpoem{\bgroup
>    \tabskip=0pt plus 1fil
>    \halign to\hsize\bgroup\tabskip=1em plus1fil
>       ##\hfil& ##\hfil\tabskip=0pt plus1fil\cr
> }
> \def\endpoem{\egroup\egroup}
>
> \beginpoem
> I wandered lonely as a cloud&
>    Continuous as the stars that shine\cr
> That floats on high o'er vales and hills,&
>    And twinkle on the milky way,\cr
> When all at once I saw a crowd,&
>    They stretched in never-ending line\cr
> A host, of golden daffodils;&
>    Along the margin of a bay:\cr
> Beside the lake, beneath the trees,&
>    Ten thousand saw I at a glance,\cr
> Fluttering and dancing in the breeze.&
>    Tossing their heads in sprightly dance.\cr
> \endpoem

Sort of, in that it simplifies the preamble. But the real problem is 
that you still have to do a lot of cutting and pasting to set it up 
correctly i.e. the 1st line from the 1st stanza and the 2nd line from 
the 2nd stanza are needed for the 1st line of the table and so on.

The ease of use that I'm after can be seen in the example below whereby 
I wrap the \mypoem macro in eplain's \doublecolumns macro. However the 
result is not what I want as the spacing between the stanzas and 
borders is not correct (they should be equal as in John's example).

Thanks for your help.

\def\mypoem{\environment{@mypoem}%
\begingroup\bigskip
\let\par=\cr \obeylines
\tabskip=0pt   plus 1fil
\halign to\hsize\bgroup%
##\hfil}

\def\endmypoem{%
\egroup
\endgroup\bigskip\endenvironment{@mypoem}%
}

\doublecolumns
\mypoem
I wandered lonely as a cloud
That floats on high o'er vales and hills,
When all at once I saw a crowd,
A host, of golden daffodils;
Beside the lake, beneath the trees,
Fluttering and dancing in the breeze.

Continuous as the stars that shine
And twinkle on the milky way,
They stretched in never-ending line
Along the margin of a bay:
Ten thousand saw I at a glance,
Tossing their heads in sprightly dance.
\endmypoem
\singlecolumn
\bye



More information about the tex-eplain mailing list