Re: NR: no working links in included PDFs

2022-09-16 Thread Masamichi Hosoda
>> As with the Java part of `pax`, it may be possible to extract
>> annotations from PDFs with a C/C++ program.  But, it looks like
>> `latex-pax` is adding the extracted annotations to the PDF using
>> `pax.sty`.  The `pax.sty` is for LaTeX, and it looks like it is for
>> pdfLaTeX only.  It would be quite difficult to get it to work with
>> Texinfo on XeTeX/pdfTeX.
> 
> Oh, I don't mean that we should exactly follow the `pax` algorithm.  I
> only mentioned it because it provides a solution.
> 
> Isn't it possible to add links with the `pdfmark` operator in the same
> way as is already done for annotations by `extractpdfmark`?  In
> Adobe's pdfmark reference manual (`5150.Pdfmark.pdf`) I see a section
> 2.1.2 called 'Links', which appears to be exactly what's needed.

The PDF output by pdfTeX/XeTeX has no information about
the file name or position (page number, x-y coordinates, size, etc.)
of the PDFs it includes.
It means that even if we extract the link information from the included PDFs,
we don't know where to apply it in the positions
of the PDF output by pdfTeX/XeTeX.

`pax.sty` seems to recognize the positions of the PDFs included
by the LaTeX layer and reproduce the links.
If something similar to this can be done with Texinfo,
link reproduction can be realized.
However, I have no idea how to do this in Texinfo.



Re: NR: no working links in included PDFs

2022-09-15 Thread Werner LEMBERG


> As with the Java part of `pax`, it may be possible to extract
> annotations from PDFs with a C/C++ program.  But, it looks like
> `latex-pax` is adding the extracted annotations to the PDF using
> `pax.sty`.  The `pax.sty` is for LaTeX, and it looks like it is for
> pdfLaTeX only.  It would be quite difficult to get it to work with
> Texinfo on XeTeX/pdfTeX.

Oh, I don't mean that we should exactly follow the `pax` algorithm.  I
only mentioned it because it provides a solution.

Isn't it possible to add links with the `pdfmark` operator in the same
way as is already done for annotations by `extractpdfmark`?  In
Adobe's pdfmark reference manual (`5150.Pdfmark.pdf`) I see a section
2.1.2 called 'Links', which appears to be exactly what's needed.


Werner



Re: NR: no working links in included PDFs

2022-09-14 Thread Masamichi Hosoda
Sorry, I'm too late.

As with the Java part of `pax`,
it may be possible to extract annotations from PDFs with a C/C++ program.
But, it looks like `latex-pax` is adding the extracted annotations
to the PDF using `pax.sty`.
The `pax.sty` is for LaTeX, and it looks like it is for pdfLaTeX only.
It would be quite difficult to get it to work with Texinfo on XeTeX/pdfTeX.

Alternatively, you could ask the xdvipdfmx developer
to add an option to keep the links and the annotations.

> Look at the documention of `\with-url` in the PDF version of the NR:
> The link in the included snippet (to 'lilypond.org') doesn't work.
> This is a limitation of pdfTeX (or XeTeX), which drops all links and
> annotations for included PDF files.
> 
> Masamichi-san, is it possible to extend `extractpdfmark` to cover
> this, too?  Looking around it seems that the tool 'pax'
> ('PDFAnnotExtractor') in TeXLive can do that.  However, it is based on
> Java...
> 
>   https://github.com/bastien-roucaries/latex-pax
> 
> The reason why I ask is the planned inclusion of the Visual Grob Index
> in the NR – all grobs shown have links to the corresponding
> documentation.  If these links are lost the value of the index is
> reduced enormously, and it would be probably better to not include it
> at all but to have a stand-alone, simple, two-page document instead.


NR: no working links in included PDFs

2022-09-05 Thread Werner LEMBERG

Look at the documention of `\with-url` in the PDF version of the NR:
The link in the included snippet (to 'lilypond.org') doesn't work.
This is a limitation of pdfTeX (or XeTeX), which drops all links and
annotations for included PDF files.

Masamichi-san, is it possible to extend `extractpdfmark` to cover
this, too?  Looking around it seems that the tool 'pax'
('PDFAnnotExtractor') in TeXLive can do that.  However, it is based on
Java...

  https://github.com/bastien-roucaries/latex-pax

The reason why I ask is the planned inclusion of the Visual Grob Index
in the NR – all grobs shown have links to the corresponding
documentation.  If these links are lost the value of the index is
reduced enormously, and it would be probably better to not include it
at all but to have a stand-alone, simple, two-page document instead.


Werner