1 |
commit: 4e97d4a54ce404d8eb076a8368809750f1799023 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 25 20:23:51 2021 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 25 20:23:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=4e97d4a5 |
7 |
|
8 |
pms.cls: Reinstate TeX4ht/hyperref workaround |
9 |
|
10 |
This had been removed in commit 1a510e7, but apparently it is needed |
11 |
again with TeX Live 2021. |
12 |
|
13 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
14 |
|
15 |
pms.cls | 32 +++++++++++++++++++++----------- |
16 |
1 file changed, 21 insertions(+), 11 deletions(-) |
17 |
|
18 |
diff --git a/pms.cls b/pms.cls |
19 |
index 7fff027..a64d7d8 100644 |
20 |
--- a/pms.cls |
21 |
+++ b/pms.cls |
22 |
@@ -44,12 +44,16 @@ |
23 |
chngcntr, % Redefinition of counters |
24 |
tocbibind, % Add bibliography to table of contents |
25 |
float, % More control over float environments |
26 |
- hyperref, % Support for hyperlinks |
27 |
gitinfo2, % Metadata from git |
28 |
algorithm, % |
29 |
algorithmic % Set algorithms |
30 |
} |
31 |
|
32 |
+% tex4ht workaround: hyperref needs to be loaded /after/ tex4ht injects itself |
33 |
+\g@addto@macro\@documentclasshook{ |
34 |
+ \RequirePackage{hyperref} % Support for hyperlinks |
35 |
+} |
36 |
+ |
37 |
\ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager |
38 |
Specification, loaded baseclass: \ClassToLoad\MessageBreak} |
39 |
|
40 |
@@ -99,8 +103,11 @@ |
41 |
\counterwithout{footnote}{chapter} |
42 |
|
43 |
% Some shorthands for the lazy ones. |
44 |
-\renewcommand{\i}[1]{\textit{#1}} |
45 |
-\renewcommand{\t}[1]{\texttt{#1}} |
46 |
+% tex4ht workaround: this needs to happen after loading hyperref |
47 |
+\g@addto@macro\@documentclasshook{ |
48 |
+ \renewcommand{\i}[1]{\textit{#1}} |
49 |
+ \renewcommand{\t}[1]{\texttt{#1}} |
50 |
+} |
51 |
\newcommand{\e}[1]{\emph{#1}} |
52 |
\newcommand{\note}[1]{\begin{trivlist}\item\textbf{Note:} #1\end{trivlist}} |
53 |
|
54 |
@@ -142,14 +149,17 @@ |
55 |
\setlength\emergencystretch{1em} % was 0 |
56 |
|
57 |
% Define some PDF meta-data. |
58 |
-\hypersetup{% |
59 |
- urlcolor=black, |
60 |
- colorlinks=true, |
61 |
- citecolor=black, |
62 |
- linkcolor=black, |
63 |
- pdflang={en}, |
64 |
- pdfcreator={pdfLaTeX and hyperref}, |
65 |
- pdfproducer={pdfLaTeX and hyperref}, |
66 |
+% tex4ht workaround: this needs to happen after loading hyperref |
67 |
+\g@addto@macro\@documentclasshook{ |
68 |
+ \hypersetup{% |
69 |
+ urlcolor=black, |
70 |
+ colorlinks=true, |
71 |
+ citecolor=black, |
72 |
+ linkcolor=black, |
73 |
+ pdflang={en}, |
74 |
+ pdfcreator={pdfLaTeX and hyperref}, |
75 |
+ pdfproducer={pdfLaTeX and hyperref}, |
76 |
+ } |
77 |
} |
78 |
|
79 |
% Reads the last commit date from the Git repository and even succeeds |