docs/master

diff makefile @ 151:ff3a6a0e6255

Added system for references within the document. Macros: .Id and .Cf. ``.Id foo'' places a marker at that place. ``.Cf foo'' puts the section number of the marked place there. ``.Cf foo.page'' puts the page number of the marked place there.
author markus schnalke <meillo@marmaro.de>
date Fri, 06 Jul 2012 14:59:08 +0200
parents 472aa79f9b6f
children db199d51d5b0
line diff
     1.1 --- a/makefile	Fri Jul 06 10:13:55 2012 +0200
     1.2 +++ b/makefile	Fri Jul 06 14:59:08 2012 +0200
     1.3 @@ -7,7 +7,7 @@
     1.4  
     1.5  all: $(NAME).ps
     1.6  
     1.7 -$(NAME).ps: $(CHAPS) makefile bib rfcs toc.ig
     1.8 +$(NAME).ps: $(CHAPS) makefile bib rfcs toc.ig refs
     1.9  	export TROFFONTS=fonts;\
    1.10  	soelim $(CHAPS) | $(REFER) | \
    1.11  		grap | pic | troff -Tps -ms 2>err.ig | dpost >$@
    1.12 @@ -20,6 +20,13 @@
    1.13  toc.ig: err.ig
    1.14  	sed -n '/^TOC____/s///p' err.ig >$@
    1.15  
    1.16 +refs: err.ig
    1.17 +	awk '/^REF____/{ \
    1.18 +		sub(/^REF____/,""); \
    1.19 +		printf $$2 >"refs/"$$1; close("refs/$$1"); \
    1.20 +		printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\
    1.21 +	}' err.ig
    1.22 +
    1.23  pdf: $(NAME).pdf
    1.24  $(NAME).pdf: $(NAME).ps
    1.25  	ps2pdf $(PDFFLAGS) $(NAME).ps 2>/dev/null
    1.26 @@ -32,6 +39,7 @@
    1.27  
    1.28  clean:
    1.29  	rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
    1.30 +	rm -f refs/*
    1.31  	rm -f *.ig
    1.32  
    1.33  spell: