summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/pdf/pdflink.c
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2021-04-19 14:58:13 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2021-04-19 14:58:13 +0000
commit579e5d528ba0da1687dfa6e2aaf0d288d9a281d8 (patch)
tree819a7f334c14b4edf48e8d5f9a32f2a3f3d4075c /Build/source/texk/web2c/luatexdir/pdf/pdflink.c
parentc55fff18e2c535a3058c3b0fe3a59ad46c99aeac (diff)
Sync with upstream luatex. Accept par in math after halign and eqn when in supress mode; a patch for linkarea in rtl context.
git-svn-id: svn://tug.org/texlive/trunk@58916 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/pdf/pdflink.c')
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdflink.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdflink.c b/Build/source/texk/web2c/luatexdir/pdf/pdflink.c
index 77b950adf25..b5bad7a682b 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdflink.c
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdflink.c
@@ -106,7 +106,16 @@ void end_link(PDF pdf, halfword p)
pdf_ann_right(q) = pos.h + pdf_link_margin;
break;
case dir_TRT:
- pdf_ann_left(q) = pos.h - pdf_link_margin;
+ /*tex
+ In version 1.13.0 the test for swapping was moved
+ to the moment we write the rectangle, but it did not
+ consider this case.
+ */
+ if (pdf_ann_left(q)<pdf_ann_right(q)) {
+ pdf_ann_left(q) = pos.h - pdf_link_margin;
+ } else {
+ pdf_ann_right(q) = pos.h - pdf_link_margin;
+ }
break;
case dir_LTL:
case dir_RTT: