Added scripts to handle the zip/figure-zips, added the fswap2 (self-referential swap) figure

git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@542 f6dd340e-d3f9-0310-b409-bdd246841980
This commit is contained in:
Frank B. Brokken 2011-05-28 15:04:36 +00:00
parent e3368de4a8
commit c56275fd59
7 changed files with 64 additions and 10 deletions

View file

@ -1,6 +1,19 @@
The primary figures are stored in zip/svg.zip. These are vector graphic
figures that can be manipulated or created by the `inkscape' program.
When creating or modifying figures:
cd zip
./prepare
this will extract the zips in their appropriate directories.
Then
cd svg
to the inkscape directory. cd to the appropriate directory and start inkscape
with the name of the figure to create.
(Copy an existing .svg file to the one to create, and inkscape that one: it
will automatically have its correct size.
When a figure is created or modified, save its .svg format. A new picture can
be given a certain size. E.g., to define a picture size 200 x 300 mm,
just a bit smaller than A4 do as follows:
@ -9,15 +22,21 @@ just a bit smaller than A4 do as follows:
-> within the inkscape window: 5 to zoom in or use the zoom icon (3rd
magnifying glass icon)
Save the image using ctrl-S, and then Save As selecting the format
Encapsulated Postscript (eps), unselect `Export area is page'. Save or move
the file to .../zip/path/file.eps, as this is the location where eps.zip
expects its files. Also, cp the .eps file to .../latex/path/file.eps
overwriting the old file.
Save the image using ctrl-S, and then
Next save the image as pdf (tag `Export area is drawing'), and convert to gif
using the `display' program The pdf can be removed, cp the gif to
.../html/path/file.gif and mv the file to .../zip/path/file.gif
Save As
selecting the format
Encapsulated Postscript (eps).
Make sure to unselect `Export area is page'.
Then update svg.zip, gif.zip and eps.zip en remove the directories
.../zip/svg and .../zip/path
Next save the image as pdf (tag `Export area is drawing')
Having performed all image-editing, cd back to ~/zip and run:
./install
then
./collect
to update the zips.

10
zip/collect Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
for x in svg eps gif
do
cd $x
zip -mr $x.zip *
mv $x.zip ..
cd ..
rmdir $x
done

Binary file not shown.

Binary file not shown.

11
zip/install Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
cd svg
find ./ -type f -name '*.eps' -exec cp '{}' ../eps/'{}' ';' -delete
for x in `find ./ -type f -name '*.pdf'`
do
convert $x ../gif/${x%%pdf}gif
rm $x
done

14
zip/prepare Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
xzip()
{
cd $1
unzip ../$1.zip
cd ..
}
mkdir -p eps gif svg
xzip eps
xzip gif
xzip svg

Binary file not shown.