hgbook

changeset 170:9cd856b4bd21

Try to make HTML build a bit more portable.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon Mar 26 23:55:21 2007 -0700 (2007-03-26)
parents f4a50cf01d13
children 8c1703a98266
files en/Makefile en/htlatex.book
line diff
     1.1 --- a/en/Makefile	Mon Mar 26 23:21:12 2007 -0700
     1.2 +++ b/en/Makefile	Mon Mar 26 23:55:21 2007 -0700
     1.3 @@ -121,14 +121,8 @@
     1.4  
     1.5  define htlatex
     1.6  	mkdir -p $(dir $(1))
     1.7 -	head -2 $(shell which htlatex) > $(dir $(1))/htlatex.book
     1.8 -	cp 99book.bib $(dir $@)
     1.9 -	echo '(cd $(dir $@) && bibtex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book
    1.10 -	echo '(cd $(dir $@) && makeindex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book
    1.11 -	head -3 $(shell which htlatex) >> $(dir $(1))/htlatex.book
    1.12 -	echo 'echo status $$$$' >>  $(dir $(1))/htlatex.book
    1.13 -	chmod 755 $(dir $(1))/htlatex.book
    1.14 -	TEXINPUTS=$(dir $(2)): $(dir $(1))/htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
    1.15 +	cp 99book.bib $(dir $(1))
    1.16 +	TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
    1.17  	cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf
    1.18  	cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
    1.19  	./fixhtml.py $(dir $(1))/*.html
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/en/htlatex.book	Mon Mar 26 23:55:21 2007 -0700
     2.3 @@ -0,0 +1,12 @@
     2.4 +#!/bin/bash
     2.5 +#
     2.6 +# This script is horrible.  It's essentially a hacked copy of
     2.7 +# /usr/bin/htlatex from Fedora Core 6.  I apologise for any lasting
     2.8 +# pain reading it causes.
     2.9 +
    2.10 +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
    2.11 +(cd $4 && bibtex hgbook)
    2.12 +(cd $4 && makeindex hgbook)
    2.13 +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
    2.14 +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
    2.15 +echo status $$