commit: 4e97d4a54ce404d8eb076a8368809750f1799023
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 25 20:23:51 2021 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Apr 25 20:23:51 2021 +0000
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=4e97d4a5
pms.cls: Reinstate TeX4ht/hyperref workaround
This had been removed in commit 1a510e7, but apparently it is needed
again with TeX Live 2021.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
pms.cls | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/pms.cls b/pms.cls
index 7fff027..a64d7d8 100644
--- a/pms.cls
+++ b/pms.cls
@@ -44,12 +44,16 @@
chngcntr, % Redefinition of counters
tocbibind, % Add bibliography to table of contents
float, % More control over float environments
- hyperref, % Support for hyperlinks
gitinfo2, % Metadata from git
algorithm, %
algorithmic % Set algorithms
}
+% tex4ht workaround: hyperref needs to be loaded /after/ tex4ht injects itself
+\g@addto@macro\@documentclasshook{
+ \RequirePackage{hyperref} % Support for hyperlinks
+}
+
\ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager
Specification, loaded baseclass: \ClassToLoad\MessageBreak}
@@ -99,8 +103,11 @@
\counterwithout{footnote}{chapter}
% Some shorthands for the lazy ones.
-\renewcommand{\i}[1]{\textit{#1}}
-\renewcommand{\t}[1]{\texttt{#1}}
+% tex4ht workaround: this needs to happen after loading hyperref
+\g@addto@macro\@documentclasshook{
+ \renewcommand{\i}[1]{\textit{#1}}
+ \renewcommand{\t}[1]{\texttt{#1}}
+}
\newcommand{\e}[1]{\emph{#1}}
\newcommand{\note}[1]{\begin{trivlist}\item\textbf{Note:} #1\end{trivlist}}
@@ -142,14 +149,17 @@
\setlength\emergencystretch{1em} % was 0
% Define some PDF meta-data.
-\hypersetup{%
- urlcolor=black,
- colorlinks=true,
- citecolor=black,
- linkcolor=black,
- pdflang={en},
- pdfcreator={pdfLaTeX and hyperref},
- pdfproducer={pdfLaTeX and hyperref},
+% tex4ht workaround: this needs to happen after loading hyperref
+\g@addto@macro\@documentclasshook{
+ \hypersetup{%
+ urlcolor=black,
+ colorlinks=true,
+ citecolor=black,
+ linkcolor=black,
+ pdflang={en},
+ pdfcreator={pdfLaTeX and hyperref},
+ pdfproducer={pdfLaTeX and hyperref},
+ }
}
% Reads the last commit date from the Git repository and even succeeds