l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2004 Feb 07 21:38

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] circuits with latex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] circuits with latex



Well, m4 is a macro processor, like the C preprocessor.  It doesn't do
anything but translate a sequence of strings to another set of strings.
Any text it hasn't been instructed to process goes straight through m4,
without any translation.

So to use circuit_macros, you need to pass 2 files to m4:

   1. The file you want to process.
   2. A file containing instructions on which strings to process,
      and how.

#1 is the file you create.  #2 is libcct.m4 file that comes with
circuit_macros.  So you end up with:

   $ m4 /path/to/libcct.m4 circuit.m4 > circuit.pic
   $ gpic -t circuit.pic > circuit.tex

BUT, I highly recommend you use dpic instead of gpic.  The output looks so
much nicer (at least it was last time I checked).  You can get dpic from:

   http://www.ece.uwaterloo.ca/~aplevich/dpic/

dpic also requires an additional file, pstricks.m4 (comes with
circuit_macros), so you end up with:

   $ m4 /path/to/pstricks.m4 /path/to/libcct.m4 circuit.m4 > circuit.pic
   $ gpic -t circuit.pic > circuit.tex

It's a little complicated to remember (and cumbersome to write out each
time) so you probably want to wrap everything in a script.

-Mark


On Sat, 7 Feb 2004, Peter Jay Salzman wrote:

> HA!!!!!
>
> i wish i could.  i don't even get that far!  here's my m4 file:
>
>    p@satan$ cat circuit.m4
>    .PS
>    cct_init
>    gridsize = 0.1
>    .PE
>    \usebox{\graph}
>
>
>    p@satan$ m4 circuit.m4  > circuit.pic
>    p@satan$ gpic -t circuit.pic > circuit.tex
>    gpic:circuit.pic:3: syntax error before newline
>    gpic:circuit.pic:3: giving up on this picture
>
> it's giving up on cct_init.  what my belief in what should happen is
> this:
>
> 1. m4 creates a .pic file.
> 2. gpic takes a .pic file and creates a .tex file.
> 3. i \input the .tex file at the appropriate location.
>
> am i completely off base here?
>
> thanks!
> pete
>
>
> On Sat 07 Feb 04,  8:56 PM, Mark K. Kim <markslist@cbreak.org> said:
> > Can you post a sample latex file and the error messages from running
> > latex on it?
> >
> > -Mark
> >
> >
> > On Sat, 7 Feb 2004, Peter Jay Salzman wrote:
> >
> > > has anyone successfully used the circuit_macros package for latex?
> > >
> > > i keep getting gpic errors, no matter how simple my circuit is (even the
> > > null circuit generates errors.
> > >
> > > pete
> >
> > --
> > Mark K. Kim
> > AIM: markus kimius
> > Homepage: http://www.cbreak.org/
> > Xanga: http://www.xanga.com/vindaci
> > Friendster: http://www.friendster.com/user.jsp?id=13046
> > PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
> > PGP key available on the homepage
> > _______________________________________________
> > vox-tech mailing list
> > vox-tech@lists.lugod.org
> > http://lists.lugod.org/mailman/listinfo/vox-tech
>
> --
> Make everything as simple as possible, but no simpler.  -- Albert Einstein
> GPG Instructions: http://www.dirac.org/linux/gpg
> GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>

-- 
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.jsp?id=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!