1 |
commit: aede3621e7208e29d65d0cf1af656ca2ac0c528b |
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: Fri Apr 30 16:24:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=aede3621 |
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 | 40 ++++++++++++++++++++++++++-------------- |
16 |
1 file changed, 26 insertions(+), 14 deletions(-) |
17 |
|
18 |
diff --git a/pms.cls b/pms.cls |
19 |
index 7fff027..d7c6ed8 100644 |
20 |
--- a/pms.cls |
21 |
+++ b/pms.cls |
22 |
@@ -44,10 +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 |
+ gitinfo2 % Metadata from git |
31 |
+} |
32 |
+ |
33 |
+% tex4ht workaround: hyperref needs to be loaded /after/ tex4ht injects itself |
34 |
+\g@addto@macro\@documentclasshook{ |
35 |
+ \RequirePackage{% |
36 |
+ hyperref, % Support for hyperlinks |
37 |
+ algorithm, % |
38 |
+ algorithmic % Set algorithms |
39 |
+ } |
40 |
} |
41 |
|
42 |
\ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager |
43 |
@@ -99,8 +105,11 @@ |
44 |
\counterwithout{footnote}{chapter} |
45 |
|
46 |
% Some shorthands for the lazy ones. |
47 |
-\renewcommand{\i}[1]{\textit{#1}} |
48 |
-\renewcommand{\t}[1]{\texttt{#1}} |
49 |
+% tex4ht workaround: this needs to happen after loading hyperref |
50 |
+\g@addto@macro\@documentclasshook{ |
51 |
+ \renewcommand{\i}[1]{\textit{#1}} |
52 |
+ \renewcommand{\t}[1]{\texttt{#1}} |
53 |
+} |
54 |
\newcommand{\e}[1]{\emph{#1}} |
55 |
\newcommand{\note}[1]{\begin{trivlist}\item\textbf{Note:} #1\end{trivlist}} |
56 |
|
57 |
@@ -142,14 +151,17 @@ |
58 |
\setlength\emergencystretch{1em} % was 0 |
59 |
|
60 |
% Define some PDF meta-data. |
61 |
-\hypersetup{% |
62 |
- urlcolor=black, |
63 |
- colorlinks=true, |
64 |
- citecolor=black, |
65 |
- linkcolor=black, |
66 |
- pdflang={en}, |
67 |
- pdfcreator={pdfLaTeX and hyperref}, |
68 |
- pdfproducer={pdfLaTeX and hyperref}, |
69 |
+% tex4ht workaround: this needs to happen after loading hyperref |
70 |
+\g@addto@macro\@documentclasshook{ |
71 |
+ \hypersetup{% |
72 |
+ urlcolor=black, |
73 |
+ colorlinks=true, |
74 |
+ citecolor=black, |
75 |
+ linkcolor=black, |
76 |
+ pdflang={en}, |
77 |
+ pdfcreator={pdfLaTeX and hyperref}, |
78 |
+ pdfproducer={pdfLaTeX and hyperref}, |
79 |
+ } |
80 |
} |
81 |
|
82 |
% Reads the last commit date from the Git repository and even succeeds |