summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples
blob: bcd3bf372841c0f12ea7937db4f50dcd972d1732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

THIS DIRECTORY contains examples.tex, source files for the diagrams
  that are imported when examples.tex is LaTeXed, some other example
  diagrams, and a subdirectory for producing SVG files without invoking
  LaTeX. To generate examples.pdf in a unix-like environment (versions
  of unix, linux, cygwin, djgpp, ...):

1.  Install the libraries as described in the top-level README file.

2.  Verify that dpic is installed.  Some of the examples also work
     with gpic.

3.  In this directory, type "make", but note the following:

     If your installed dpic is the precompiled Mingw version for Windows,
     (a) edit the file windows.m4 to point to your installation folder,
     and (b) uncomment the CUSTOM=windows.m4 line in the Makefile, or type
     "make CUSTOM=windows.m4".

     If you get an error in examples.log, your LaTeX installation might
     need updating.

IN CASE OF DIFFICULTY: Look at files debug1.tex and debug2.m4, and
  follow the instructions.

SINGLE DIAGRAMS: To test one of the diagrams, say ex01.m4, type one of
  the following (and have a look at the comments at the top of the Makefile):
  "make ex01.ps"
  "make ex01.eps"
  "make ex01.pdf" (uses pdflatex)
  "make ex01.png" (requires Imagemagick convert)
  "make ex01.tif" (requires Imagemagick convert)
  "make ex01.svg" (requires Imagemagick convert, but see the svg folder)

DEBUGGING: To test and debug a single diagram, write it into test.m4.  Type
  "make tst" to process the file, creating test.tex, which is imported into
  tst.tex.  The diagram source and tst.tex are processed twice in case
  the boxdim macro is being used.  If you only need to process once, type
  "make tst1".  In both cases the resulting file is tst.ps.
  To use tikz and pdflatex to produce test.pdf, type "make test.pdf" as above.

  To test and debug a single diagram in a different directory, copy Makefile
  to where you want to work, adjust the definition of LIBDIR
  in Makefile if environment variable M4PATH has not been defined, and type
  one of the above commands.

TiKz and PSTricks: By default, the dpic processor is invoked, producing
  TiKz commands.  To use PSTricks instead, type "make clean; make
  examples.ps".  To process the diagrams using TikZ PGF for formatting
  either by LaTeX or PDFlatex, type "make" or "make examplespgf.ps"
  in the pgf subdirectory.

SVG: Look in the svg directory for examples, and type "make".

ALTERNATIVES: There are often several methods for producing similar
  graphical results, particularly of text labels.  Some of the diagrams
  in this directory are slightly more complicated than required for Tikz
  or PSTricks in order for them to work with other postprocessors. Dpic
  output that does not produce LaTeX labels has to be treated separately
  as, for example, in the svg directory.

METAPOST: To process the diagrams using MetaPost, look in the mpost
  subdirectory.  To accommodate MetaPost, some of these sources use
  latexcommand(...) when iflatex(command "...") or, simply, command "..."
  would do.

PSFRAG: To process the diagrams using .eps intermediate files with embedded
  psfrag strings, go into the psfrag directory and read the README file.
  As for METAPOST, some of these sources disable "command" or
  "latexcommand".

XFIG: The xfig subdirectory contains the file xfig/xfiglib.fig, which contains
  elements in xfig 3.2 format produced by dpic for importing into xfig.