M4 Circuit Macros - Installation

From Peter Jan Randewijk
Jump to: navigation, search

Contents

On Windows 7

M4 & Dpic

Download and install M4 and dpic - see also M4_Circuit_Macros_-_Requirements

Place M4 and dpic some where in the path, e.g. C:\Program Files\MikTeX 2.x\MikTeX\bin

The (M4) Circuit_Macros libraries

Download and install the (M4) Circuit_Macros - see

Then copy all the (M4) Circuit_Macros libraries, e.g.:

  • darrow.m4
  • gpic.m4
  • lib3D.m4
  • libcct.m4
  • libgen.m4
  • liblog.m4
  • mfpic.m4
  • mpost.m4
  • pgf.m4
  • postscript.m4
  • pstricks.m4
  • svg.m4
  • xfig.m4

as well as the LaTeX style file,

  • boxdims.sty

to (say) C:\Users\<username>\texmf\tex\latex\Circuit_Macros

and then update MikTex's File Name Database by going to:

Start -> All Programs -> MikTeX 2.9 -> Maintenance (Admin ) -> Settings (Admin) and clicking on the [Roots] Tab, then the [Add] Button to add the C:\Users\<username>\texmf folder. The File Name Data Base will automatically refresh.

If you have already added C:\Users\<username>\texmf previously, just go to the [General] Tab and click the [Refresh FNDB] to refresh the File Name Data Base.

Control Panel -> System and Security -> System -> Advanced system settings -> [Environmental Variables...] Button -> [New...] Button


Variable name: M4PATH

Variable value: C:\Users\<username>\texmf

On Linux

The (M4) Circuit_Macros libraries

Copy all the (M4) Circuit_Macros libraries, e.g.:

  • darrow.m4
  • gpic.m4
  • lib3D.m4
  • libcct.m4
  • libgen.m4
  • liblog.m4
  • mfpic.m4
  • mpost.m4
  • pgf.m4
  • postscript.m4
  • pstricks.m4
  • svg.m4
  • xfig.m4

as well as the LaTeX style file,

  • boxdims.sty

to: /home/<username>/texmf/tex/latex/circuit_macros

Add the following lines to your .bashrc file

...
export M4PATH='/home//texmf/tex/latex/circuit_macros/'
export TEXMFHOME=$HOME/texmf
...

The first line is necessary to automatically "register" the M4 libraries' location each time you run the shell and the second (if not already present) to add a local TDS (TeX Directory Structure) tree.

Finally, running

> sudo texhash

is required to "register" boxdims.sty in LaTeX's File Name Database.

One can theoretically copy the (M4) Circuit_Macros libraries anywhere, but because it is available on CTAN, I prefer to copy it into LaTeX's TDS

Dpic

Download dpic.tar.gz, run:

> tar -xzf dpic.tar.gz
> cd dpic
> make

Make sure dpic executable, e.g.:

> chmod 755 dpic

and copy to:

  • /home/<username>/bin or
  • /usr/local/bin

or any other location in your executable path.

Personal tools