[tex-eplain] pdftex vs. `dvips -> ps2pdf': hyperlinks

Rodolfo Medina rodolfo.medina at gmail.com
Mon Jun 20 15:35:37 CEST 2016


Thanks, Karl.


Karl Berry <karl at freefriends.org> writes:

> The PostScript effects could presumably be achieved, though admittedly
> in kind of an ugly way, by convering the PS to PDF separately and
> including them.  This is where, in my life, Makefiles win.


Yes, that's what I've done before and it works fine when including pictures in
the text.  But in this case they are musical slurs and ties that are intimate
part of the score and can't - I think - be converted and input separately.  In
fact MusiXTeX manual explicitly says that the .tex file needs being processed
with dvips -> ps2pdf rather tan with pdftex.


> Anyway:
>
>     do you think it would be possibile, 
>
> As a matter of principle, I believe that nearly anything that can be
> done in pdftex can also be done with dvips|ps2pdf.  Some things are a
> lot harder, since pdftex has simultaneous access to the TeX input and
> PDF output.  Compared to having to pass everything into the DVI file
> with TeX \specials, and then on to the PS file with pdfmark in such a
> way that Ghostscript (or whatever distiller) does the right thing, with
> many opportunities for problems at every step.


But we saw with the outline panel that it was very easy: as much as simply

 \special{ps:[/PageMode /UseOutlines /DOCVIEW pdfmark}

and then

   \special{ps:[/Count -1 /Dest (label) cvn /Title (section) /OUT pdfmark}

.  Also hyperlinks are very simply build with just

 \special{html:<a name="label">}\special{html:</a>}

and then

 \special{html:<a href="\PreHatch{label}">}text\special{html:</a>}

or

 \special{html:<a href="file:filename\PreHatch{label}">}text\special{html:</a>}

.  As for those two matters and their simple solution, there don't seem to be
problems at any step (ps -> pdf) or any hard work.



> So my answer to "is it possible" is "almost certainly yes".
>
>     and how?, to have the same hyperlinks accuracy also with ps2pdf?
>
> But as for how, I'm afraid I have no idea off the top of my head.  I'd
> need to study an example and research what is going on to cause the
> discrepancy, as I did with the outline stuff.  As you know, I'm woefully
> far behind on all fronts -- the "cross-reference hyperlinks between
> different files" is already in my queue,

About those, I want to work again on my macros and improve and adjust them.
After all they can't be very bad if - as they do in fact - they work.  The
general idea behind them is - as I said - a double life of children files: as
chapters of a master file or as single articles.  This requires \if conditions
to automate everything when processing those files in one mode or another.  I
did all that job in the past years.  While waiting for you to have time to be
working at it, I want now to review it, clean it up and in the end maybe put it
on the web, perhaps on CTAN archives.  I would be glad if only dvips|ps2pdf
could be used in that project.


> with a lot of other things
> unavoidably in front of it :(.  So I hope someone else can come forward
> to delve into these things, if you cannot do it yourself.

I understand it.  I'll see if anyone on the web is ever interested and can give
a hand.


> Happy TeXing,
> Karl


The same to you, and good job and thanks for doing so much for TeX and its
relative applications.

Regards,

Rodolfo



More information about the tex-eplain mailing list