Gentoo Archives: gentoo-pms

From: David Leverton <levertond@××××××××××.com>
To: gentoo-pms@l.g.o
Cc: David Leverton <levertond@××××××××××.com>
Subject: [gentoo-pms] [PATCH 2/2] Update TeX4ht sed hacks
Date: Thu, 16 Apr 2009 19:37:33
In Reply to: [gentoo-pms] [PATCH 1/2] Work around TeX4ht being weird by David Leverton
Account for slightly different whitespace in the output of newer
versions, the possibility of tables in appendices, and the silly
locale-dependent behaviour of sed.
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 27d58c1..a9f1108 100644
--- a/Makefile
+++ b/Makefile
@@ -21,12 +21,12 @@ pms.html: $(SOURCEFILES) pms.bbl
 	xhlatex pms
 	@# work around irregularity in how links to longtables are
 	@# formatted in the List of Tables
-	sed -i -e '/<span class="lotToc" >&#x00A0;/{N;N;s/\(&#x00A0;<a \nhref="[^"]\+">\)\([0-9.]\+\)\n/\2\1/}' pms.html
+	LC_ALL=C sed -i -e '/<span class="lotToc" >&#x00A0;/{N;N;s/\(&#x00A0;<a \nhref="[^"]\+">\)\([0-9A-Z.]\+\)[ \n]/\2\1/}' pms.html
 	@# indent algorithms properly, and avoid adding extra vertical
 	@# space in Konqueror
-	sed -i -e 's/span style="width:/span style="display:-moz-inline-box;display:inline-block;height:1px;width:/' pms.html
+	LC_ALL=C sed -i -e 's/span style="width:/span style="display:-moz-inline-box;display:inline-block;height:1px;width:/' pms.html
 	@# align algorithm line numbers properly
-	sed -i -e '/<span class="ALCitem">/{N;s/\n\(class="[^"]\+">\)\([0-9]:\)<\/span>/\1\&#x2007;\2/}' pms.html
+	LC_ALL=C sed -i -e '/<span class="ALCitem">/{N;s/\n\(class="[^"]\+">\)\([0-9]:\)<\/span>/\1\&#x2007;\2/}' pms.html
 pms.bbl: pms.bib pms.tex vc.tex eapi-cheatsheet.pdf
 	latex pms


Subject Author
Re: [gentoo-pms] [PATCH 2/2] Update TeX4ht sed hacks Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
Re: [gentoo-pms] [PATCH 2/2] Update TeX4ht sed hacks Yannick Mortier <mvmortier@××××××××××.com>