# XCircuit Working In LaTeX Mode

I'm trying to get LaTeX mode to work in XCircuit. It really doesn't seem to produce a tex file when I save.

Here are the steps I'm following.

Open terminal in Linux, execute xcircuit, program starts up and I go edit -> latex mode, then it checks the latex mode thing and I press t, then I type some random word. Then I go file -> format page output, I give the file a name, hit Write File and then I have a look and only a postscript file was created... No tex file was created...

I've been trying to get this to work for ages.

Anyone actually got this working?

I go edit -> latex mode, then it checks the latex mode thing and I press t, then I type some random word

XCircuit Help Says

## 1.1. embedding in LaTeX documents

Encapsulated PostScript can be inserted directly into a LaTeX document with the "epsfig" package. LaTeX purists, however, usually like to have continuity between the text of the document and the figure. For that, there is "LaTeX mode" in XCircuit. When this mode is enabled, several things happen: 1) labels created when in LaTeX mode will be marked and processed separately from the figure. 2) when entering text, the backslash key does not generate the special characters display, but just prints a backslash (since backslashes are used often in LaTeX and special characters are declared with backslash commands), and 3) when writing the PostScript output, XCircuit additionally creates a ".tex" file that contains all of the labels in LaTeX format, and a call to "epsfig" to include the image.

So if you didn't actually enter any labels in proper LaTeX (just some non-LaTeX "random word"), perhaps it has no LaTeX to put into ".tex" file.

• Hmm, I'm not sure I understand. Are you saying you think I'd need to do $\frac{3}{2}$ or something, and then it might work??? I should just be able to type text and it should just convert it. Is there some delimiter I'm missing? Sep 21, 2013 at 11:32
• @user968243 it's "\" and then "$" not "$\" and, at the end, it's exactly the same - well it is on this site anyway - $H^EL_LO$ right click over this word etc... Sep 21, 2013 at 15:20
• I wasn't trying to write LaTeX though... I was trying to work out what I need to type into XCircuit to get it to parse my stuff as LaTeX... and that was an example... Sep 22, 2013 at 7:03

I have done the same thing and it's working, maybe you have an older version of XCircuit, try recompiling from the sources in the official page, it's easy.

TIP: Now in XCircuit you can make subscripts, underscripts, overlines and underlines without entering ^, _ and \overline, just using the menu, and it will be more clean, anyway you need to write the "".

• Okay, this is very odd. Do you need to put dollar signs in so that it parses to latex? What if you don't want math mode? You running it on Linux? Oct 22, 2013 at 0:17
• I'm running XCircuit in both Linux and Windows. No, you don't need to put the dollar sign if you want the .tex file, you only need to select in the menu the 'Latex mode'. You need to put the dollar sign only if you want math, if you dont put the dollar sign XCircuit will not complain, your latex document will fail to compile. example Oct 25, 2013 at 2:34