* extra lines in PDF annotations
@ 2023-03-13 15:06 Pablo Rodriguez via ntg-context
2023-03-13 15:22 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-03-13 15:06 UTC (permalink / raw)
To: ConTeXt users; +Cc: Pablo Rodriguez
Dear list,
using current latest from 2023.03.10 12:18, I have this XML sample:
<pre>
<element/>
</pre>
And the following environment:
\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]{}
\attachment[method=hidden, name=attach.xml, buffer=text]
\null
\stopxmlsetups
If I save the XML file with Windows EOL chars (CR LF), I get extra blank
lines in the PDF annotation.
Everything is fine, if XML has Unix line endings (LF char).
Attachment contains the proper line ending in each case.
Could anyone confirm what appears to be a tricky issue?
Many thanks for your help,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: extra lines in PDF annotations
2023-03-13 15:06 extra lines in PDF annotations Pablo Rodriguez via ntg-context
@ 2023-03-13 15:22 ` Pablo Rodriguez via ntg-context
2023-03-13 21:32 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-03-13 15:22 UTC (permalink / raw)
To: Pablo Rodriguez via ntg-context; +Cc: Pablo Rodriguez
On 3/13/23 16:06, Pablo Rodriguez via ntg-context wrote:
> Dear list,
>
> using current latest from 2023.03.10 12:18, I have this XML sample:
>
> <pre>
>
> <element/>
>
> </pre>
I apologize, XML source doesn’t have lines inside, such as in:
<pre>
<element/>
</pre>
I hope EOLs are fine now.
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: extra lines in PDF annotations
2023-03-13 15:22 ` Pablo Rodriguez via ntg-context
@ 2023-03-13 21:32 ` Hans Hagen via ntg-context
2023-03-14 15:27 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2023-03-13 21:32 UTC (permalink / raw)
To: Pablo Rodriguez via ntg-context; +Cc: Hans Hagen
On 3/13/2023 4:22 PM, Pablo Rodriguez via ntg-context wrote:
> On 3/13/23 16:06, Pablo Rodriguez via ntg-context wrote:
>> Dear list,
>>
>> using current latest from 2023.03.10 12:18, I have this XML sample:
>>
>> <pre>
>>
>> <element/>
>>
>> </pre>
> I apologize, XML source doesn’t have lines inside, such as in:
>
> <pre>
> <element/>
> </pre>
>
> I hope EOLs are fine now.
dunno ... no full example so ...
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: extra lines in PDF annotations
2023-03-13 21:32 ` Hans Hagen via ntg-context
@ 2023-03-14 15:27 ` Pablo Rodriguez via ntg-context
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-03-14 15:27 UTC (permalink / raw)
To: Hans Hagen via ntg-context; +Cc: Pablo Rodriguez
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-14 15:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 15:06 extra lines in PDF annotations Pablo Rodriguez via ntg-context
2023-03-13 15:22 ` Pablo Rodriguez via ntg-context
2023-03-13 21:32 ` Hans Hagen via ntg-context
2023-03-14 15:27 ` Pablo Rodriguez via ntg-context
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).