In my graduate work, I draw a lot of system diagrams which basically involves drawing a bunch of shapes with arrows. When typesetting my figures, I like using the Pic preprocessor because of its expressiveness. In the following post I will show how to use it.

.PS A: circle "A" line right then down B: circle with .n at Here line -> from A.s to B.w .PE

This will generate the following figure:

A

Below is my workflow when writing Pic diagrams:

Install the Pic preprocessor. Most *nix distributions come with the GNU pic along with the groff-related packages. For a more powerful preprocessor, I recommend J. Aplevich's Dpic. It supports preprocessing to other LaTeX graphics libraries such as PSTricks and TiKz. Here we compile the above code using GNU pic:

$ cat figure.pic | pic -t > figure.tex

Pic is a preprocessor and compiles any code in between the .PS and .PE. Although in principle you can embed them directly in your LaTeX documents, most people practice placing their Pic figures in a separate file.

My first encounter with Pic was when I was looking for ways to typeset my Electrical Engineering reports during undergrad. That time, I found the Circuit_macros package, also by J. Aplevich. Circuit_macros provides a set of M4 macros to draw circuit components. Using it is the same as working with normal Pic figures but you have to pre-process the figures through m4 first.

Comments

Latest Forum Posts

﻿

Re: Metafile to EPS converter: should it work from within LY01/11/2016 15:21, scottkostyAh OK, I see. This is a bit a pitty, since I strongly believe that what LyX does with LateX is exactly what "Windows"-people want/need: something "easy"/"user-friendly"/"working-out-of-the-box"/"easy-GUI"/WYSIWYM.
Yes it is too bad we do not have more developers on W...

Re: Use TikZ with LyX01/11/2016 14:34, jonjoexxThank you so much for posting this I am new to Lyx and spent two days trying to get tikz to work....

Re: Metafile to EPS converter: should it work from within LY01/11/2016 09:49, Stef Pillaert- There is only one LyX developer who uses Windows. Most use Linux. The developer on Windows does what he can and dedicates a lot of time, but it is hard when he is the only one.
Ah OK, I see. This is a bit a pitty, since I strongly believe that what LyX does with LateX is exactly what "Windows"-people wan...

Re: Metafile to EPS converter: should it work from within LY01/11/2016 00:07, scottkostyOK, I did that for both emf and wmf to eps, now it works (though it takes quite a while the first time; also seems slow the first time I generate a pdf).
But OK, it seems fine now. Thanks a lot for your time!!!
Great! Sorry it took so long. Thanks for your patience.
(Just out of curiosity: did I do something wrong...

Re: Android31/10/2016 19:16, Stefan KottwitzIt is good to see Lyx in the cloud.
Yes!
lyx-cloud.jpg
(Click image to expand) On my Blackberry phone.
Stefan...

Re: Metafile to EPS converter: should it work from within LY31/10/2016 17:24, Stef PillaertOK, I did that for both emf and wmf to eps, now it works (though it takes quite a while the first time; also seems slow the first time I generate a pdf).
But OK, it seems fine now. Thanks a lot for your time!!!
(Just out of curiosity: did I do something wrong while installing? Or does this happen on every Windows-machi...