Mercurial > hgbook
changeset 0:76fba5835a1b
Beginnings of a build process and file layout.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 23 Jun 2006 12:15:22 -0700 |
parents | |
children | 04e469de601e |
files | .hgignore en/00book.tex en/99defs.tex en/Makefile |
diffstat | 4 files changed, 92 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /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
--- /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:
--- /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:
--- /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