# [OS X TeX] Circuitry: great package!!

Juan Manuel Palacios jmpalacios at mac.com
Thu Nov 14 23:43:10 EST 2002



Hello list, here I come with some good news for those who have a
need for typesetting circuits into LaTeX files but do not have drawing
tools at hand. In such case the "Circ" package could be considered a God
send, although still a young one! First of all let me say, if this is
misuse. But if this package is not widely known then I encourage all who
see circuits in their sleep to download it and get acquainted with it:

http://www.ctan.org/tex-archive/macros/generic/diagrams/circ/

-) Makefile,
-) circ.dtx,
-) circ.ins

The Makefile needs some tweaks to reflect the file structure of
Gerben's (thank you so much!!) TeX installation in order to place the
needed files in the right places:

INSTDIR=/usr/local/lib/texmf	<-- changed to
INSTDIR=/usr/local/teTeX/share/texmf.local
CIRCMF=$(INSTDIR)/mf/circ <-- changed to CIRCMF=$(INSTDIR)/metafont/circ
CIRCTEX=$(INSTDIR)/tex/circ <-- once the INSTDIR has been set there is no need to modify this further FONTMAP=/usr/lib/texmf/fontname/special.map <-- changed to FONTMAP=$(INSTDIR)/fontname/special.map

This will make the installation of the circ package compatible with
a default install of Gerben's packages; anyone who has customized TeX's
installation will know how to modify the Makefile appropriately. Two
important things to note about the change in the variables:

-) The CIRCMF change is *extremly* important because the structure
"$(INSTDIR)/mf/circ" does not follow TeX standards for placing font definitions: the standard is "/whatever/metafont/packagename/" (or at least that's what I've learned!) but this package uses "/whatever/mf/packagename/" and TeX is not configured to look at any "mf" directory for font definitions. Once I had everything installed I still got font errors when compiling circuits and I had to bang my head against the wall to figure this out! -) Secondly, the FONTMAP change needs an even more manual tweak I preferred to perform because of security reasons. The Makefile looks for certain declarations in the "special.map" file and if it doesn't find them it tries to append them to it. So to prevent the package from modifying a default file (which could be wiped away by an update) I told the Makefile to look for it inside the texmf.local tree. But there is no special.map file in it so an "mkdir -p /usr/local/teTeX/share/texmf.local/fontname" and a manual copy of"texmf/fontname/special.map" to "texmf.local/fontname/" need to take place before the Makefile is run. Ironically, after checking all this and performing all the changes I realized the declarations the Makefile looks for in "special.map" are already there (don't know why), so no real appending takes place! Anyhow, it is a recommended practice to keep local stuff from modifying default stuff. Anyhow, after all these cumbersome modifications are in place we are ready to produce and install all the needed files. Just place the three downloaded files in a directory (preferably one created for the sole purpose of the circ package because plenty of new files will be generated) and run "make all" followed by "sudo make install". If you want documentation just run "make doc" and grab the "circ.dvi" file. After all this run "sudo texhash" and everything should be ready to go! As a test of a working installation of the circ package try to compile the following text: \documentclass[12pt]{article} \usepackage[basic,physics]{circ} \title{My First Circuit!!} \author{me} \begin{document} \maketitle Hello, my first circuit! \begin{center} \begin{circuit}0 \nl \varU1$\varepsilon$u \- 1 u \nl \C1$C$u \- 1 u \- 3 r \nl \L1$L$. r \- 3 r \.1 \- 3 d \nl \C3$C'$d \- 3 d \.2 \atpin .1 \- 3 r \nl \L2$L$. r \- 3 r \- 3 d \nl \Cvar2$C\$ d
\- 3 d
\- 20 l
\end{circuit}
\end{center}

\end{document}

This should give you a fair idea of what the package can do, it is
really great! The generated circuit is very simple and amateur, but all
that remains from now on is reading "circ.dvi"

I hope you all like it and that it is as useful for some of you as
I hope it will be for me. Again, if most of you already have this then

Enjoy! My warmest regards to all,...

Juan.

P.S.: I think I explained all the needed steps to get the show on the
road, but if I forgot something or anyone has problems getting the
package to run then don't hesitate to contact me, I'll try to do my best
helping!

P.P.S.: I have no relation to the package developer, I am just an amazed
web surfer who stumbled across an interesting LaTeX package! Bye...

-----------------------------------------------------
Mac TeX info, resources, and news can be found at:
<http://www.esm.psu.edu/mac-tex/>
-----------------------------------------------------
List archives can be found at:
<http://www.esm.psu.edu/mac-tex/MacOSX-TeX-Digests/>
-----------------------------------------------------
See message headers for list info.
-----------------------------------------------------