| 1 |
|
| 2 |
THIS DIRECTORY contains examples.tex, source files for the diagrams |
| 3 |
that are imported when examples.tex is LaTeXed and a subdirectory for |
| 4 |
producing SVG files without invoking LaTeX. To generate examples.pdf |
| 5 |
in a unix-like environment (versions of unix, linux, cygwin, djgpp, |
| 6 |
Mingw, ...): |
| 7 |
|
| 8 |
1. Install the libraries as described in the top-level README file. |
| 9 |
|
| 10 |
2. Verify that dpic is installed. Some of the examples also work |
| 11 |
with gpic. |
| 12 |
|
| 13 |
3. In this directory, type "make", but note the following: |
| 14 |
|
| 15 |
If your installed dpic is the precompiled Mingw version for Windows, |
| 16 |
(a) edit the file windows.m4 to point to your installation folder, |
| 17 |
and (b) uncomment the CUSTOM=windows.m4 line in the Makefile, or type |
| 18 |
"make CUSTOM=windows.m4". |
| 19 |
|
| 20 |
If you get an error in examples.log, your LaTeX installation might |
| 21 |
need updating. |
| 22 |
|
| 23 |
IN CASE OF DIFFICULTY: Look at files debug1.tex and debug2.m4, and |
| 24 |
follow the instructions. |
| 25 |
|
| 26 |
SINGLE DIAGRAMS: To test one of the diagrams, say ex01.m4, type one of |
| 27 |
the following (and have a look at the comments at the top of the Makefile): |
| 28 |
"make ex01.ps" |
| 29 |
"make ex01.eps" |
| 30 |
"make ex01.pdf" (uses pdflatex) |
| 31 |
"make ex01.png" (requires Imagemagick convert) |
| 32 |
"make ex01.tif" (requires Imagemagick convert) |
| 33 |
"make ex01.svg" (requires Imagemagick convert, but see the dpv folder) |
| 34 |
|
| 35 |
DEBUGGING: To test and debug a single diagram, write it into test.m4. Type |
| 36 |
"make tst" to process the file, creating test.tex, which is imported into |
| 37 |
tst.tex. The diagram source and tst.tex are processed twice in case |
| 38 |
the boxdim macro is being used. If you only need to process once, type |
| 39 |
"make tst1". In both cases the resulting file is tst.ps. |
| 40 |
To use tikz and pdflatex to produce test.pdf, type "make test.pdf" as above. |
| 41 |
|
| 42 |
To test and debug a single diagram in a different directory, copy Makefile |
| 43 |
to where you want to work, adjust the definition of LIBDIR |
| 44 |
in Makefile if environment variable M4PATH has not been defined, and type |
| 45 |
one of the above commands. |
| 46 |
|
| 47 |
TiKz and PSTricks: By default, the dpic processor is invoked, producing |
| 48 |
TiKz commands. To use PSTricks instead, type "make clean; make |
| 49 |
examples.ps". To process the diagrams using TikZ PGF for formatting |
| 50 |
either by LaTeX or PDFlatex, type "make" or "make examplespgf.ps" |
| 51 |
in the pgf subdirectory. |
| 52 |
|
| 53 |
SVG: Look in the dpv directory for examples, and type "make". |
| 54 |
|
| 55 |
ALTERNATIVES: There are often several methods for producing similar |
| 56 |
graphical results, particularly of text labels. Some of the diagrams in |
| 57 |
this directory are more complicated than required for Tikz or PSTricks |
| 58 |
in order for them to work with other postprocessors. Dpic output |
| 59 |
that does not produce LaTeX labels has to be treated separately as, |
| 60 |
for example, in the dpv directory. |
| 61 |
|
| 62 |
METAPOST: To process the diagrams using MetaPost, look in the mpost |
| 63 |
subdirectory. To accommodate MetaPost, some of these sources use |
| 64 |
latexcommand(...) when iflatex(command "...") or, simply, command "..." |
| 65 |
would do. |
| 66 |
|
| 67 |
PSFRAG: To process the diagrams using .eps intermediate files with embedded |
| 68 |
psfrag strings, go into the psfrag directory and read the README file. |
| 69 |
As for METAPOST, some of these sources disable "command" or |
| 70 |
"latexcommand". |
| 71 |
|
| 72 |
XFIG: The xfig subdirectory contains the file xfig/xfiglib.fig, which contains |
| 73 |
elements in xfig 3.2 format produced by dpic for importing into xfig. |