Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/INSTALL

raw
1 INSTALLATION:
2 1. Decide where you will be installing the .m4 library files. In
3 principle, they can go anywhere; for example, $HOME/texmf/Circuit_macros,
4 c:\localtexmf\Circuit_macros, /usr/local/share/Circuit_macros,
5 or ~/texmf/tex/latex/Circuit_macros. Copy the files from the
6 top-level directory of the distribution to the installation
7 directory, or simply expand the .tar.gz or .zip distribution file
8 and rename the result to create the installation directory, which
9 will then include the doc and examples subdirectories.
10
11 2. Copy boxdims.sty (see Section 9 of the manual) from the top
12 distribution directory to where LaTeX will find it; directory
13 ~/texmf/tex/latex/boxdims for example, and refresh the LaTeX
14 filename database (the exact command depends on your LaTeX
15 distribution and may not be necessary).
16
17 3. Define the environment variable M4PATH to point to the installation
18 directory determined in Step 1. For the bash shell, for
19 example, add the following to your .bashrc file:
20 export M4PATH='.:~/texmf/tex/latex/Circuit_macros:'
21 but modify the path to the installation directory as necessary.
22
23 4. This is optional. For historical reasons, the default configuration file
24 as distributed is gpic.m4. You can change it to pgf.m4 or pstricks.m4
25 for use with dpic by editing the include command near the top of
26 libgen.m4. To do this automatically, go to the installation directory
27 and type
28 "make pgfdefault" to set the default processor to dpic with Tikz pgf
29 "make psdefault" to set the default processor to dpic with PSTricks
30 "make gpicdefault" to restore gpic as the default.
31
32 Installation on a Mac:
33 For a nice outline of how to install on a Mac, go to
34 https://www.hamish.science/2020/06/24/circuitmacros
35
36 CUSTOM MACROS:
37 You might develop your own set of macros that are combinations
38 or variations of those provided here. You can put them in a file,
39 mymacros.m4 say, and copy it to the installation directory. Then the
40 line include(mymacros.m4) in a diagram source will make your macros
41 available.
42
43 TESTING:
44 In case of difficulty, go to the examples directory, look at debug1.tex
45 and debug2.m4, and follow instructions.
46
47 To test your installation, go to the examples directory (or copy the
48 files Makefile, tst.tex, and any .m4 sources you might like to test
49 from the examples directory to a working directory) and create a test
50 circuit in the file test.m4. Copy ex01.m4 for example, or quick.m4
51 from the doc directory, into test.m4.
52
53 On a system with a "make" facility, first check the definitions at
54 the top of the Makefile, and then type "make tst1" to produce the
55 file tst.ps. If the source requires processing twice, type "make
56 tst" instead. To process one of the example .m4 files in the examples
57 directory (let's call it name.m4), simply type "make name.pdf" or "make
58 name.ps". If these tests work to your satisfaction, try typing simply
59 "make" to produce examples.pdf.
60
61 The .m4 files in the examples directory can serve as models for your
62 diagrams but keep in mind that some of them contain details that allow
63 the source to be used with a variety of postprocessors. Sticking to one
64 postprocessor such as tikz or PStricks allows for the simplest source.
65 You might also wish to browse some of the included files that are not
66 used to make examples.ps.
67
68 No "make" facility? You have to test by hand (but see the README file
69 for diagram production software). Copy a test file as above into
70 test.m4. Assuming you have dpic installed, type the following:
71
72 m4 -I <path> pstricks.m4 test.m4 > test.pic
73 dpic -p test.pic > test.tex
74 latex tst
75 dvips tst -o tst.ps