Closed vlasakm closed 2 years ago
\hyperlinks{}{}
should work. The fix can look like:
\_let\_ilinkcolor=#1\_relax
\_let\_elinkcolor=#2\_relax
(lines 100, 101 of hyperlinks.opm
).
I keep the default setting of \_linkdimens
in OpTeX. You can re-define \_linkdimens
in pdfextra
and/or merge \xlink
with \hlink
. Note, that \baselineskip
unit in \_linkdimens
is not 100 % solution of described problem: suppose that \baselineskip
is changed just before \par
but after paragraph text (with links) is typeset already.
Ad 2: I went with \_empty
so that colors can be expandable if right macros are redefined.
Ad 3: OK. I know it's not perfect either, but certainly not worse and it is as far as one can get with the pdfTeX model.
I am in the process of updating the pdfextra package to OpTeX v1.04 and I noticed a few things about hyperlinks, that are not critical, but should probably be fixed in the next release:
\hyperlinks{}{}
doesn't work now, but maybe should? (At least the documentation for\_printrefnum
should be updated if not.)\_linkdimens
, which by default tries to achieve "lining links", but are defined in terms ofem
and not in terms of\baselineskip
.Two and three are debatable. What do you think @olsak?
Illustration of
\_linkdimens
:The
pdfextra
logic for lining links uses\_baselineskip
, but only for\hlink
(package namespace). I am thinking about unconditionally replacing\xlink
with\hlink
whenpdfextra
is loaded, so unifying everything that makes sense will prevent surprises. (The link coloring and borders will be the same in the next release, unfortunately the PDF actions logic cannot be shared.)