ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] \par and \startlines
@ 2024-04-26 13:33 denis.maier
  2024-04-26 15:25 ` [NTG-context] " Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 14+ messages in thread
From: denis.maier @ 2024-04-26 13:33 UTC (permalink / raw)
  To: ntg-context


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-05-01  8:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 13:33 [NTG-context] \par and \startlines denis.maier
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

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).