Mercurial > hgbook
changeset 170:9cd856b4bd21
Try to make HTML build a bit more portable.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 26 Mar 2007 23:55:21 -0700 |
parents | f4a50cf01d13 |
children | 8c1703a98266 |
files | en/Makefile en/htlatex.book |
diffstat | 2 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- /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 $$