Parallel texts: verse with blanks between stanzas via tabulate
Hi, I need to typeset two poems side by side. Usually, I use the tabulate environment for typesetting parallel texts. However, for poems this does not quite work as tabulate does not seem to allow blanks between the stanzas. See MWE below. Am I missing someting? Is there a better way to achieve this? Best, Denis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \startbuffer[lines] \startlines[after={\blank}] this is a poem with two stanzas \stoplines \stopbuffer \starttext With a blank between the stanzas: \getbuffer[lines] Without a blank between the stanzas: \starttabulate[|p|p|] \NC \getbuffer[lines] \NC \getbuffer[lines] \NC\NR \stoptabulate \stoptext %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context:
Hi,
I need to typeset two poems side by side. Usually, I use the tabulate environment for typesetting parallel texts. However, for poems this does not quite work as tabulate does not seem to allow blanks between the stanzas. See MWE below. Am I missing someting? Is there a better way to achieve this?
How about columnsets or paragraphs? \definecolumnset[Zwei][n=2] \startcolumnset[Zwei] \startlines Starlight, star bright, first star I see tonight; \stoplines \column \startlines I wish I may, I wish I might have the wish I wish tonight. \stoplines \stopcolumnset \defineparagraphs[Zwei][n=2] \setupparagraphs[Zwei][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] % width of 2nd column is calculated automatically \startZwei ... \nextZwei ... \stopZwei Hraban
Thanks. I'll try that. But, iirc, these had some other drawbacks.... I'll check if it works for my use case.
Is there a way to have blanks in the tabulate?
Denis
________________________________________
Von: ntg-context
Hi,
I need to typeset two poems side by side. Usually, I use the tabulate environment for typesetting parallel texts. However, for poems this does not quite work as tabulate does not seem to allow blanks between the stanzas. See MWE below. Am I missing someting? Is there a better way to achieve this?
How about columnsets or paragraphs? \definecolumnset[Zwei][n=2] \startcolumnset[Zwei] \startlines Starlight, star bright, first star I see tonight; \stoplines \column \startlines I wish I may, I wish I might have the wish I wish tonight. \stoplines \stopcolumnset \defineparagraphs[Zwei][n=2] \setupparagraphs[Zwei][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] % width of 2nd column is calculated automatically \startZwei ... \nextZwei ... \stopZwei Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
Thanks, Wolfgang. That gives me a blank between the verses. However the blank is rather huge and I don't see how I could make it smaller? Is it possible to do this? Denis
-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Wolfgang Schuster via ntg-context Gesendet: Samstag, 27. August 2022 09:27 An: mailing list for ConTeXt users Cc: Wolfgang Schuster Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate Denis Maier via ntg-context schrieb am 27.08.2022 um 09:17:
Thanks. I'll try that. But, iirc, these had some other drawbacks.... I'll check if it works for my use case.
Is there a way to have blanks in the tabulate?
\startlines[inbetween={\dontleavehmode\crlf}] ...
Wolfgang
______________________________________________________________ _____________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg- context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ______________________________________________________________ _____________________
On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:
Thanks, Wolfgang. That gives me a blank between the verses. However the blank is rather huge and I don't see how I could make it smaller? Is it possible to do this? morning exercise attached (you can run the file)
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Thanks Hans, that's very nice indeed. Looks like I really need to dive into CLD. There seem to be so many possibilies... However, the major pitfall seems to be that this assumes stanzas of equal length (as it relies on \TB to produce the blanks), which does not apply to my situation. (Modfied version attached.) Do you see any way to support this kind of situation? Best, Denis
-----Ursprüngliche Nachricht----- Von: Hans Hagen
Gesendet: Sonntag, 28. August 2022 10:41 An: mailing list for ConTeXt users Cc: Maier, Denis Christian (UB) Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:
Thanks, Wolfgang. That gives me a blank between the verses. However the blank is rather huge and I don't see how I could make it smaller? Is it possible to do this? morning exercise attached (you can run the file)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
-----Ursprüngliche Nachricht----- Von: Hans Hagen
Gesendet: Sonntag, 28. August 2022 10:41 An: mailing list for ConTeXt users Cc: Maier, Denis Christian (UB) Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:
Thanks, Wolfgang. That gives me a blank between the verses. However the blank is rather huge and I don't see how I could make it smaller? Is it possible to do this? morning exercise attached (you can run the file)
Hans
Another, more general question on this: why is the function poetry.sidebyside defined twice? If I understand correctly, depending on the input one or the other will be used, but I don't see where that happens... Best, Denis
-----Ursprüngliche Nachricht----- Von: Hans Hagen
Gesendet: Sonntag, 28. August 2022 10:41 An: mailing list for ConTeXt users Cc: Maier, Denis Christian (UB) Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:
Thanks, Wolfgang. That gives me a blank between the verses. However the blank is rather huge and I don't see how I could make it smaller? Is it possible to do this? morning exercise attached (you can run the file)
Hans
Another, more general question on this: why is the function poetry.sidebyside defined twice? If I understand correctly, depending on the input one or the other will be used, but I don't see where that happens...
On 8/29/2022 1:31 PM, Denis Maier via ntg-context wrote: the first can be commented as it is the first simple variant Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
-----Ursprüngliche Nachricht-----
Von: ntg-context
mailto:ntg-context-bounces@ntg.nl> Im Auftrag von Hans Hagen
via ntg-context
Gesendet: Montag, 29. August 2022 13:58
An: ntg-context@ntg.nlmailto:ntg-context@ntg.nl
Cc: Hans Hagen
mailto:j.hagen@xs4all.nl>
Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas
via tabulate
On 8/29/2022 1:31 PM, Denis Maier via ntg-context wrote:
-----Ursprüngliche Nachricht-----
Von: Hans Hagen
mailto:j.hagen@freedom.nl>
Gesendet: Sonntag, 28. August 2022 10:41
An: mailing list for ConTeXt users
mailto:ntg-context@ntg.nl>
Cc: Maier, Denis Christian (UB)
mailto:denis.maier@unibe.ch>
Betreff: Re: [NTG-context] Parallel texts: verse with blanks between
stanzas via tabulate
On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:
Thanks, Wolfgang. That gives me a blank between the verses. However
the
blank is rather huge and I don't see how I could make it smaller? Is
it possible to do this?
morning exercise attached (you can run the file)
Hans
Another, more general question on this: why is the function
poetry.sidebyside defined twice? If I understand correctly, depending on the
input one or the other will be used, but I don't see where that happens...
the first can be commented as it is the first simple variant
I see. Thanks for the updated version. So, that means the basic restriction is that blanks will need to be inserted between rows, right? We cannot have to two completely independent formatted poems, right? (For reference, see the attached PNG. This was done with paragraphs, and works as longs as this stays on a single page. One is one long stanza, the other one consists of multiple smaller stanzas.) Denis
On 8/30/2022 1:40 PM, denis.maier@unibe.ch wrote:
Thanks for the updated version. So, that means the basic restriction is that blanks will need to be inserted between rows, right? We cannot have to two completely independent formatted poems, right? (For reference, see the attached PNG. This was done with paragraphs, and works as longs as this stays on a single page. One is one long stanza, the other one consists of multiple smaller stanzas.) You need to be more prececise in defining what you want .. this example is not a parallel obe right? Just two columns.
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
-----Ursprüngliche Nachricht----- Von: Hans Hagen
Gesendet: Dienstag, 30. August 2022 14:31 An: Maier, Denis Christian (UB) ; mailing list for ConTeXt users Betreff: Re: AW: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate On 8/30/2022 1:40 PM, denis.maier@unibe.ch wrote:
Thanks for the updated version. So, that means the basic restriction is that blanks will need to be inserted between rows, right? We cannot have to two completely independent formatted poems, right? (For reference, see the attached PNG. This was done with paragraphs, and works as longs as this stays on a single page. One is one long stanza, the other one consists of multiple smaller stanzas.) You need to be more prececise in defining what you want .. this example is not a parallel obe right? Just two columns.
Sorry for not being precise enough. I'm not sure I understand. This example shows two poems side by side. Both are totally different in structure. One has a heading, and consists of multiple paragraphs. The other is just one long stanza. Until now, I've used tabulate for these kind of sidebyside texts. Usually there are not poems, just regular paragraphs, but with poems I've realized that blanks seem not be supported in individual table cells. Denis \startbuffer[lines1] \startlines[inbetween={\blank}] this is a poem with one longer stanza \stoplines \stopbuffer \startbuffer[lines2] \startlines[inbetween={\blank}] this is a poem with some stanzas here is another one and another one \stoplines \stopbuffer \starttext Just the buffers. One: \getbuffer[lines1] Two: \getbuffer[lines2] Via paragraphs \defineparagraphs[paraverse][n=2 ] \setupparagraphs[paraverse][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] \startparaverse \getbuffer[lines1] \nextparaverse \getbuffer[lines2] \stopparaverse Via tabulate \starttabulate[|p|p|] \NC \getbuffer[lines1] \NC \getbuffer[lines2] \NC\NR \stoptabulate \stoptext
-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Henning Hraban Ramm via ntg-context Gesendet: Freitag, 26. August 2022 23:27 An: Denis Maier via ntg-context Cc: Henning Hraban Ramm Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context:
Hi,
I need to typeset two poems side by side. Usually, I use the tabulate environment for typesetting parallel texts. However, for poems this does not quite work as tabulate does not seem to allow blanks between the stanzas. See MWE below. Am I missing someting? Is there a better way to achieve this?
How about columnsets or paragraphs?
\definecolumnset[Zwei][n=2] \startcolumnset[Zwei] \startlines Starlight, star bright, first star I see tonight; \stoplines \column \startlines I wish I may, I wish I might have the wish I wish tonight. \stoplines \stopcolumnset
\defineparagraphs[Zwei][n=2] \setupparagraphs[Zwei][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] % width of 2nd column is calculated automatically
\startZwei ... \nextZwei ... \stopZwei
Ok, I've had a chance to look into this. Maybe I'm missing something, but paragraphs cannot be split across pages. Is that correct? That's a bit of a problem. As for columnsets, they seem to change the output routine for the entire page. Also not ideal in this case. Denis
participants (5)
-
denis.maier@unibe.ch
-
Hans Hagen
-
Hans Hagen
-
Henning Hraban Ramm
-
Wolfgang Schuster