]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4816: Add xdvipdfmx option for PDF destination names
authorMasamichi Hosoda <trueroad@trueroad.jp>
Wed, 30 Mar 2016 11:40:15 +0000 (20:40 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Thu, 7 Apr 2016 12:28:01 +0000 (21:28 +0900)
XeTeX (xdvipdfmx) replaces link destination names with integers.
In this case, the replaced destination names of
remote PDF cannot be known.

In order to avoid replacement,
this commit adds xdvipdfmx commandline option.

configure.ac
scripts/build/xetex-with-options.sh [new file with mode: 0755]

index a34bbc580e56ecde5de72021dd6b6a13429b30ee..0a753325d1eec6384b6c0972ae2d8330543bfdb6 100644 (file)
@@ -240,6 +240,10 @@ STEPMAKE_PROGS(BIBTEX, bibtex, $DOCUMENTATION_REQUIRED)
 STEPMAKE_PROGS(PDFLATEX, xelatex pdflatex, $DOCUMENTATION_REQUIRED)
 if test "$PDFLATEX" = "xelatex"; then
     STEPMAKE_PROGS(PDFTEX, xetex, $DOCUMENTATION_REQUIRED)
+    if test "$PDFTEX" = "xetex"; then
+        # For avoiding PDF destination name replacement.
+        PDFTEX=$ugh_ugh_autoconf250_builddir/scripts/build/out$CONFIGSUFFIX/xetex-with-options
+    fi
 else
     STEPMAKE_PROGS(PDFTEX, pdfetex pdftex etex, $DOCUMENTATION_REQUIRED)
 fi
diff --git a/scripts/build/xetex-with-options.sh b/scripts/build/xetex-with-options.sh
new file mode 100755 (executable)
index 0000000..f53ba0d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# By the default settings,
+# XeTeX (xdvipdfmx) replaces link destination names with integers.
+# In this case, the replaced destination names of
+# remote PDF cannot be known. In order to avoid replacement,
+# we can use commandline option `-C 0x0010' for xdvipdfmx.
+
+exec xetex --output-driver='xdvipdfmx -C 0x0010' "$@"