HOWTO: Typesetting Poetry in ConTeXt
I thought I'd give the mailing list a small change of pace---instead of asking how to do it, I will show you :) The short answer is: \starttext My Concrete Poem \startlines All the white space will print ! \stoplines \stoptext However, \startlines..\stoplines is not available when defining a macro. I've documented the solution to this situation on my blog: http://drippingdigital.com/blog/2010/09/typesetting-poetry-in-context/ Thanks to Wolfgang Schuster for helping me work it out!
Apologies, as a very significant aspect of this process was omitted in the previous email! Don't forget to do: \setuplines[space=on] first! On Wed, Sep 15, 2010 at 9:45 AM, John Haltiwanger < john.haltiwanger@gmail.com> wrote:
I thought I'd give the mailing list a small change of pace---instead of asking how to do it, I will show you :)
The short answer is:
\starttext My Concrete Poem
\startlines All the white space will print ! \stoplines \stoptext
However, \startlines..\stoplines is not available when defining a macro. I've documented the solution to this situation on my blog: http://drippingdigital.com/blog/2010/09/typesetting-poetry-in-context/
Thanks to Wolfgang Schuster for helping me work it out!
On Wed, 15 Sep 2010, John Haltiwanger wrote:
Apologies, as a very significant aspect of this process was omitted in the previous email!
Don't forget to do:
\setuplines[space=on]
first!
On Wed, Sep 15, 2010 at 9:45 AM, John Haltiwanger < john.haltiwanger@gmail.com> wrote:
I thought I'd give the mailing list a small change of pace---instead of asking how to do it, I will show you :)
The short answer is:
\starttext My Concrete Poem
\startlines All the white space will print ! \stoplines \stoptext
However, \startlines..\stoplines is not available when defining a macro.
What do you mean by that these macros are not available? Doesn't the following work? (untested, but I will be really surprised if it doesn't work) \def\startpoety {\startlines % All the remaining setup } \def\stoppoety {%whatever setup you want \stoplines} Aditya
Am 16.09.2010 um 00:38 schrieb Aditya Mahajan:
However, \startlines..\stoplines is not available when defining a macro.
What do you mean by that these macros are not available?
Doesn't the following work? (untested, but I will be really surprised if it doesn't work)
\def\startpoety {\startlines % All the remaining setup }
\def\stoppoety {%whatever setup you want \stoplines}
He use \def\poetry {\startlines line 1 line 2 ... \stoplines} and this doesn't work. Wolfgang
What Wolfgange said :) On Wed, Sep 15, 2010 at 10:42 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 16.09.2010 um 00:38 schrieb Aditya Mahajan:
However, \startlines..\stoplines is not available when defining a macro.
What do you mean by that these macros are not available?
Doesn't the following work? (untested, but I will be really surprised if it doesn't work)
\def\startpoety {\startlines % All the remaining setup }
\def\stoppoety {%whatever setup you want \stoplines}
He use
\def\poetry {\startlines line 1 line 2 ... \stoplines}
and this doesn't work.
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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
On Thu, 16 Sep 2010, Wolfgang Schuster wrote:
Am 16.09.2010 um 00:38 schrieb Aditya Mahajan:
However, \startlines..\stoplines is not available when defining a macro.
What do you mean by that these macros are not available?
Doesn't the following work? (untested, but I will be really surprised if it doesn't work)
\def\startpoety {\startlines % All the remaining setup }
\def\stoppoety {%whatever setup you want \stoplines}
He use
\def\poetry {\startlines line 1 line 2 ... \stoplines}
and this doesn't work.
Oh. In that case, I will do \startbuffer[poerty] line 1 line \stopbuffer \def\poetry {\startlines \getbuffer[poetry] \stoplines} or even \def\getpoerty#1[#2]% {\startlines \getbuffer[#2] \stoplines} That should work (again untested). Aditya
Yeah, that seems like a good way to go. Now I finally understand what
Wolfgang was saying last night :)
Since whitespace wasn't important to this particular poem, it did not matter
(using \par worked fine). But I will update my blog with this for sure, as
in the case of whitespace-sensitive poetry its a much better solution.
In general though, it is completely unnecessary, as poetry generally has no
need to be defined in macros. But it's the edge cases, where I live :)
On Wed, Sep 15, 2010 at 10:47 PM, Aditya Mahajan
On Thu, 16 Sep 2010, Wolfgang Schuster wrote:
Am 16.09.2010 um 00:38 schrieb Aditya Mahajan:
However, \startlines..\stoplines is not available when defining a macro.
What do you mean by that these macros are not available?
Doesn't the following work? (untested, but I will be really surprised if it doesn't work)
\def\startpoety {\startlines % All the remaining setup }
\def\stoppoety {%whatever setup you want \stoplines}
He use
\def\poetry {\startlines line 1 line 2 ... \stoplines}
and this doesn't work.
Oh. In that case, I will do
\startbuffer[poerty] line 1 line \stopbuffer
\def\poetry {\startlines \getbuffer[poetry] \stoplines}
or even
\def\getpoerty#1[#2]% {\startlines \getbuffer[#2] \stoplines}
That should work (again untested).
Aditya
___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
On Wed, 15 Sep 2010, John Haltiwanger wrote:
In general though, it is completely unnecessary, as poetry generally has no need to be defined in macros. But it's the edge cases, where I live :)
On the contrary, typesetting poerty can be very tricky. This is what I did once to typeset the divine comedy. Don't ask how I figured out the right value of the inbetween key :) \setupindenting [medium,yes] \setuplines[inbetween={\crlf\par\setupindenting[next]\testpage[3]},indenting=next] \starttext \startlines Midway upon the journey of our life I found myself within a forest dark, For the straightforward pathway had been lost. Ah me! how hard a thing it is to say What was this forest savage, rough, and stern, Which in the very thought renews the fear. So bitter is it, death is little more; But of the good to treat, which there I found, Speak will I of the other things I saw there. I cannot well repeat how there I entered, So full was I of slumber at the moment In which I had abandoned the true way. But after I had reached a mountain's foot, At that point where the valley terminated, Which had with consternation pierced my heart, ... \stoplines \stoptext Aditya
On Wed, Sep 15, 2010 at 11:12 PM, Aditya Mahajan
On Wed, 15 Sep 2010, John Haltiwanger wrote:
In general though, it is completely unnecessary, as poetry generally has
no need to be defined in macros. But it's the edge cases, where I live :)
On the contrary, typesetting poerty can be very tricky. This is what I did once to typeset the divine comedy. Don't ask how I figured out the right value of the inbetween key :)
\setupindenting [medium,yes]
\setuplines[inbetween={\crlf\par\setupindenting[next]\testpage[3]},indenting=next]
\starttext \startlines Midway upon the journey of our life I found myself within a forest dark, For the straightforward pathway had been lost.
Ah me! how hard a thing it is to say What was this forest savage, rough, and stern, Which in the very thought renews the fear.
So bitter is it, death is little more; But of the good to treat, which there I found, Speak will I of the other things I saw there.
I cannot well repeat how there I entered, So full was I of slumber at the moment In which I had abandoned the true way.
But after I had reached a mountain's foot, At that point where the valley terminated, Which had with consternation pierced my heart,
... \stoplines \stoptext
Yes, but this is an example of what I am saying: in general \startlines..\stoplines is enough (albeit here with some extra stuff integrated into \setuplines[inbetween=]). It seems to me that pretty much only if you are doing something generative would you need to worry about the specifics of buffers and defining macros for typesetting poetry (as was my case with writing a dedication page in a pandoc template). No \startpoem..\stoppoem, or even \poem (though now I am having some nice ideas for weird poetry.. as I said, I spend a lot of time with edge cases ;) Interestingly, this conversation has cleared up a few lingering details in my mind re: ConTeXt. Maybe a poetry typesetting tutorial is a worthy way to explain some key concepts? I'd be really curious to see your edition of the Inferno, by the way.
Hi John, On Wed, 15 Sep 2010, John Haltiwanger wrote:
Interestingly, this conversation has cleared up a few lingering details in my mind re: ConTeXt. Maybe a poetry typesetting tutorial is a worthy way to explain some key concepts?
Definite write such a tutorial. I think ConTeXt is lacking such explanations by beginners on how they understood specific ConTeXtisms. Most ConTeXt tutorials and manuals are written by users who know ConTeXt too well to realize what others may find to be confusing. Best Wishes, Aditya
I totally agree. My experience with ConTeXt is that I can obtain incredible results. But I have to dig into docs, typically with no much hope, and at the end I ask the list. The solution is typically cut and past from a guru's email :-). Best -a- On Sep 16, 2010, at 1:51 AM, Aditya Mahajan wrote:
Hi John,
On Wed, 15 Sep 2010, John Haltiwanger wrote:
Interestingly, this conversation has cleared up a few lingering details in my mind re: ConTeXt. Maybe a poetry typesetting tutorial is a worthy way to explain some key concepts?
Definite write such a tutorial. I think ConTeXt is lacking such explanations by beginners on how they understood specific ConTeXtisms. Most ConTeXt tutorials and manuals are written by users who know ConTeXt too well to realize what others may find to be confusing.
Best Wishes, Aditya
___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-------------------------------------------------- Andrea Valle -------------------------------------------------- CIRMA - DAMS Università degli Studi di Torino --> http://www.cirma.unito.it/andrea/ --> http://www.myspace.com/andreavalle --> http://www.flickr.com/photos/vanderaalle/ --> http://www.youtube.com/user/vanderaalle --> andrea.valle@unito.it -------------------------------------------------- " This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a lotta what-have-yous." (Jeffrey 'The Dude' Lebowski)
Am 16.09.2010 um 01:12 schrieb Aditya Mahajan:
On Wed, 15 Sep 2010, John Haltiwanger wrote:
In general though, it is completely unnecessary, as poetry generally has no need to be defined in macros. But it's the edge cases, where I live :)
On the contrary, typesetting poerty can be very tricky. This is what I did once to typeset the divine comedy. Don't ask how I figured out the right value of the inbetween key :)
\setupindenting [medium,yes] \setuplines[inbetween={\crlf\par\setupindenting[next]\testpage[3]},indenting=next]
You don’t need \testpage to keep the lines together, with the “option=packed” setting there won’t happen a linebreak between the text but the ”preference” keyword for \blank allows one. \setuplines [option=packed, inbetween={\blank[preference,line]\setupindenting[next]}, indenting=next] Wolfgang
I don't usually define macros like that (isn't that more of a
\definestartstop kind of deal?).
On Wed, Sep 15, 2010 at 10:38 PM, Aditya Mahajan
On Wed, 15 Sep 2010, John Haltiwanger wrote:
Apologies, as a very significant aspect of this process was omitted in the
previous email!
Don't forget to do:
\setuplines[space=on]
first!
On Wed, Sep 15, 2010 at 9:45 AM, John Haltiwanger < john.haltiwanger@gmail.com> wrote:
I thought I'd give the mailing list a small change of pace---instead of
asking how to do it, I will show you :)
The short answer is:
\starttext My Concrete Poem
\startlines All the white space will print ! \stoplines \stoptext
However, \startlines..\stoplines is not available when defining a macro.
What do you mean by that these macros are not available?
Doesn't the following work? (untested, but I will be really surprised if it doesn't work)
\def\startpoety {\startlines % All the remaining setup }
\def\stoppoety {%whatever setup you want \stoplines}
Aditya
___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
On Wed, 15 Sep 2010, John Haltiwanger wrote:
I don't usually define macros like that (isn't that more of a \definestartstop kind of deal?).
\definestartstop just provides some syntax sugar around that.
From core-sys.mkiv
\def\dododefinestartstop[#1][#2]% { .... \setvalue{\e!start#1}% {\getvalue{\??be#1\c!before}% \bgroup \getvalue{\??be#1\c!commands}% \dostarttagged\t!construct{#1}% \dostartattributes{\??be#1}\c!style\c!color\empty}% \setvalue{\e!stop#1}% {\dostopattributes \dostoptagged \egroup \getvalue{\??be#1\c!after}}} So, it is basically defining \start#1 and \stop#1, while I was defining them explicitly. Aditya
On 2010-09-15 <22:26:38>, John Haltiwanger wrote:
Apologies, as a very significant aspect of this process was omitted in the previous email!
Don't forget to do:
\setuplines[space=on]
Hi all, I'm sorry to hijack the thread but I have trouble understanding how the [space=on] works. In the following example: ···8<···························································· \setuplines[space=on] \starttext \startlines A one, two, a one two three four Half a {\em{bee}}, philosophically, must, ipso facto, half not be. But half the bee has got to be, vis a vis its entity. {\bf D'you see}? But can a {\em bee} be said to be or not to be an entire bee, when half the bee is {\em{}not a bee}, due to some ancient injury? \stoplines \stoptext ···8<···························································· the spaces after the formatting commands “\em” and “\bf” are respected unless the following token starts a group. Is this working as expected? Another question: How can I reproduce MkII's behaviour of indicating the spaces in MkIV? Thanks for the help, Philipp Btw, @John: thanks for your additions to the \[start|stop]lines wiki page, I just had need for the command for the first time and it's a good intro.
first!
On Wed, Sep 15, 2010 at 9:45 AM, John Haltiwanger < john.haltiwanger@gmail.com> wrote:
I thought I'd give the mailing list a small change of pace---instead of asking how to do it, I will show you :)
The short answer is:
\starttext My Concrete Poem
\startlines All the white space will print ! \stoplines \stoptext
However, \startlines..\stoplines is not available when defining a macro. I've documented the solution to this situation on my blog: http://drippingdigital.com/blog/2010/09/typesetting-poetry-in-context/
Thanks to Wolfgang Schuster for helping me work it out!
___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
participants (5)
-
Aditya Mahajan
-
Andrea Valle
-
John Haltiwanger
-
Philipp Gesang
-
Wolfgang Schuster