commit:     afa3fc20f142911ecd0da534d8cc73dd48dee1df
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  7 17:31:28 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Apr  7 17:31:28 2019 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=afa3fc20

pms.cls: Drop page references when processing with tex4ht.

They are meaningless in the HTML output. Delete \pageref in the text;
it was used only once.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 commands.tex |  3 +--
 pms.cls      | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/commands.tex b/commands.tex
index 5ba9626..1733ebd 100644
--- a/commands.tex
+++ b/commands.tex
@@ -22,8 +22,7 @@ dependencies must be used to ensure their presence.
 
 The following commands must always be available in the ebuild environment:
 \begin{compactitem}
-\item All builtin commands in GNU bash, version as listed in 
table~\ref{tab:bash-version} on
-    page~\pageref{tab:bash-version}.
+\item All builtin commands in GNU bash, version as listed in 
table~\ref{tab:bash-version}.
 \item \t{sed} must be available, and must support all forms of invocations 
valid for GNU sed
     version 4 or later.
 \item \featurelabel{gnu-patch} \t{patch} must be available, and must support 
all inputs valid

diff --git a/pms.cls b/pms.cls
index f0ec4b3..4015f98 100644
--- a/pms.cls
+++ b/pms.cls
@@ -87,15 +87,17 @@
 
 % Define own label and reference commands, that display the label in
 % the page margin.
-\newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}}
-\newcommand{\compactfeatureref}[1]{#1~p\pageref{feat:#1}}
-\newcommand{\featurelabel}[1]{\leavevmode\label{feat:#1}%
-    \ifthenelse{\boolean{TEX4HT-HACKS}}{%
+\ifthenelse{\boolean{TEX4HT-HACKS}}{%
+    \newcommand{\featureref}[1]{\hyperref[feat:#1]{\textsc{#1}}}
+    \newcommand{\compactfeatureref}[1]{\hyperref[feat:#1]{#1}}
+    \newcommand{\featurelabel}[1]{\leavevmode\label{feat:#1}%
         % tex4ht does not support marginnote
-        \framebox{\textsc{#1}}%
-    }{%
-        \marginnote{\framebox{\textsc{#1}}}\ignorespaces
-    }%
+        \framebox{\textsc{#1}}}
+}{%
+    \newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}}
+    \newcommand{\compactfeatureref}[1]{#1~p\pageref{feat:#1}}
+    \newcommand{\featurelabel}[1]{\leavevmode\label{feat:#1}%
+        \marginnote{\framebox{\textsc{#1}}}\ignorespaces}
 }
 % Change marginnote test to pretend that landscape pages are odd numbered
 \g@addto@macro\@mn@margintest{%

Reply via email to