Re: [NTG-context] Pagebreak only after stanzas

2007-04-17 Thread Hans Hagen
Aditya Mahajan wrote:
 On Sat, 14 Apr 2007, Bert Tr�ger wrote:

   
 Hi,

 i am a fresh convert to Context from Latex and deeply impressed by
 it's ability to set multiple pages on one page, even doublesided
 ones.
 For setting a collection of poems I use \obeylines and \smallskip
 to arrange them on the page. Pagebreaks should only be possible
 between stanzas at the \smallskip-mark. Could somebody tell me, how
 to achieve this?
 

 Probably, the easiest way to do that will be to add a bit of a markup. 
 Something like (untested)

 \setuplines[after={\blank[small]}] %or after=\smallskip
 \defineframedtext[stanza][width=\textwidth,before=\startlines,after=\stoplines]

 \startstanza
 .
 .
 \stopstanza
   
\start
\interlinepenalty\plustenthousand
stanze
\par
\stop

 \keeplinestogether{4} 
stanza 

may also work (untested) 

-
  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] Pagebreak only after stanzas

2007-04-15 Thread Bert Trüger

Hi again,

I have tried to implement Adityas suggestions. Now pagebreaks are correct.
But how can I minimize the whitespace between stanzas. There shouldn't be
much more than a \smallskip.  I tried to look it up in the contextgarden
wiki, but an entry on verses seems to be missing, so I could wikify the
solutions.

Thanks in advance

Chris

A minimal example looks like:

\setuppapersize[A6][A6]
\setuplayout[
topspace=1cm,backspace=1cm,header=0pt,footer=0pt,margin=.5cm,height=middle,width=middle,]

\usetypescriptfile[type-gyr]
\usetypescript[times][texnansi]
\mainlanguage[de]
\enableregime[utf]
\setupbodyfont[times,9pt]

\setupindenting[medium, no]

\setupframedtexts[width=\textwidth,height=fit,frame=on]

\starttext
\subsection{Novalis—An Tieck}
\obeylines
\startframedtext
Ein Kind voll Wehmut und voll Teue,
Verstoßen in ein fremdes Land,
Ließ gern das Glänzende und Neue,
Und blieb dem Alten zugewandt.
\stopframedtext
\startframedtext
Nach langem Suchen, langem Warten,
Nach manchem mühevollen Gang,
Fand es in einem öden Garten
Auf einer längst verfallenen Bank
\stopframedtext
\startframedtext
Ein altes Buch mit Gold verschlossen,
Und nie gehörte Worte drin;
Und, wie des Frühlings zarte Sprossen,
So wuchs in ihm ein innrer Sinn.
\stopframedtext
\startframedtext
Und wie es sitzt, und liest, und schauet
In den Kristall der neuen Welt,
An Gras und Sternen sich erbaut,
Und dankbar auf die Kniee fällt:
\stopframedtext
\startframedtext
So hebt sich sacht aus Gras und Kräutern
Bedächtiglich ein alter Mann,
Im schlichten Rock, und kommt mit heiterm
Gesicht ans fromme Kind heran.
\stopframedtext
\startframedtext
Bekannt, doch heimlich sind die Züge
So kindlich und so wunderbar;
Es spielt die Frühlingsluft der Wiege
Gar seltsam mit dem Silberhaar.
\stopframedtext
\startframedtext
Das Kind fasst bebend seine Hände,
Es ist des Buches hoher Geist,
Der ihm der sauren Wallfahrt Ende
Und seines Vaters Wohnung weist.
\stopframedtext
\startframedtext
Du kniest auf meinem öden Grabe,
So öffnet sich der heilge Mund,
Du bist der Erbe meiner Habe,
Dir werde Gottes Tiefe kund.
\stopframedtext
\startframedtext
Auf jenem Berg als armer Knabe
Hab ich ein himmlisch Buch gesehn,
Und konnte nun durch diese Gabe
In alle Kreaturen sehn.
\stopframedtext
\startframedtext
Es sind an mir durch Gottes Gnade
Der höchsten Wunder viel geschehn;
Des neuen Bunds geheime Lade
Sahn meine Auge offen stehn.
\stopframedtext
\startframedtext
Ich habe treulich aufgeschrieben,
Was innre Lust mir offenbart,
Und bin verkannt und arm geblieben,
Bis ich zu Gott gerufen ward.
\stopframedtext
\startframedtext
Die Zeit ist da, und nicht verborgen
Soll das Mysterium mehr sein.
In diesem Buche bricht der Morgen
Gewaltig in die Zeit hinein.
\stopframedtext
\startframedtext
Verkündiger der Morgenröte,
Des Friedens Bote sollst du sein.
Sanft wie die Luft in Harf und Flöte
Hauch ich dir meinen Atem ein.
\stopframedtext
\startframedtext
Gott sei mit dir, geh hin und wasche
Die Augen dir mir Morgentau.
Sei treu dem Buch und meiner Asche,
Und bade dich im ewgen Blau.
\stopframedtext
\startframedtext
Du wirst das letzte Reich verkünden,
Das tausend Jahre soll bestehen;
Wirst überschwänglich Wesen finden,
Und Jakob Böhmen wieder sehn.
\stopframedtext

\stoptext


On 4/14/07, Aditya Mahajan [EMAIL PROTECTED] wrote:


On Sat, 14 Apr 2007, Bert Trüger wrote:

 Hi,

 i am a fresh convert to Context from Latex and deeply impressed by
 it's ability to set multiple pages on one page, even doublesided
 ones.
 For setting a collection of poems I use \obeylines and \smallskip
 to arrange them on the page. Pagebreaks should only be possible
 between stanzas at the \smallskip-mark. Could somebody tell me, how
 to achieve this?

Probably, the easiest way to do that will be to add a bit of a markup.
Something like (untested)

\setuplines[after={\blank[small]}] %or after=\smallskip

\defineframedtext[stanza][width=\textwidth,before=\startlines,after=\stoplines]

\startstanza


\stopstanza

Since framedtext is a box, it will not break across pages.

Aditya
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Pagebreak only after stanzas

2007-04-15 Thread Wolfgang Schuster
On Sun, 15 Apr 2007 15:27:20 +0200
Bert Trüger [EMAIL PROTECTED] wrote:

 Hi again,
 
 I have tried to implement Adityas suggestions. Now pagebreaks are correct.
 But how can I minimize the whitespace between stanzas. There shouldn't be
 much more than a \smallskip.  I tried to look it up in the contextgarden
 wiki, but an entry on verses seems to be missing, so I could wikify the
 solutions.
 
 Thanks in advance
 
 Chris
 
 A minimal example looks like:
 
 \setuppapersize[A6][A6]
 \setuplayout[
 topspace=1cm,backspace=1cm,header=0pt,footer=0pt,margin=.5cm,height=middle,width=middle,]
 
 \usetypescriptfile[type-gyr]
 \usetypescript[times][texnansi]
 \mainlanguage[de]
 \enableregime[utf]
 \setupbodyfont[times,9pt]
 
 \setupindenting[medium, no]
 
 \setupframedtexts[width=\textwidth,height=fit,frame=on]
 
 \starttext
 \subsection{Novalis—An Tieck}
 \obeylines
 \startframedtext
 Ein Kind voll Wehmut und voll Teue,
 Verstoßen in ein fremdes Land,
 Ließ gern das Glänzende und Neue,
 Und blieb dem Alten zugewandt.
 \stopframedtext
 \startframedtext
 Nach langem Suchen, langem Warten,
 Nach manchem mühevollen Gang,
 Fand es in einem öden Garten
 Auf einer längst verfallenen Bank
 \stopframedtext
 
 \stoptext

Hi Bert,

can you file with these settings

\setupframedtexts
  [framedtext]
  [width=\textwidth,
   height=fit,
   before=,
   after=]

\setuplines
  [before=\startframedtext,
   after=\stopframedtext]

\starttext

\subsection{Novalis--An Tieck}

\startlines
Ein Kind voll Wehmut und voll Teue,
Verstoßen in ein fremdes Land,
Ließ gern das Glänzende und Neue,
Und blieb dem Alten zugewandt.
\stoplines

\startlines
Nach langem Suchen, langem Warten,
Nach manchem mühevollen Gang,
Fand es in einem öden Garten
Auf einer längst verfallenen Bank
\stoplines

\stoptext

Wolfgang
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Pagebreak only after stanzas

2007-04-14 Thread luigi scarso
On 4/14/07, Bert Trüger [EMAIL PROTECTED] wrote:
 Hi,

 i am a fresh convert to Context from Latex and deeply impressed by
 it's ability to set multiple pages on one page, even doublesided
 ones.
 For setting a collection of poems I use \obeylines and \smallskip
 to arrange them on the page. Pagebreaks should only be possible
 between stanzas at the \smallskip-mark. Could somebody tell me, how
 to achieve this?
Can you post a small example ?
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Pagebreak only after stanzas

2007-04-14 Thread Aditya Mahajan
On Sat, 14 Apr 2007, Bert Trüger wrote:

 Hi,

 i am a fresh convert to Context from Latex and deeply impressed by
 it's ability to set multiple pages on one page, even doublesided
 ones.
 For setting a collection of poems I use \obeylines and \smallskip
 to arrange them on the page. Pagebreaks should only be possible
 between stanzas at the \smallskip-mark. Could somebody tell me, how
 to achieve this?

Probably, the easiest way to do that will be to add a bit of a markup. 
Something like (untested)

\setuplines[after={\blank[small]}] %or after=\smallskip
\defineframedtext[stanza][width=\textwidth,before=\startlines,after=\stoplines]

\startstanza


\stopstanza

Since framedtext is a box, it will not break across pages.

Aditya
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context