pdftex[834] branches/stable/tests/16-nolink-special: update
commits+thanh at tug.org
commits+thanh at tug.org
Thu Jun 11 23:53:29 CEST 2020
Revision: 834
http://tug.org/svn/pdftex?view=revision&revision=834
Author: thanh
Date: 2020-06-11 23:53:28 +0200 (Thu, 11 Jun 2020)
Log Message:
-----------
update tests/16-nolink-special (cont.)
Added Paths:
-----------
branches/stable/tests/16-nolink-special/fancyhdr.sty
branches/stable/tests/16-nolink-special/nolink-pdftex.tex
branches/stable/tests/16-nolink-special/nolink-xetex.tex
Added: branches/stable/tests/16-nolink-special/fancyhdr.sty
===================================================================
--- branches/stable/tests/16-nolink-special/fancyhdr.sty (rev 0)
+++ branches/stable/tests/16-nolink-special/fancyhdr.sty 2020-06-11 21:53:28 UTC (rev 834)
@@ -0,0 +1,276 @@
+%%
+%% This is file `fancyhdr.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fancyhdr.dtx (with options: `fancyhdr')
+%%
+%% This is a generated file.
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{fancyhdr}%
+ [2019/01/31 v3.10
+ Extensive control of page headers and footers]%
+% Copyright (C) 1994-2019 by Piet van Oostrum <piet at vanoostrum.org>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\if at nch@mpty#1{\def\temp at a{#1}\ifx\temp at a\@empty}
+\def\f at nch@def#1#2{\if at nch@mpty{#2}\f at nch@gbl\def#1{\leavevmode}\else
+ \f at nch@gbl\def#1{#2\strut}\fi}
+\let\f at nch@gbl\global
+\newcommand{\f at nch@ifundefined}[1]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname #1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\newcommand\f at nch@errmsg[1]{%
+ \f at nch@ifundefined{PackageError}{\errmessage{#1}}{\PackageError{Fancyhdr}{#1}{}}}
+\newcommand\f at nch@warning[1]{%
+ \f at nch@ifundefined{PackageWarning}{\errmessage{#1}}{\PackageWarning{Fancyhdr}{#1}{}}}
+\newcommand{\f at nch@forc}[3]{\expandafter\f at rc\expandafter#1\expandafter{#2}{#3}}
+\newcommand{\f at rc}[3]{\def\temp at ty{#2}\ifx\@empty\temp at ty\else
+ \f at nch@rc#1#2\f at nch@rc{#3}\fi}
+\def\f at nch@rc#1#2#3\f at nch@rc#4{\def#1{#2}#4\f at rc#1{#3}{#4}}
+\newcommand{\f at nch@for}[3]{\edef\@fortmp{#2}%
+ \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}}
+\newcommand\f at nch@default[3]{%
+ \edef\temp at a{\lowercase{\edef\noexpand\temp at a{#3}}}\temp at a \def#1{}%
+ \f at nch@forc\tmpf at ra{#2}%
+ {\expandafter\f at nch@ifin\tmpf at ra\temp at a{\edef#1{#1\tmpf at ra}}{}}%
+ \ifx\@empty#1\def#1{#2}\fi}
+\newcommand{\f at nch@ifin}[4]{%
+ \edef\temp at a{#2}\def\temp at b##1#1##2\temp at b{\def\temp at b{##1}}%
+ \expandafter\temp at b#2#1\temp at b\ifx\temp at a\temp at b #4\else #3\fi}
+\newcommand{\fancyhead}[2][]{\f at nch@fancyhf\fancyhead h[#1]{#2}}%
+\newcommand{\fancyfoot}[2][]{\f at nch@fancyhf\fancyfoot f[#1]{#2}}%
+\newcommand{\fancyhf}[2][]{\f at nch@fancyhf\fancyhf {}[#1]{#2}}%
+\newcommand{\fancyheadoffset}[2][]{\f at nch@fancyhfoffs\fancyheadoffset h[#1]{#2}}%
+\newcommand{\fancyfootoffset}[2][]{\f at nch@fancyhfoffs\fancyfootoffset f[#1]{#2}}%
+\newcommand{\fancyhfoffset}[2][]{\f at nch@fancyhfoffs\fancyhfoffset {}[#1]{#2}}%
+\def\f at nch@fancyhf#1#2[#3]#4{%
+ \def\temp at c{}%
+ \f at nch@forc\tmpf at ra{#3}%
+ {\expandafter\f at nch@ifin\tmpf at ra{eolcrhf,EOLCRHF}%
+ {}{\edef\temp at c{\temp at c\tmpf at ra}}}%
+ \ifx\@empty\temp at c\else \f at nch@errmsg{Illegal char `\temp at c' in
+ \string#1 argument: [#3]}%
+ \fi \f at nch@for\temp at c{#3}%
+ {\f at nch@default\f at nch@@eo{eo}\temp at c \if at twoside\else \if\f at nch@@eo
+ e\f at nch@warning {\string#1's `E' option without twoside option is
+ useless}\fi\fi \f at nch@default\f at nch@@lcr{lcr}\temp at c
+ \f at nch@default\f at nch@@hf{hf}{#2\temp at c}%
+ \f at nch@forc\f at nch@eo\f at nch@@eo
+ {\f at nch@forc\f at nch@lcr\f at nch@@lcr
+ {\f at nch@forc\f at nch@hf\f at nch@@hf
+ {\expandafter\f at nch@def\csname
+ f at nch@\f at nch@eo\f at nch@lcr\f at nch@hf\endcsname {#4}}}}}}
+\def\f at nch@fancyhfoffs#1#2[#3]#4{%
+ \def\temp at c{}%
+ \f at nch@forc\tmpf at ra{#3}%
+ {\expandafter\f at nch@ifin\tmpf at ra{eolrhf,EOLRHF}%
+ {}{\edef\temp at c{\temp at c\tmpf at ra}}}%
+ \ifx\@empty\temp at c\else \f at nch@errmsg{Illegal char `\temp at c' in
+ \string#1 argument: [#3]}%
+ \fi \f at nch@for\temp at c{#3}%
+ {\f at nch@default\f at nch@@eo{eo}\temp at c \if at twoside\else \if\f at nch@@eo
+ e\f at nch@warning {\string#1's `E' option without twoside option is
+ useless}\fi\fi \f at nch@default\f at nch@@lcr{lr}\temp at c
+ \f at nch@default\f at nch@@hf{hf}{#2\temp at c}%
+ \f at nch@forc\f at nch@eo\f at nch@@eo
+ {\f at nch@forc\f at nch@lcr\f at nch@@lcr
+ {\f at nch@forc\f at nch@hf\f at nch@@hf
+ {\expandafter\setlength\csname
+ f at nch@O@\f at nch@eo\f at nch@lcr\f at nch@hf\endcsname {#4}}}}}%
+ \f at nch@setoffs}
+\newcommand{\lhead}[2][\f at nch@olh]%
+ {\f at nch@def\f at nch@olh{#2}\f at nch@def\f at nch@elh{#1}}
+\newcommand{\chead}[2][\f at nch@och]%
+ {\f at nch@def\f at nch@och{#2}\f at nch@def\f at nch@ech{#1}}
+\newcommand{\rhead}[2][\f at nch@orh]%
+ {\f at nch@def\f at nch@orh{#2}\f at nch@def\f at nch@erh{#1}}
+\newcommand{\lfoot}[2][\f at nch@olf]%
+ {\f at nch@def\f at nch@olf{#2}\f at nch@def\f at nch@elf{#1}}
+\newcommand{\cfoot}[2][\f at nch@ocf]%
+ {\f at nch@def\f at nch@ocf{#2}\f at nch@def\f at nch@ecf{#1}}
+\newcommand{\rfoot}[2][\f at nch@orf]%
+ {\f at nch@def\f at nch@orf{#2}\f at nch@def\f at nch@erf{#1}}
+\newlength{\f at nch@headwidth} \let\headwidth\f at nch@headwidth
+\newlength{\f at nch@O at elh}
+\newlength{\f at nch@O at erh}
+\newlength{\f at nch@O at olh}
+\newlength{\f at nch@O at orh}
+\newlength{\f at nch@O at elf}
+\newlength{\f at nch@O at erf}
+\newlength{\f at nch@O at olf}
+\newlength{\f at nch@O at orf}
+\newcommand{\headrulewidth}{0.4pt}
+\newcommand{\footrulewidth}{0pt}
+\f at nch@ifundefined{footruleskip}%
+ {\newcommand{\footruleskip}{.3\normalbaselineskip}}{}
+\newcommand{\plainheadrulewidth}{0pt}
+\newcommand{\plainfootrulewidth}{0pt}
+\newif\if at fancyplain \@fancyplainfalse
+\def\fancyplain#1#2{\if at fancyplain#1\else#2\fi}
+\headwidth=-123456789sp
+\let\f at nch@raggedleft\raggedleft
+\let\f at nch@raggedright\raggedright
+\let\f at nch@centering\centering
+\let\f at nch@everypar\everypar
+\def\f at nch@reset{\f at nch@everypar{}\restorecr\endlinechar=13
+ \let\\\@normalcr \let\raggedleft\f at nch@raggedleft
+ \let\raggedright\f at nch@raggedright \let\centering\f at nch@centering
+ \def\baselinestretch{1}%
+ \hsize=\headwidth
+ \def\nouppercase##1{{\let\uppercase\relax\let\MakeUppercase\relax
+ \expandafter\let\csname MakeUppercase \endcsname\relax##1}}%
+ \f at nch@ifundefined{@newbaseline} % NFSS not present; 2.09 or 2e
+ {\f at nch@ifundefined{@normalsize} {\normalsize} % for ucthesis.cls
+ {\@normalsize}}%
+ {\@newbaseline}% NFSS (2.09) present
+ }
+\fancyhf{}
+\if at twoside
+ \fancyhead[el,or]{\fancyplain{}{\slshape\rightmark}}
+ \fancyhead[er,ol]{\fancyplain{}{\slshape\leftmark}}
+\else
+ \fancyhead[l]{\fancyplain{}{\slshape\rightmark}}
+ \fancyhead[r]{\fancyplain{}{\slshape\leftmark}}
+\fi
+\fancyfoot[c]{\rmfamily\thepage} % page number
+\newcommand\f at nch@vbox[2]{%
+ \setbox0\vbox{#2}%
+ \ifdim\ht0>#1\relax
+ \f at nch@warning{%
+ \string#1 is too small (\the#1): ^^J%
+ Make it at least \the\ht0.^^J%
+ We now make it that large for the rest of the document.^^J%
+ This may cause the page layout to be inconsistent, however\@gobble
+ }%
+ \dimen0=#1\relax
+ \global#1=\ht0\relax
+ \ht0=\dimen0 %
+ \fi
+ \box0}
+\newcommand\f at nch@head[5]{%
+ #1%
+ \hbox to\headwidth{%
+ \f at nch@reset
+ \f at nch@vbox\headheight{%
+ \hbox{%
+ \rlap{\parbox[b]{\headwidth}{\raggedright#2}}%
+ \hfill
+ \parbox[b]{\headwidth}{\centering#3}%
+ \hfill
+ \llap{\parbox[b]{\headwidth}{\raggedleft#4}}%
+ }%
+ \headrule
+ }%
+ }%
+ #5%
+}
+\newcommand\f at nch@foot[5]{%
+\pdfrunninglinkoff
+ #1%
+ \hbox to\headwidth{%
+ \f at nch@reset
+ \f at nch@vbox\footskip{%
+ \setbox0=\vbox{\footrule}\unvbox0
+ \vskip\footruleskip
+ \hbox{%
+ \rlap{\parbox[t]{\headwidth}{\raggedright#2}}%
+ \hfill
+ \parbox[t]{\headwidth}{\centering#3}%
+ \hfill
+ \llap{\parbox[t]{\headwidth}{\raggedleft#4}}%
+ }%
+ }%
+ }%
+ #5%
+}
+\def\headrule{{\if at fancyplain\let\headrulewidth\plainheadrulewidth\fi
+ \hrule\@height\headrulewidth\@width\headwidth
+ \vskip-\headrulewidth}}
+\def\footrule{{\if at fancyplain\let\footrulewidth\plainfootrulewidth\fi
+ \hrule\@width\headwidth\@height\footrulewidth}}
+\def\ps at fancy{%
+ \f at nch@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}% for amsbook
+\f at nch@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
+\f at nch@ifundefined{chapter}%
+ {\def\sectionmark##1{\markboth{\MakeUppercase{\ifnum \c at secnumdepth>\z@
+ \thesection\hskip 1em\relax
+ \fi ##1}}{}}%
+ \def\subsectionmark##1{\markright {\ifnum \c at secnumdepth >\@ne
+ \thesubsection\hskip 1em\relax \fi ##1}}}%
+ {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum
+ \c at secnumdepth>\m at ne \@chapapp\ \thechapter. \ \fi ##1}}{}}%
+\def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c at secnumdepth >\z@
+ \thesection. \ \fi ##1}}}%
+}
+\ps@@fancy
+\gdef\ps at fancy{\@fancyplainfalse\ps@@fancy}%
+\ifdim\headwidth<0sp
+ \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
+\fi}
+\def\ps at fancyplain{\ps at fancy \let\ps at plain\ps at plain@fancy}
+\def\ps at plain@fancy{\@fancyplaintrue\ps@@fancy}
+\let\ps@@empty\ps at empty
+\def\ps@@fancy{%
+ \ps@@empty
+ \def\@mkboth{\protect\markboth}%
+ \def\@oddhead{\f at nch@head\f at nch@Oolh\f at nch@olh\f at nch@och\f at nch@orh\f at nch@Oorh}%
+ \def\@oddfoot{\f at nch@foot\f at nch@Oolf\f at nch@olf\f at nch@ocf\f at nch@orf\f at nch@Oorf}%
+ \def\@evenhead{\f at nch@head\f at nch@Oelh\f at nch@elh\f at nch@ech\f at nch@erh\f at nch@Oerh}%
+ \def\@evenfoot{\f at nch@foot\f at nch@Oelf\f at nch@elf\f at nch@ecf\f at nch@erf\f at nch@Oerf}%
+}
+\def\f at nch@Oolh{\if at reversemargin\hss\else\relax\fi}
+\def\f at nch@Oorh{\if at reversemargin\relax\else\hss\fi}
+\let\f at nch@Oelh\f at nch@Oorh
+\let\f at nch@Oerh\f at nch@Oolh
+\let\f at nch@Oolf\f at nch@Oolh
+\let\f at nch@Oorf\f at nch@Oorh
+\let\f at nch@Oelf\f at nch@Oelh
+\let\f at nch@Oerf\f at nch@Oerh
+\def\f at nch@offsolh{\headwidth=\textwidth\advance\headwidth\f at nch@O at olh
+ \advance\headwidth\f at nch@O at orh\hskip-\f at nch@O at olh}
+\def\f at nch@offselh{\headwidth=\textwidth\advance\headwidth\f at nch@O at elh
+ \advance\headwidth\f at nch@O at erh\hskip-\f at nch@O at elh}
+\def\f at nch@offsolf{\headwidth=\textwidth\advance\headwidth\f at nch@O at olf
+ \advance\headwidth\f at nch@O at orf\hskip-\f at nch@O at olf}
+\def\f at nch@offself{\headwidth=\textwidth\advance\headwidth\f at nch@O at elf
+ \advance\headwidth\f at nch@O at erf\hskip-\f at nch@O at elf}
+\def\f at nch@setoffs{%
+ \f at nch@gbl\let\headwidth\f at nch@headwidth
+ \f at nch@gbl\let\f at nch@Oolh\f at nch@offsolh
+ \f at nch@gbl\let\f at nch@Oelh\f at nch@offselh \f at nch@gbl\let\f at nch@Oorh\hss
+ \f at nch@gbl\let\f at nch@Oerh\hss \f at nch@gbl\let\f at nch@Oolf\f at nch@offsolf
+ \f at nch@gbl\let\f at nch@Oelf\f at nch@offself \f at nch@gbl\let\f at nch@Oorf\hss
+ \f at nch@gbl\let\f at nch@Oerf\hss
+}
+\newif\iff at nch@footnote
+\AtBeginDocument{%
+ \let\latex at makecol\@makecol
+ \def\@makecol{\ifvoid\footins\f at nch@footnotefalse\else\f at nch@footnotetrue\fi
+ \let\topfloat\@toplist\let\botfloat\@botlist\latex at makecol}%
+}
+\newcommand\iftopfloat[2]{\ifx\topfloat\empty #2\else #1\fi}%
+\newcommand\ifbotfloat[2]{\ifx\botfloat\empty #2\else #1\fi}%
+\newcommand\iffloatpage[2]{\if at fcolmade #1\else #2\fi}%
+\newcommand\iffootnote[2]{\iff at nch@footnote #1\else #2\fi}%
+\newcommand{\fancypagestyle}[2]{%
+ \@namedef{ps@#1}{\let\f at nch@gbl\relax#2\relax\ps at fancy}}
+\endinput
+%%
+%% End of file `fancyhdr.sty'.
Added: branches/stable/tests/16-nolink-special/nolink-pdftex.tex
===================================================================
--- branches/stable/tests/16-nolink-special/nolink-pdftex.tex (rev 0)
+++ branches/stable/tests/16-nolink-special/nolink-pdftex.tex 2020-06-11 21:53:28 UTC (rev 834)
@@ -0,0 +1,14 @@
+% $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 but is unless xetex}
+\usepackage{hyperref}
+
+\begin{document}
+\vspace*{48\baselineskip}
+xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx
+\href{xxxxx}{link link link link }
+\end{document}
Added: branches/stable/tests/16-nolink-special/nolink-xetex.tex
===================================================================
--- branches/stable/tests/16-nolink-special/nolink-xetex.tex (rev 0)
+++ branches/stable/tests/16-nolink-special/nolink-xetex.tex 2020-06-11 21:53:28 UTC (rev 834)
@@ -0,0 +1,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 at nililand.de>
+% To: tex-live at 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?
More information about the pdftex-commits
mailing list.