---
pms.cls | 61 ++++++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 38 insertions(+), 23 deletions(-)
On Tuesday 14 April 2009 09:32:28 Christian Faulhammer wrote:
> Or you use \AtEndOfClass{} to do your magic.
That's still too early, but \g@addto@macro\@documentclasshook (the
same mechanism TeX4ht itself uses) seems to work. Do you think it's
safe to rely on this being true in future versions? Obviously it's
not a disaster if it doesn't, but I'd rather not go looking for
trouble.
diff --git a/pms.cls b/pms.cls
index 90e8584..d7ef774 100644
--- a/pms.cls
+++ b/pms.cls
@@ -16,25 +16,31 @@
fontenc,
isodate,
typearea,
- caption,
inputenc,
appendix,
booktabs,
color,
enumitem,
- float,
fullpage,
graphicx,
- hyperref,
ifthen,
longtable,
lscape,
marginnote,
paralist,
parskip,
- verbatim,
- algorithm,
- algorithmic
+ verbatim
+}
+
+% tex4ht workaround: hyperref needs to be loaded /after/ tex4ht injects itself
+\g@addto@macro\@documentclasshook{
+ \RequirePackage{
+ caption,
+ float,
+ hyperref,
+ algorithm,
+ algorithmic
+ }
}
\ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager
Specification, loaded baseclass: \ClassToLoad\MessageBreak}
@@ -51,9 +57,12 @@
\setboolean{TEX4HT-HACKS}{true}
\fi
-\floatstyle{plaintop}
-\newfloat{listing}{tbp}{lol}[chapter]
-\floatname{listing}{Listing}
+% tex4ht workaround: these need to happen after loading the float package
+\g@addto@macro\@documentclasshook{
+ \floatstyle{plaintop}
+ \newfloat{listing}{tbp}{lol}[chapter]
+ \floatname{listing}{Listing}
+}
\newcommand{\listoflistings}{\listof{listing}{Listings}}
\newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}}
\newcommand{\compactfeatureref}[1]{#1~p\pageref{feat:#1}}
@@ -61,7 +70,10 @@
\bibliographystyle{plainurl}
\renewcommand{\t}[1]{\texttt{#1}}
-\renewcommand{\i}[1]{\textit{#1}}
+% tex4ht workaround: this needs to happen after loading hyperref
+\g@addto@macro\@documentclasshook{
+ \renewcommand{\i}[1]{\textit{#1}}
+}
\newcommand{\e}[1]{\emph{#1}}
\renewcommand{\b}[1]{\textbf{#1}}
\newcommand{\note}[1]{\paragraph{Note:} #1}
@@ -108,19 +120,22 @@
\end{table}
}
-\hypersetup{%
- urlcolor=black,
- colorlinks=true,
- citecolor=black,
- linkcolor=black,
- pdftitle={Package Manager Specification},
- pdfauthor={Stephen P. Bennett, Ciaran McCreesh},
- pdfcreator={pdfLaTeX and hyperref},
- pdfsubject={Defining a feature set for package managers in the
- Gentoo world},
- pdflang={en},
- pdfkeywords={Gentoo, package manager, specification},
- 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,
+ pdftitle={Package Manager Specification},
+ pdfauthor={Stephen P. Bennett, Ciaran McCreesh},
+ pdfcreator={pdfLaTeX and hyperref},
+ pdfsubject={Defining a feature set for package managers in the
+ Gentoo world},
+ pdflang={en},
+ pdfkeywords={Gentoo, package manager, specification},
+ pdfproducer={pdfLaTeX and hyperref},
+ }
}
\title{Package Manager Specification}
\author{Stephen P. Bennett\\\url{spb@...}
--
1.6.2.3
|