ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: <denis.maier@unibe.ch>
To: <ntg-context@ntg.nl>
Subject: [NTG-context] \par and \startlines
Date: Fri, 26 Apr 2024 13:33:13 +0000	[thread overview]
Message-ID: <GV0P278MB021136A6DF997A1B1C2AF32C83162@GV0P278MB0211.CHEP278.PROD.OUTLOOK.COM> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1786 bytes --]

Hi,

I'm trying to typeset a poem from XML, but I can't figure out how to make the inbetween key working here.
As the source is XML, I cannot just add an empty line to start a new group of lines inside \startlines...\stoplines. I guess, there must be a command to do that, but \par seems to have no effect here.
How can this be done?

Best,
Denis

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setuplines[before={\blank},after={\blank},inbetween={ARE WE INBETWEEN?\blank}]

% XML Nodes auswählen
\startxmlsetups xml:test
                \xmlsetsetup{#1}{*}{-}
                \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:test}

\startxmlsetups xml:doc
                \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:poem
                \startlines
                               \xmlflush{#1}
                \stoplines
\stopxmlsetups

\startxmlsetups xml:stanza
   \xmlflushlinewise{#1}\par %this has no effect
\stopxmlsetups

\startxmlsetups xml:line
                \xmlflush{#1}
\stopxmlsetups

\startbuffer[test]
<?xml version='1.0' standalone='yes?>
<doc>
<poem>
<stanza>
<line>The</line>
<line>lines</line>
<line>are</line>
<line>there!</line>
</stanza>
<stanza>
<line>The</line>
<line>lines</line>
<line>are</line>
<line>there!</line>
</stanza>
</poem>
</doc>
\stopbuffer


\starttext

This works:

\startlines
The
lines
are
there!

The
lines
are
there!
\stoplines

Apparently, \type{\par} has no effect here:

\startlines
The
lines
are
there!\par% \par has no effect here
The
lines
are
there!
\stoplines

For background, this is what I'm actually trying to do:

\xmlprocessbuffer{test}{test}{}

\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


[-- Attachment #1.2: Type: text/html, Size: 7478 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2024-04-26 13:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 13:33 denis.maier [this message]
2024-04-26 15:25 ` [NTG-context] " Pablo Rodriguez via ntg-context
2024-04-26 16:10   ` Denis Maier via ntg-context
2024-04-26 16:24     ` Wolfgang Schuster
2024-04-26 17:18       ` Denis Maier via ntg-context
2024-04-26 17:29         ` Wolfgang Schuster
2024-04-26 17:52           ` Denis Maier via ntg-context
2024-04-26 19:09             ` Pablo Rodriguez via ntg-context
2024-04-26 20:29             ` Henning Hraban Ramm
2024-04-27  5:39             ` Wolfgang Schuster
2024-04-30 12:28               ` Denis Maier via ntg-context
2024-05-01  7:44                 ` Wolfgang Schuster
2024-05-01  8:08                   ` Henning Hraban Ramm
2024-04-27  7:24       ` Henning Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=GV0P278MB021136A6DF997A1B1C2AF32C83162@GV0P278MB0211.CHEP278.PROD.OUTLOOK.COM \
    --to=denis.maier@unibe.ch \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).