From: Martin Mares Date: Mon, 21 Apr 2008 11:05:39 +0000 (+0200) Subject: Book style. X-Git-Tag: printed~61 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;ds=sidebyside;h=f76518370c437b42604c7c2c5ef56df95d471b32;p=saga.git Book style. --- diff --git a/Makefile b/Makefile index 444f312..19a4fee 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ all: saga.ps -CHAPTERS=cover intro mst ram adv opt dyn appl rank concl notation +CHAPTERS=cover pref mst ram adv opt dyn appl rank epilog notation %.dvi: %.tex macros.tex biblio.bib - tex $< && bibtex $* && tex $< && tex $< + tex $< && mv $*.toc $*.tok + bibtex $* + tex $< && mv $*.toc $*.tok + tex $< && mv $*.toc $*.tok saga.dvi: $(addsuffix .tex,$(CHAPTERS)) @@ -14,7 +17,7 @@ saga.dvi: $(addsuffix .tex,$(CHAPTERS)) dvipdfm -o $@ -p a4 -r 600 -z 9 $< mostlyclean: - rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg *.ids *.toc + rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg *.ids *.toc *.tok clean: mostlyclean rm -f *.ps *.pdf diff --git a/concl.tex b/concl.tex deleted file mode 100644 index ffb159a..0000000 --- a/concl.tex +++ /dev/null @@ -1,7 +0,0 @@ -\ifx\endpart\undefined -\input macros.tex -\fi - -\chapter{Conclusions} - -\endpart diff --git a/epilog.tex b/epilog.tex new file mode 100644 index 0000000..ffb159a --- /dev/null +++ b/epilog.tex @@ -0,0 +1,7 @@ +\ifx\endpart\undefined +\input macros.tex +\fi + +\chapter{Conclusions} + +\endpart diff --git a/intro.tex b/intro.tex deleted file mode 100644 index b3abdc4..0000000 --- a/intro.tex +++ /dev/null @@ -1,7 +0,0 @@ -\ifx\endpart\undefined -\input macros.tex -\fi - -\chapter{Preface} - -\endpart diff --git a/macros.tex b/macros.tex index 3a734d8..b7f4385 100644 --- a/macros.tex +++ b/macros.tex @@ -323,7 +323,7 @@ \newcount\chapcount \newcount\seccount \newcount\thmcount -\chapcount=-1 +\chapcount=0 \seccount=0 \thmcount=0 \def\currentid{??} @@ -333,6 +333,11 @@ \bigskip } +\def\unchapter#1{ +\rawchapter{#1} +\writetoc{unchap}{#1} +} + \def\chapter#1{\advance\chapcount by 1 \seccount=0 \thmcount=0 @@ -404,13 +409,19 @@ \tocfalse } +\newwrite\tok \def\includetoc{ -\immediate\closeout\toc -\input \jobname.toc +\immediate\openin\tok=\jobname.tok +\ifeof\tok +\else +\input \jobname.tok +\fi +\immediate\closein\tok } \def\tocchap#1#2#3{\smallskip\line{\bo #1.~~#2 \dotfill ~#3}} \def\tocsec#1#2#3{\line{#1.~~#2 \dotfill ~#3}} +\def\tocunchap#1#2#3{\smallskip\line{\bo #2 \dotfill ~#3}} %%% References %%% diff --git a/pref.tex b/pref.tex new file mode 100644 index 0000000..5597cc5 --- /dev/null +++ b/pref.tex @@ -0,0 +1,7 @@ +\ifx\endpart\undefined +\input macros.tex +\fi + +\unchapter{Preface} + +\endpart diff --git a/saga.tex b/saga.tex index 5814243..0b81d60 100644 --- a/saga.tex +++ b/saga.tex @@ -2,7 +2,11 @@ \let\endpart=\relax \input cover.tex -\input intro.tex +\input pref.tex + +\unchapter{Table of contents} +\includetoc + \input mst.tex \input ram.tex \input adv.tex @@ -10,13 +14,10 @@ \input dyn.tex \input appl.tex \input rank.tex -\input concl.tex +\input epilog.tex \input notation.tex \chapter{Bibliography} \dumpbib -\rawchapter{Table of contents} -\includetoc - \bye