diff --git a/doc/tutorial/Makefile b/doc/tutorial/Makefile index 234ddf558..b229ba74c 100644 --- a/doc/tutorial/Makefile +++ b/doc/tutorial/Makefile @@ -7,15 +7,16 @@ CONVERT = convert CSS = --css-include=tutorial.css SPLIT = --split section +DIA_SOURCES = buffer.dia pp.dia dumbbell.dia star.dia TGIF_SOURCES = packet.obj helpers.obj -DIA_SOURCES = buffer.dia + +DIA_EPS = ${DIA_SOURCES:.dia=.eps} +DIA_PNG = ${DIA_SOURCES:.dia=.png} +DIA_PDF = ${DIA_SOURCES:.dia=.pdf} TGIF_EPS = ${TGIF_SOURCES:.obj=.eps} TGIF_PNG = ${TGIF_SOURCES:.obj=.png} TGIF_PDF = ${TGIF_SOURCES:.obj=.pdf} -DIA_EPS = ${DIA_SOURCES:.dia=.eps} -DIA_PNG = ${DIA_SOURCES:.dia=.png} -DIA_PDF = ${DIA_SOURCES:.dia=.pdf} all: images html split-html pdf @@ -24,12 +25,12 @@ all: images html split-html pdf # buffer may be needed (xorg-x11-server-Xvfb) to provide a "fake" # display images: - cd figures/; $(TGIF) -print -png $(TGIF_SOURCES) - cd figures/; $(TGIF) -print -eps $(TGIF_SOURCES) - cd figures/; $(foreach FILE,$(TGIF_EPS),$(EPSTOPDF) $(FILE);) cd figures/; $(DIA) -t png $(DIA_SOURCES) cd figures/; $(DIA) -t eps $(DIA_SOURCES) cd figures/; $(foreach FILE,$(DIA_EPS),$(EPSTOPDF) $(FILE);) + cd figures/; $(TGIF) -print -png $(TGIF_SOURCES) + cd figures/; $(TGIF) -print -eps $(TGIF_SOURCES) + cd figures/; $(foreach FILE,$(TGIF_EPS),$(EPSTOPDF) $(FILE);) html: images $(TEXI2HTML) ${CSS} tutorial.texi diff --git a/doc/tutorial/dumbbell.png b/doc/tutorial/dumbbell.png deleted file mode 100644 index 0fc3d8c9e..000000000 Binary files a/doc/tutorial/dumbbell.png and /dev/null differ diff --git a/doc/tutorial/figures/README b/doc/tutorial/figures/README index 1f7e2f84d..4f63268dc 100644 --- a/doc/tutorial/figures/README +++ b/doc/tutorial/figures/README @@ -1,10 +1,14 @@ Please write image files in a vector graphics format, when possible, and generate the .png and .pdf versions on the fly (see ../Makefile). -Recommended tools are dia, tgif, and xfig. Store the .dia, .obj, or .fig -versions in mercurial, but not the .png or .pdfs. If the figure is -not available in a vector graphics format, store a .png and a .pdf version -here. +Currently supported tools are dia and tgif. xfig could be added similarly +if someone wants to add it. The main requirement for adding another format +is that the tool to edit it is freely available and that a cron script can +autogenerate the pdf and png from the figure source. + +Store the .dia, or .obj versions in mercurial, but not the .png or .pdfs. +If the figure is not available in a vector graphics format, store both +a .png and a .pdf version in this directory. If you add a source (.dia, .obj) file here, remember to add it to the list of figure sources in the Makefile in the directory above diff --git a/doc/tutorial/figures/dumbbell.dia b/doc/tutorial/figures/dumbbell.dia new file mode 100644 index 000000000..91af27577 Binary files /dev/null and b/doc/tutorial/figures/dumbbell.dia differ diff --git a/doc/tutorial/oneobj.png b/doc/tutorial/figures/oneobj.png similarity index 100% rename from doc/tutorial/oneobj.png rename to doc/tutorial/figures/oneobj.png diff --git a/doc/tutorial/figures/pp.dia b/doc/tutorial/figures/pp.dia new file mode 100644 index 000000000..2c81980a5 Binary files /dev/null and b/doc/tutorial/figures/pp.dia differ diff --git a/doc/tutorial/figures/star.dia b/doc/tutorial/figures/star.dia new file mode 100644 index 000000000..6b826b313 Binary files /dev/null and b/doc/tutorial/figures/star.dia differ diff --git a/doc/tutorial/threeobj.png b/doc/tutorial/figures/threeobj.png similarity index 100% rename from doc/tutorial/threeobj.png rename to doc/tutorial/figures/threeobj.png diff --git a/doc/tutorial/other.texi b/doc/tutorial/other.texi index efa83a083..3e4a63a7b 100644 --- a/doc/tutorial/other.texi +++ b/doc/tutorial/other.texi @@ -34,7 +34,7 @@ see this point-to-point network, you can think of an RS-422 (or RS-232 for you old-timers) cable. This topology is shown below. @sp 1 -@center @image{pp,,,,png} +@center @image{figures/pp,,,,png} @cindex CreateObject @cindex InternetNode @@ -173,7 +173,7 @@ a file for you in the @code{tutorial} directory called @code{tutorial-star.cc} that implements a simple star network as seen below. @sp 1 -@center @image{star,,,,png} +@center @image{figures/star,,,,png} In order to create a star network, we need to be able to instantiate some number (greater than one) of net devices on a node. In the name of simplicity @@ -506,7 +506,7 @@ configured with a lower bandwidth than the bus elements to provide a The following is a representation of the topology. @sp 1 -@center @image{dumbbell,,,,png} +@center @image{figures/dumbbell,,,,png} We have provided a file that constructs this dumbbell network and creates enough data flowing across the choke point that some packets will be dropped. diff --git a/doc/tutorial/pp.png b/doc/tutorial/pp.png deleted file mode 100644 index 84b76d6df..000000000 Binary files a/doc/tutorial/pp.png and /dev/null differ diff --git a/doc/tutorial/star.png b/doc/tutorial/star.png deleted file mode 100644 index c580d0305..000000000 Binary files a/doc/tutorial/star.png and /dev/null differ