ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] preventing next \par
@ 2025-06-18  9:41 mf
       [not found] ` <9729b1ef-b0d9-486b-b50e-dbd757c1a362@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: mf @ 2025-06-18  9:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello list,
I remember having read something about this, but I can't remember where:
I need to prevent the next \par.

The context (lowercase) is XML typesetting, where sometimes I want to 
concatenate two paragraphs in a particular typesetting, while keeping 
the original structure of the document (two distinct paragraphs).

To give you an idea, in XHTML it could be something like this:
-----------
<p>This is a paragraph.<?injecttex \preventpar ?></p>
<p>This is the next paragraph.</p>
-----------

Massi
___________________________________________________________________________________
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] 3+ messages in thread

* [NTG-context] Re: preventing next \par
       [not found] ` <9729b1ef-b0d9-486b-b50e-dbd757c1a362@gmail.com>
@ 2025-06-18 21:28   ` mf
  2025-06-19  8:06     ` Henning Hraban Ramm
  0 siblings, 1 reply; 3+ messages in thread
From: mf @ 2025-06-18 21:28 UTC (permalink / raw)
  To: ntg-context

Thanks Hraban and Wolfgang.

\ignorepars is what I was looking for, though I realized it must be the 
last thing in the paragraph.

Currently it does not work with my xml setup for paragraphs:

\startxmlsetups xml:Para
   \dontleavehmode\xmlflush{#1}\resetcharacterkerning\strut\par
\stopxmlsetups

\resetcharacterkerning can be put after the \par.

\strut prevents the last line from having no depth in case there are no 
letter with descendants.
I think that could be set globally... but how?

Massi

Il 18/06/25 16:04, Wolfgang Schuster ha scritto:
> Am 18.06.2025 um 11:41 schrieb mf:
>> Hello list,
>> I remember having read something about this, but I can't remember where:
>> I need to prevent the next \par.
>>
>> The context (lowercase) is XML typesetting, where sometimes I want to 
>> concatenate two paragraphs in a particular typesetting, while keeping 
>> the original structure of the document (two distinct paragraphs).
>>
>> To give you an idea, in XHTML it could be something like this:
>> -----------
>> <p>This is a paragraph.<?injecttex \preventpar ?></p>
>> <p>This is the next paragraph.</p>
>> -----------
> 
> \starttext
> 
> First paragraph. \ignorepars
> 
> Second paragraph.
> 
> Third paragraph.
> 
> \stoptext
> 
> Wolfgang
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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] 3+ messages in thread

* [NTG-context] Re: preventing next \par
  2025-06-18 21:28   ` [NTG-context] " mf
@ 2025-06-19  8:06     ` Henning Hraban Ramm
  0 siblings, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm @ 2025-06-19  8:06 UTC (permalink / raw)
  To: ntg-context

Am 18.06.25 um 23:28 schrieb mf:
> Thanks Hraban and Wolfgang.
> 
> \ignorepars is what I was looking for, though I realized it must be the 
> last thing in the paragraph.
> 
> Currently it does not work with my xml setup for paragraphs:
> 
> \startxmlsetups xml:Para
>    \dontleavehmode\xmlflush{#1}\resetcharacterkerning\strut\par
> \stopxmlsetups
> 
> \resetcharacterkerning can be put after the \par.
> 
> \strut prevents the last line from having no depth in case there are no 
> letter with descendants.
> I think that could be set globally... but how?

Sounds like a case for \appendtoks … \to\everypar, but I’m not sure…

Hraban
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2025-06-19  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-18  9:41 [NTG-context] preventing next \par mf
     [not found] ` <9729b1ef-b0d9-486b-b50e-dbd757c1a362@gmail.com>
2025-06-18 21:28   ` [NTG-context] " mf
2025-06-19  8:06     ` 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).