summaryrefslogtreecommitdiff
path: root/systems/doc/pdftex/tests/16-nolink-special/nolink-xetex.tex
blob: 7e497b7e9e824f45785ae95fdad265a466880a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
% $Id: nolink-example.tex 831 2020-06-04 18:07:54Z karl $
% Public domain.

\documentclass[a4paper]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
%\cfoot{some footline text that should not be linked}
%\usepackage{ifxetex}
%\ifxetex
  \cfoot{\special{pdf:nolink}some footline text that should not be
linked but is unless xetex\special{pdf:link}}
 %\fi
\usepackage{hyperref}

\begin{document}
\vspace*{48\baselineskip}
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx
\href{xxxxx}{link link link link }
\end{document}

% https://tug.org/pipermail/tex-live/2018-November/042759.html
% Date: Wed, 28 Nov 2018 12:31:25 +0100
% From: Ulrike Fischer <news3@nililand.de>
% To: tex-live@tug.org
% Subject: [tex-live] pdfstartlink/pdfendlink and boxing level problems
%
% [see ../15-startlink-boxing/*.tex for other request.]
% 
% 2. The engines interrupts linking if the boxing level of
% intermediate text is less than the boxing level at the start of the
% link:
% 
% [example program above]
% 
% This allows to some extend to exclude e.g. header and footer from
% link areas. But doesn't work e.g. with fancyhdr which adds an
% additional box level to the footer. xetex/xdvidfpmx has here a quite
% useful special \special{pdf:nolink} which can be used to suppress
% the unwanted link area:
% 
% \documentclass[a4paper]{article}
% \usepackage{fancyhdr}
% \pagestyle{fancy}
% \cfoot{some longer text that should not be linked}
% \usepackage{ifxetex}
%  \ifxetex
%   %\cfoot{\special{pdf:nolink}some longer text that should not be
% linked\special{pdf:link}}
%  \fi
% \usepackage{hyperref}
% 
% \begin{document}
% \vspace*{48\baselineskip}
% xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx
% \href{xxxxx}{link link link link }
% \end{document}
% 
% Would it be possible to add to pdftex/luatex something similar?