Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-pms
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-pms@g.o
From: David Leverton <levertond@...>
Subject: [PATCH 1/2] Work around TeX4ht being weird
Date: Thu, 16 Apr 2009 20:37:26 +0100
---
 pms.cls |   61 ++++++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 38 insertions(+), 23 deletions(-)

Updated patch to apply against latest HEAD.

diff --git a/pms.cls b/pms.cls
index 5188190..05d44b0 100644
--- a/pms.cls
+++ b/pms.cls
@@ -21,15 +21,12 @@
     fontenc,	% Load extended font sets
     isodate,	% Date formatting and conversions
     typearea,	% Set page layout
-    caption,	% Extended float environment formatting
     inputenc,	% Allow input methods apart from ASCII
     booktabs,	% Nicer formatting of tables
     color,	% Support more than black&white
     enumitem,
-    float,	% More control over float environments
     fullpage,
     graphicx,	% Image support
-    hyperref,	% Support for hyperlinks
     ifthen,	% Comfortable conditional routines
     longtable,	% Extend tables over more than one page
     lscape,	% Rotating pages
@@ -37,9 +34,18 @@
     paralist,	% Additional list environments
     parskip,	% Space between paragraps instead of intendation
     pdfpages,	% Insert whole PDF documents as separate pages
-    verbatim,	% Extend the print-as-is functionality
-    algorithm,	%
-    algorithmic % Set algorithms
+    verbatim	% Extend the print-as-is functionality
+}
+
+% tex4ht workaround: hyperref needs to be loaded /after/ tex4ht injects itself
+\g@addto@macro\@documentclasshook{
+    \RequirePackage{
+        caption,	% Extended float environment formatting
+        float,		% More control over float environments
+        hyperref,	% Support for hyperlinks
+        algorithm,	%
+        algorithmic 	% Set algorithms
+    }
 }
 \ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager
     Specification, loaded baseclass: \ClassToLoad\MessageBreak}
@@ -59,9 +65,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}}
 % Define own label and reference commands, that display the label in
 % the page margin.
@@ -74,7 +83,10 @@
 
 % Some shorthands for the lazy ones.
 \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}
@@ -124,19 +136,22 @@
 }
 
 % Define some PDF meta-data.
-\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},
+    }
 }
 % Some metadata needed for the title page generation
 \title{Package Manager Specification}
-- 
1.6.2.3



Replies:
[PATCH 2/2] Update TeX4ht sed hacks
-- David Leverton
References:
[PATCH] Work around TeX4ht being weird
-- David Leverton
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [PATCH] Work around TeX4ht being weird
Next by thread:
[PATCH 2/2] Update TeX4ht sed hacks
Previous by date:
[PATCH 2/2] Update TeX4ht sed hacks
Next by date:
Re: [PATCH 2/2] Update TeX4ht sed hacks


Updated Jul 18, 2012

Summary: Archive of the gentoo-pms mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.