1 |
--- |
2 |
pms.cls | 27 +-------------------------- |
3 |
pms.tex | 35 +++++++++++++++++++++++++++++++++++ |
4 |
2 files changed, 36 insertions(+), 26 deletions(-) |
5 |
|
6 |
Seems that loading hyperref inside a document class breaks TeX4ht: it |
7 |
does funny magic to load itself after the document class, but it also |
8 |
needs to be loaded before hyperref, so if hyperref is loaded in the |
9 |
class, TeX4ht gets in too late. This patch seems to get it to work, |
10 |
but it's fairly hacky - might be cleaner just to revert the pms.cls |
11 |
patch. :-( |
12 |
|
13 |
diff --git a/pms.cls b/pms.cls |
14 |
index ca0874c..8f9c093 100644 |
15 |
--- a/pms.cls |
16 |
+++ b/pms.cls |
17 |
@@ -9,32 +9,25 @@ |
18 |
\LoadClass{\ClassToLoad} |
19 |
\PassOptionsToPackage{T1}{fontenc} |
20 |
\PassOptionsToPackage{orig,english}{isodate} |
21 |
-\PassOptionsToPackage{position=top}{caption} |
22 |
\PassOptionsToPackage{utf8}{inputenc} |
23 |
-% algorithmic and algorithm to be loaded last to avoid failures |
24 |
\RequirePackage{% |
25 |
fontenc, |
26 |
isodate, |
27 |
typearea, |
28 |
- caption, |
29 |
inputenc, |
30 |
appendix, |
31 |
booktabs, |
32 |
color, |
33 |
enumitem, |
34 |
- float, |
35 |
fullpage, |
36 |
graphicx, |
37 |
- hyperref, |
38 |
ifthen, |
39 |
longtable, |
40 |
lscape, |
41 |
marginnote, |
42 |
paralist, |
43 |
parskip, |
44 |
- verbatim, |
45 |
- algorithm, |
46 |
- algorithmic |
47 |
+ verbatim |
48 |
} |
49 |
\ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager |
50 |
Specification, loaded baseclass: \ClassToLoad\MessageBreak} |
51 |
@@ -51,9 +44,6 @@ |
52 |
\setboolean{TEX4HT-HACKS}{true} |
53 |
\fi |
54 |
|
55 |
-\floatstyle{plaintop} |
56 |
-\newfloat{listing}{tbp}{lol}[chapter] |
57 |
-\floatname{listing}{Listing} |
58 |
\newcommand{\listoflistings}{\listof{listing}{Listings}} |
59 |
\newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}} |
60 |
\newcommand{\compactfeatureref}[1]{#1~p\pageref{feat:#1}} |
61 |
@@ -61,7 +51,6 @@ |
62 |
\bibliographystyle{plainurl} |
63 |
|
64 |
\renewcommand{\t}[1]{\texttt{#1}} |
65 |
-\renewcommand{\i}[1]{\textit{#1}} |
66 |
\newcommand{\e}[1]{\emph{#1}} |
67 |
\renewcommand{\b}[1]{\textbf{#1}} |
68 |
\newcommand{\note}[1]{\paragraph{Note:} #1} |
69 |
@@ -108,20 +97,6 @@ |
70 |
\end{table} |
71 |
} |
72 |
|
73 |
-\hypersetup{% |
74 |
- urlcolor=black, |
75 |
- colorlinks=true, |
76 |
- citecolor=black, |
77 |
- linkcolor=black, |
78 |
- pdftitle={Package Manager Specification}, |
79 |
- pdfauthor={Stephen P. Bennett, Ciaran McCreesh}, |
80 |
- pdfcreator={pdfLaTeX and hyperref}, |
81 |
- pdfsubject={Defining a feature set for package managers in the |
82 |
- Gentoo world}, |
83 |
- pdflang={en}, |
84 |
- pdfkeywords={Gentoo, package manager, specification}, |
85 |
- pdfproducer={pdfLaTeX and hyperref}, |
86 |
-} |
87 |
\title{Package Manager Specification} |
88 |
\author{Stephen P. Bennett\\\url{spb@×××××××.org} |
89 |
\and Ciaran McCreesh\\\url{ciaran.mccreesh@××××××××××.com}} |
90 |
diff --git a/pms.tex b/pms.tex |
91 |
index 8426706..60eea42 100644 |
92 |
--- a/pms.tex |
93 |
+++ b/pms.tex |
94 |
@@ -1,5 +1,40 @@ |
95 |
\documentclass{pms} |
96 |
|
97 |
+% Can't be in pms.cls because that interferes with tex4ht's weird |
98 |
+% hacks, specifically hyperref has to be loaded /after/ |
99 |
+% \documentclass, and then the other packages, plus the redefinition |
100 |
+% of \i, have to be after hyperref. |
101 |
+ |
102 |
+% algorithmic and algorithm to be loaded last to avoid failures |
103 |
+\usepackage[position=top]{caption} |
104 |
+\usepackage{% |
105 |
+ hyperref, |
106 |
+ float, |
107 |
+ algorithm, |
108 |
+ algorithmic |
109 |
+} |
110 |
+ |
111 |
+\renewcommand{\i}[1]{\textit{#1}} |
112 |
+ |
113 |
+\floatstyle{plaintop} |
114 |
+\newfloat{listing}{tbp}{lol}[chapter] |
115 |
+\floatname{listing}{Listing} |
116 |
+ |
117 |
+\hypersetup{% |
118 |
+ urlcolor=black, |
119 |
+ colorlinks=true, |
120 |
+ citecolor=black, |
121 |
+ linkcolor=black, |
122 |
+ pdftitle={Package Manager Specification}, |
123 |
+ pdfauthor={Stephen P. Bennett, Ciaran McCreesh}, |
124 |
+ pdfcreator={pdfLaTeX and hyperref}, |
125 |
+ pdfsubject={Defining a feature set for package managers in the |
126 |
+ Gentoo world}, |
127 |
+ pdflang={en}, |
128 |
+ pdfkeywords={Gentoo, package manager, specification}, |
129 |
+ pdfproducer={pdfLaTeX and hyperref}, |
130 |
+} |
131 |
+ |
132 |
\begin{document} |
133 |
\maketitle |
134 |
|
135 |
-- |
136 |
1.6.2.2 |