texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * doc/texinfo.tex (\startxreflink): Use \ifpdforx


From: Gavin D. Smith
Subject: branch master updated: * doc/texinfo.tex (\startxreflink): Use \ifpdforxetex conditional to avoid duplicating code for both cases.
Date: Thu, 06 Apr 2023 17:59:28 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 90cdbe03d4 * doc/texinfo.tex (\startxreflink): Use \ifpdforxetex 
conditional to avoid duplicating code for both cases.
90cdbe03d4 is described below

commit 90cdbe03d43fc09f4f96cdc1ab01b124e346ca2c
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu Apr 6 22:59:20 2023 +0100

    * doc/texinfo.tex (\startxreflink): Use \ifpdforxetex conditional
    to avoid duplicating code for both cases.
---
 ChangeLog       |  5 +++++
 doc/texinfo.tex | 45 ++++++++++++---------------------------------
 2 files changed, 17 insertions(+), 33 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9966a1dc92..080d0fcec4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-04-06  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * doc/texinfo.tex (\startxreflink): Use \ifpdforxetex conditional
+       to avoid duplicating code for both cases.
+
 2023-04-06  Gavin Smith <gavinsmith0123@gmail.com>
 
        * doc/texinfo.texi (Line macros): Add space in example before
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 9a507c755b..9e66eeb720 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2023-04-04.21}
+\def\texinfoversion{2023-04-06.21}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -8932,7 +8932,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % \startxreflink{NODE}{FILE} - start link in pdf output.
 \def\startxreflink#1#2{%
-  \ifpdf
+  \ifpdforxetex
     % For pdfTeX and LuaTeX
     {\indexnofonts
      \makevalueexpandable
@@ -8951,35 +8951,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
      \fi
      %
      \leavevmode
-     \startlink attr{/Border [0 0 0]}%
-     \ifnum\filenamelength>0
-       goto file{\the\filename.pdf} name{\pdfdestname}%
-     \else
-       goto name{\pdfmkpgn{\pdfdestname}}%
-     \fi
-    }%
-    \setcolor{\linkcolor}%
-  \else
-    \ifx\XeTeXrevision\thisisundefined
-    \else
-      % For XeTeX
-      {\indexnofonts
-       \makevalueexpandable
-       \turnoffactive
-       % This expands tokens, so do it after making catcode changes, so _
-       % etc. don't get their TeX definitions.  This ignores all spaces in
-       % #2, including (wrongly) those in the middle of the filename.
-       \getfilename{#2}%
-       %
-       % This (wrongly) does not take account of leading or trailing
-       % spaces in #1, which should be ignored.
-       \setpdfdestname{#1}%
-       %
-       \ifx\pdfdestname\empty
-         \def\pdfdestname{Top}% no empty targets
+     \ifpdf
+       \startlink attr{/Border [0 0 0]}%
+       \ifnum\filenamelength>0
+         goto file{\the\filename.pdf} name{\pdfdestname}%
+       \else
+         goto name{\pdfmkpgn{\pdfdestname}}%
        \fi
-       %
-       \leavevmode
+     \else % XeTeX
        \ifnum\filenamelength>0
          % With default settings,
          % XeTeX (xdvipdfmx) replaces link destination names with integers.
@@ -8995,9 +8974,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
          \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
            << /S /GoTo /D (\pdfdestname) >> >>}%
        \fi
-      }%
-      \setcolor{\linkcolor}%
-    \fi
+     \fi
+    }%
+    \setcolor{\linkcolor}%
   \fi
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]