On 8/13/2018 12:04, Wolfgang Schuster wrote:

Hi Rik,

what do you want to achieve and why do you need a buffer for it?

Wolfgang

Fair question.

I have a document with many (400+) block quotations. Each consists of a text extract, which may be prose or poetry, and additional optional components (alternate versions or transliterations, translations, attribution). The optional components are distinguished typographically – enlarged square brackets around alternate versions, enlarged parentheses around translations, leading en-dash and hanging indent for attributions. Each component is in a buffer. The structure looks like:

   \startBlockQuotation[label=abc,authors={...},precis={short
   extract},translators={...},tprecis={{short extract},{short extract}}...]

   \startExtract[language=agr,align=yes,font=abc,tolerance=...,...]

      text of extract

   \stopExtract

   \startTransliteration[language=en,align=yes,font=abc,...]

      text of transliteration

   \stopTransliteration

   \startTranslation[...]

      text of translation

   \stopTranslation

   \startAttribution[tolerance=,...]

      attribution of quotation

   \stopAttribution

   \stopBlockQuotation

and the code to handle it generates author index entries, a quotation precis index, and so on from the attributes of the envelope, and typesets each component based on the provided settings or defaults, placing the appropriate decorations around those components that call for them. The components are nestable, so one extract may contain another, and components can be used separately without the envelope (\startBlockQuotation or \startEpigraph) as well.

(I have written it this way to ease the move to an XML-based format for storing the quotations. I realize I am combining presentation elements, like label, tolerance, and precis, and content elements, like language, and some that may be either, like align and font, in the attributes, but will deal with that later.)

I prefer to leave blank lines around blocks of text and around macro commands, so:

   \startparagraph

      some text

   \stopparagraph

but when this is done with, for example, \startAttribution, and no optional arguments are provided, I run into the problem I have described.

I realize that I can simply not include the blank line after \startAttribution. I would prefer, however, to see consistent parallel structures without having to distinguish them at the time it is written. Perhaps I am being too picky, but that is what I am attempting.

At this point, the \setupparagraphintro hack handles my needs, so I will proceed with that.

--
Rik

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to