[NTG-context] extra lines in PDF annotations
Pablo Rodriguez
oinos at gmx.es
Tue Mar 14 16:27:50 CET 2023
On 3/13/23 22:32, Hans Hagen via ntg-context wrote:
>> [...]
>> I hope EOLs are fine now.
> dunno ... no full example so ...
Sorry, Hans, the full example reads:
\startbuffer[text]
<pre>
<element/>
</pre>
\stopbuffer
\savebuffer[text][sample-text.xml, prefix=no]
\setupinteraction[state=start]
\startxmlsetups xml:text
\xmlsetsetup{\xmldocument}
{pre}
{xml:copy:html}
\stopxmlsetups
\xmlregistersetup{xml:text}
\startxmlsetups xml:copy:html
\xmltobuffer{#1}{.}{text}
\comment[location=inmargin,buffer=text]{}
\stopxmlsetups
\setuppapersize[A9]
\starttext
\section{one\xmlprocessbuffer{main}{text}{}}
\section{two\xmlprocessfile{main}{sample-text.xml}{}}
\stoptext
It requires that the source is saved with CRLF line endings (so that
\savebuffer will save that way too), otherwise both \comment will be
exactly the same.
I hope it is clearer now.
Many thanks for your help,
Pablo
More information about the ntg-context
mailing list