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] Work around TeX4ht being weird
Date: Mon, 13 Apr 2009 22:16:36 +0100
---
 pms.cls |   27 +--------------------------
 pms.tex |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 26 deletions(-)

Seems that loading hyperref inside a document class breaks TeX4ht: it
does funny magic to load itself after the document class, but it also
needs to be loaded before hyperref, so if hyperref is loaded in the
class, TeX4ht gets in too late.  This patch seems to get it to work,
but it's fairly hacky - might be cleaner just to revert the pms.cls
patch. :-(

diff --git a/pms.cls b/pms.cls
index ca0874c..8f9c093 100644
--- a/pms.cls
+++ b/pms.cls
@@ -9,32 +9,25 @@
 \LoadClass{\ClassToLoad}
 \PassOptionsToPackage{T1}{fontenc}
 \PassOptionsToPackage{orig,english}{isodate}
-\PassOptionsToPackage{position=top}{caption}
 \PassOptionsToPackage{utf8}{inputenc}
-% algorithmic and algorithm to be loaded last to avoid failures
 \RequirePackage{%
   fontenc,
   isodate,
   typearea,
-  caption,
   inputenc,
   appendix,
   booktabs,
   color,
   enumitem,
-  float,
   fullpage,
   graphicx,
-  hyperref,
   ifthen,
   longtable,
   lscape,
   marginnote,
   paralist,
   parskip,
-  verbatim,
-  algorithm,
-  algorithmic
+  verbatim
 }
 \ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager
   Specification, loaded baseclass: \ClassToLoad\MessageBreak}
@@ -51,9 +44,6 @@
     \setboolean{TEX4HT-HACKS}{true}
 \fi
 
-\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 +51,6 @@
 \bibliographystyle{plainurl}
 
 \renewcommand{\t}[1]{\texttt{#1}}
-\renewcommand{\i}[1]{\textit{#1}}
 \newcommand{\e}[1]{\emph{#1}}
 \renewcommand{\b}[1]{\textbf{#1}}
 \newcommand{\note}[1]{\paragraph{Note:} #1}
@@ -108,20 +97,6 @@
   \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},
-}
 \title{Package Manager Specification}
 \author{Stephen P. Bennett\\\url{spb@...}
 \and Ciaran McCreesh\\\url{ciaran.mccreesh@...}}
diff --git a/pms.tex b/pms.tex
index 8426706..60eea42 100644
--- a/pms.tex
+++ b/pms.tex
@@ -1,5 +1,40 @@
 \documentclass{pms}
 
+% Can't be in pms.cls because that interferes with tex4ht's weird
+% hacks, specifically hyperref has to be loaded /after/
+% \documentclass, and then the other packages, plus the redefinition
+% of \i, have to be after hyperref.
+
+% algorithmic and algorithm to be loaded last to avoid failures
+\usepackage[position=top]{caption}
+\usepackage{%
+  hyperref,
+  float,
+  algorithm,
+  algorithmic
+}
+
+\renewcommand{\i}[1]{\textit{#1}}
+
+\floatstyle{plaintop}
+\newfloat{listing}{tbp}{lol}[chapter]
+\floatname{listing}{Listing}
+
+\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},
+}
+
 \begin{document}
 \maketitle
 
-- 
1.6.2.2



Replies:
Re: [PATCH] Work around TeX4ht being weird
-- Christian Faulhammer
References:
Re: Patches for your reviewing pleasure: Various improvements, including cheat sheet
-- Christian Faulhammer
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Patches for your reviewing pleasure: Various improvements, including cheat sheet
Next by thread:
Re: [PATCH] Work around TeX4ht being weird
Previous by date:
Re: Patches for your reviewing pleasure: Various improvements, including cheat sheet
Next by date:
Re: [PATCH] Work around TeX4ht being weird


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.