Thanks Hraban, Aditya and Wolfgang.
Wolfgang's solution lets me keep the \ignorepars just before the end of
the paragraph, and it also auto-resets.
Adding the following definition:
\def\IgnoreNextPar{\IgnoreParagraph\conditionaltrue}
I can switch on the "ignore next \par" everywhere in the paragraph.
In my particular case, the \IgnoreNextPar would be the content of a
RawInline in a Pandoc document, that would be automatically discarded
for any output but ConTeXt.
Massi
Il 19/06/25 11:18, Wolfgang Schuster ha scritto:
Am 18.06.2025 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.
There is also
\begstrut ... \endstrut
but this should only be necessary when you put text in a box.
\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?
You can use a flag to call \ignorepars at the end of the paragraph.
%%%% begin example
\newconditional\IgnoreParagraph \IgnoreParagraph\conditionaltrue
\starttext
First paragraph. \ifconditional\IgnoreParagraph
\IgnoreParagraph\conditionalfalse \ignorepars \fi
Second paragraph.
Third paragraph.
\stoptext
%%%% end example
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
___________________________________________________________________________________