From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LuXOu-0003wQ-Ve for garchives@archives.gentoo.org; Thu, 16 Apr 2009 19:37:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68E7FE0069; Thu, 16 Apr 2009 19:37:31 +0000 (UTC) Received: from mail-ew0-f163.google.com (mail-ew0-f163.google.com [209.85.219.163]) by pigeon.gentoo.org (Postfix) with ESMTP id 16220E0069 for ; Thu, 16 Apr 2009 19:37:30 +0000 (UTC) Received: by ewy7 with SMTP id 7so530544ewy.34 for ; Thu, 16 Apr 2009 12:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=BEmdN+K062I1eW95DJaToc68wD5eyetonNTuQlrS5rY=; b=p88KhIRJHLEXD4+71qxPQozzkcO9qrEQcgdAv8z3dFE+0ZCUp+L26t9iYU+6bEYPOa UppOJIrzlZ1f+OfiiA4f5dZegztfEugXeDGoYM8rg3FtaU30AlP4E7okhBl/sG5nqcA4 L9vpInwVyb/i/ZikkrdnPbdhONU10tQ/DpgaY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=lekGtSY216xkvyzNOga5G9mQwOkf5hBOg2oLLJqfgaOw0wmudYV9d/vfWn5jYwkQYy jW0TpW3S9NdCWSoTB0Gfo3H7b4nUoqaSfwy7u+nWAVrrryuqbE24JUrzfS+DOHUuUIEX cZ0sLiFudnKWIDY9xmmBaDHC3mtSCuJ1psOXc= Received: by 10.210.109.10 with SMTP id h10mr5835726ebc.45.1239910650439; Thu, 16 Apr 2009 12:37:30 -0700 (PDT) Received: from shiny-one.localdomain (5ad0d223.bb.sky.com [90.208.210.35]) by mx.google.com with ESMTPS id 7sm2142162eyb.30.2009.04.16.12.37.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 16 Apr 2009 12:37:30 -0700 (PDT) Received: by shiny-one.localdomain (Postfix, from userid 1000) id C8FAF450094; Thu, 16 Apr 2009 20:37:27 +0100 (BST) From: David Leverton To: gentoo-pms@lists.gentoo.org Cc: David Leverton Subject: [gentoo-pms] [PATCH 1/2] Work around TeX4ht being weird Date: Thu, 16 Apr 2009 20:37:26 +0100 Message-Id: <1239910647-11276-1-git-send-email-levertond@googlemail.com> X-Mailer: git-send-email 1.6.2.3 In-Reply-To: <1239822192-20527-1-git-send-email-levertond@googlemail.com> References: <1239822192-20527-1-git-send-email-levertond@googlemail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Package Manager Specification discussions X-BeenThere: gentoo-pms@gentoo.org X-BeenThere: gentoo-pms@lists.gentoo.org X-Archives-Salt: 5acd5c9c-db19-4dcb-956f-8f4df64d2788 X-Archives-Hash: f9c6c70f391cce1f93153eff577b481e --- 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