24

I have to make a relative simple diagram and import it to latex vectorially. What would you recommend me to do this?

This question might not be best asked here, but I suspect a lot of you have created LaTeX documents that contain electronic diagrams.

I know about circuitikz, and xcircuit. But the first option is very slow and the second is very weird. I want something faster yet with high quality.

2

8 Answers 8

20

Wow, I find it unusual that nobody mentioned the best tool around (my opinion) to do high quality Latex schematics (not too hard to learn, best circuits guaranteed) - it's Circuit_macros which are created and maintained by professor J. D. Aplevich.

Examples can be found here, and helpful installation tips are here. You can find manual in every Circuit_macros distribution. Commands for drawing are those of pic drawing language, and macros for electrical elements are written in m4 macro language. After writing down schematic in this combination of languages (pic, m4), file should be preprocessed with m4 macro processor leaving pure pic drawing behind. .pic. file is after that easily transfered in PSTricks or TiKZ/PGF (first couple pages of manual).

  • One thing that makes Circuit_macros so much more usable and faster is Cirkuit program (written by Matteo Agostinelli), in which you have the ability to preview the schematic while you are drawing it. There are always binaries around for Linux (although probably not for newest version), so the installation is straightforward. Here's how it looks like when you're using Cirkuit to draw schematics.
  • Problem with processing every following schematic with m4 and dpic manually, can easily be avoided using special LaTeX command \mtopgf defined on the 5th page of the manual.

alt text

3
  • I suppose that you were looking for "one-time" faster drawing of circuits. Then this answer wouldn't even qualify, probably...
    – user1996
    Commented Dec 4, 2010 at 12:08
  • 1
    I would just love to produce those graphics more easily!
    – Tomas
    Commented Dec 18, 2010 at 20:18
  • 1
    cirkuit development is dead and it is still a qt4 application. Most distributions have already dropped the qt4 support and cirkuit see: repology.org/metapackage/cirkuit/versions Commented Jan 17, 2019 at 15:35
6

Since I often use LTspice to simulate my circuits, I wrote a little lt2circuitikz script to convert LTspice .asc files to .tex files with circuiTikZ graphics and create nice vectorial PDF schematics. LTspice runs on Windows (and using wine also on Linux), the script is in Python3. Take a look if you use LTspice anyway, might save some time.

3

Dia can export to a variety of TeX-formats, including TikZ/pgf, Metapost and PSTricks. Here is a completely nonsensical image I just created with the pgf exporter:

example

1
  • 3
    Is there a nice symbol library for electronic circuit schematics? Commented Dec 8, 2010 at 20:36
3

I saw that electronics.stackexchange.com has a couple of relevant questions about this:

Then you have to test them a little and see with one can do some kind of export into a format with scalable graphics, like svg, eps, pdf.

My guess would be that gEDA can help you, but I think you need to test it.


A little side bonus: text presentation of a byte

2

What about pst-circ?

1
  • It's very like the same as circuitikz, not so easy to use, although the results are publication-quality. I'm looking for something more graphical.
    – Tomas
    Commented Nov 2, 2010 at 17:59
1

Inkscape is often useful for making vector drawings for inclusion in LaTeX.

1
  • Yes, I've been using it. And looks like I'm going to do those diagrams there.
    – Tomas
    Commented Nov 3, 2010 at 3:22
1

Eeschema from the open source electronic suite KiCad is a handy tool to draw schematics.

You can export to PDF, PS and SVG from KiCad and then use one of the standard tools to convert .svg to real .tex, or just include a figure with the .pdf file.

Plot window in KiCad

0

Not exactly what you asked for, but in my larger projects, I've gotten a good mileage out of caching the compiled versions of tikz figures. It is discussed in the tikz documentation in the chapter named “Externalizing graphics”, and discussed further here: Script to automate externalizing TikZ graphics

This would take care of the slowness of, say, circuitikz, by having you compile each circuit once, and subsequently including it instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .