# HG changeset patch # User Bryan O'Sullivan # Date 1151090122 25200 # Node ID 76fba5835a1bd3e2eb3fa02951c1f8748f28ae03 Beginnings of a build process and file layout. diff -r 000000000000 -r 76fba5835a1b .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Fri Jun 23 12:15:22 2006 -0700 @@ -0,0 +1,16 @@ +\bauto/ +\bhtml/ + +syntax: glob + +.*.swp +*~ +*.aux +*.dvi +*.lg +*.lo[fgt] +*.out +*.pdf +*.tmp +*.toc +*.xref diff -r 000000000000 -r 76fba5835a1b en/00book.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/00book.tex Fri Jun 23 12:15:22 2006 -0700 @@ -0,0 +1,32 @@ +\documentclass{book} +\usepackage{fullpage} +\usepackage{graphics} +\usepackage{newcent} +\usepackage{hyperref} + +\include{99defs} + +\title{Distributed revision control with Mercurial} +\author{Bryan O'Sullivan} +\date{} + +\begin{document} + +\maketitle + +\addcontentsline{toc}{chapter}{Contents} +\pagenumbering{roman} +\tableofcontents +\listoffigures +\listoftables + +\pagenumbering{arabic} + +\include{mq} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff -r 000000000000 -r 76fba5835a1b en/99defs.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/99defs.tex Fri Jun 23 12:15:22 2006 -0700 @@ -0,0 +1,8 @@ +\newcommand{\hgext}[1]{\texttt{#1}} +\newcommand{\hgcmd}[1]{``\texttt{hg #1}''} +\newcommand{\hgcmdargs}[2]{``\texttt{hg #1 #2}''} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "00book" +%%% End: diff -r 000000000000 -r 76fba5835a1b en/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/Makefile Fri Jun 23 12:15:22 2006 -0700 @@ -0,0 +1,36 @@ +sources := 00book.tex mq.tex + +latex-options = \ + -interaction batchmode \ + -output-directory $(dir $(1)) \ + -jobname $(basename $(notdir $(1))) + +all: pdf html + +pdf: pdf/hgbook.pdf + +pdf/hgbook.pdf: $(sources) + mkdir -p $(dir $@) + pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) + pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) + pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) + +html: html/onepage/hgbook.html html/split/hgbook.html + +define htlatex + mkdir -p $(dir $(1)) + head -4 $(shell which htlatex) > $(dir $(1))/htlatex.book + chmod 755 $(dir $(1))/htlatex.book + $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(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))) +endef + +html/onepage/hgbook.html: $(sources) + $(call htlatex,$@,$<) + +html/split/hgbook.html: $(sources) + $(call htlatex,$@,$<,2) + +clean: + rm -rf html pdf *.aux *.dvi *.log *.out