hgbook
changeset 0:76fba5835a1b
Beginnings of a build process and file layout.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri Jun 23 12:15:22 2006 -0700 (2006-06-23) |
parents | |
children | 04e469de601e |
files | .hgignore en/00book.tex en/99defs.tex en/Makefile |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/.hgignore Fri Jun 23 12:15:22 2006 -0700 1.3 @@ -0,0 +1,16 @@ 1.4 +\bauto/ 1.5 +\bhtml/ 1.6 + 1.7 +syntax: glob 1.8 + 1.9 +.*.swp 1.10 +*~ 1.11 +*.aux 1.12 +*.dvi 1.13 +*.lg 1.14 +*.lo[fgt] 1.15 +*.out 1.16 +*.pdf 1.17 +*.tmp 1.18 +*.toc 1.19 +*.xref
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/en/00book.tex Fri Jun 23 12:15:22 2006 -0700 2.3 @@ -0,0 +1,32 @@ 2.4 +\documentclass{book} 2.5 +\usepackage{fullpage} 2.6 +\usepackage{graphics} 2.7 +\usepackage{newcent} 2.8 +\usepackage{hyperref} 2.9 + 2.10 +\include{99defs} 2.11 + 2.12 +\title{Distributed revision control with Mercurial} 2.13 +\author{Bryan O'Sullivan} 2.14 +\date{} 2.15 + 2.16 +\begin{document} 2.17 + 2.18 +\maketitle 2.19 + 2.20 +\addcontentsline{toc}{chapter}{Contents} 2.21 +\pagenumbering{roman} 2.22 +\tableofcontents 2.23 +\listoffigures 2.24 +\listoftables 2.25 + 2.26 +\pagenumbering{arabic} 2.27 + 2.28 +\include{mq} 2.29 + 2.30 +\end{document} 2.31 + 2.32 +%%% Local Variables: 2.33 +%%% mode: latex 2.34 +%%% TeX-master: t 2.35 +%%% End:
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/en/99defs.tex Fri Jun 23 12:15:22 2006 -0700 3.3 @@ -0,0 +1,8 @@ 3.4 +\newcommand{\hgext}[1]{\texttt{#1}} 3.5 +\newcommand{\hgcmd}[1]{``\texttt{hg #1}''} 3.6 +\newcommand{\hgcmdargs}[2]{``\texttt{hg #1 #2}''} 3.7 + 3.8 +%%% Local Variables: 3.9 +%%% mode: latex 3.10 +%%% TeX-master: "00book" 3.11 +%%% End:
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/en/Makefile Fri Jun 23 12:15:22 2006 -0700 4.3 @@ -0,0 +1,36 @@ 4.4 +sources := 00book.tex mq.tex 4.5 + 4.6 +latex-options = \ 4.7 + -interaction batchmode \ 4.8 + -output-directory $(dir $(1)) \ 4.9 + -jobname $(basename $(notdir $(1))) 4.10 + 4.11 +all: pdf html 4.12 + 4.13 +pdf: pdf/hgbook.pdf 4.14 + 4.15 +pdf/hgbook.pdf: $(sources) 4.16 + mkdir -p $(dir $@) 4.17 + pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 4.18 + pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 4.19 + pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) 4.20 + 4.21 +html: html/onepage/hgbook.html html/split/hgbook.html 4.22 + 4.23 +define htlatex 4.24 + mkdir -p $(dir $(1)) 4.25 + head -4 $(shell which htlatex) > $(dir $(1))/htlatex.book 4.26 + chmod 755 $(dir $(1))/htlatex.book 4.27 + $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) 4.28 + cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf 4.29 + cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) 4.30 +endef 4.31 + 4.32 +html/onepage/hgbook.html: $(sources) 4.33 + $(call htlatex,$@,$<) 4.34 + 4.35 +html/split/hgbook.html: $(sources) 4.36 + $(call htlatex,$@,$<,2) 4.37 + 4.38 +clean: 4.39 + rm -rf html pdf *.aux *.dvi *.log *.out