# HG changeset patch # User Bryan O'Sullivan # Date 1174978521 25200 # Node ID 9cd856b4bd213b853d505c5eec8f03e3f2197005 # Parent f4a50cf01d13a19120cb54a20240fbd5465ec1da Try to make HTML build a bit more portable. diff -r f4a50cf01d13 -r 9cd856b4bd21 en/Makefile --- a/en/Makefile Mon Mar 26 23:21:12 2007 -0700 +++ b/en/Makefile Mon Mar 26 23:55:21 2007 -0700 @@ -121,14 +121,8 @@ define htlatex mkdir -p $(dir $(1)) - head -2 $(shell which htlatex) > $(dir $(1))/htlatex.book - cp 99book.bib $(dir $@) - echo '(cd $(dir $@) && bibtex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book - echo '(cd $(dir $@) && makeindex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book - head -3 $(shell which htlatex) >> $(dir $(1))/htlatex.book - echo 'echo status $$$$' >> $(dir $(1))/htlatex.book - chmod 755 $(dir $(1))/htlatex.book - TEXINPUTS=$(dir $(2)): $(dir $(1))/htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) + cp 99book.bib $(dir $(1)) + TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) ./fixhtml.py $(dir $(1))/*.html diff -r f4a50cf01d13 -r 9cd856b4bd21 en/htlatex.book --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/htlatex.book Mon Mar 26 23:55:21 2007 -0700 @@ -0,0 +1,12 @@ +#!/bin/bash +# +# This script is horrible. It's essentially a hacked copy of +# /usr/bin/htlatex from Fedora Core 6. I apologise for any lasting +# pain reading it causes. + +latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 +(cd $4 && bibtex hgbook) +(cd $4 && makeindex hgbook) +latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 +latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 +echo status $$