summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2021-04-25 22:23:51 +0200
committerUlrich Müller <ulm@gentoo.org>2021-04-30 18:24:30 +0200
commitaede3621e7208e29d65d0cf1af656ca2ac0c528b (patch)
tree0ce1279cf2c1ae36e729f7b6af216ee5abe727b7
parentebuild-env-vars.tex: Clarify wording for profile IUSE injection (diff)
downloadpms-aede3621e7208e29d65d0cf1af656ca2ac0c528b.tar.gz
pms-aede3621e7208e29d65d0cf1af656ca2ac0c528b.tar.bz2
pms-aede3621e7208e29d65d0cf1af656ca2ac0c528b.zip
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@gentoo.org>
-rw-r--r--pms.cls40
1 files changed, 26 insertions, 14 deletions
diff --git a/pms.cls b/pms.cls
index 7fff027..d7c6ed8 100644
--- a/pms.cls
+++ b/pms.cls
@@ -44,10 +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
+ gitinfo2 % Metadata from git
+}
+
+% tex4ht workaround: hyperref needs to be loaded /after/ tex4ht injects itself
+\g@addto@macro\@documentclasshook{
+ \RequirePackage{%
+ hyperref, % Support for hyperlinks
+ algorithm, %
+ algorithmic % Set algorithms
+ }
}
\ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager
@@ -99,8 +105,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 +151,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