# M4 Circuit Macros with TeXnicCenter and MiKTeX 2.9/Windows 7 [closed]

I'm trying to run M4 Circuit Macros with TeXnicCenter and MiKTeX 2.9/Windows 7 but keep getting a compile error as follows:

pdflatex> I can't finde file 'quick'
pdflatex> l.6   \input quick


I presume this means that the *.m4 extension is not correctly linked to m4.exe.

The TeX file I'm using is:

\documentclass[10pt,a4paper,oneside]{book}
\usepackage[a4paper]{geometry}
\usepackage{pstricks}

\begin{document}
\input quick
\end{document}


And the quick.m4 file (in the same directory) is:

.PS
cct_init
elen = 0.75
Origin: Here
source(up_ elen); llabel(-,v_s,+)
resistor(right_ elen); rlabel(,R,)
dot
{
capacitor(down_ to (Here,Origin))
rlabel(+,v,-); llabel(,C,)
dot
}
line right_ elen*2/3
inductor(down_ Here.y-Origin.y); rlabel(,L,); b_current(i)
line to Origin
.PE


Following the info I've found (in particular http://staff.ee.sun.ac.za/pjrandewijk/wiki/index.php/M4_Circuit_Macros_-_Installation and http://www.latex-community.org/forum/viewtopic.php?f=31&t=10133), I've done the following steps already:

1) copy m4.exe, regex2.dll and dpic.exe to "C:\Program Files (x86)\MiKTeX 2.9\miktex\bin"

2) copy M4 Macros to "C:\Program Files (x86)\MiKTeX 2.9\tex\latex\circuits_macros"

3) add "C:\Program Files (x86)\MiKTeX 2.9" to user variable "M4PATH"

4) Start -> All Programs -> MikTeX 2.9 -> Maintenance (Admin ) -> Settings (Admin) [General] Tab and click the [Refresh FNDB]

5) associate *.m4 extension with TeXnicCenter

6) set up an output profile in TeXnicCenter which selects M4 and dpic as post-processors and pass the (as far as I understand) correct arguments

Any pointers where I've missed a step? Thanks very much!

## closed as unclear what you're asking by Mensch, Zarko, Jesse, Werner, Stefan PinnowMay 21 '16 at 5:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I don't have miktex to test, but shouldn't that be \input quick.m4 ? – David Carlisle Oct 13 '14 at 15:29
• As far as I understand--no; and that's in line with the M4 docu (staff.ee.sun.ac.za/pjrandewijk/downloads/latex/circuit_macros/…, page 2). With the extension added, the processor tries to interpret the M4 file as TeX code, which obviously won't work. – user64212 Oct 14 '14 at 6:42
• Shouldn't you be using latex with pstricks or loading something to support it with pdflatex? – cfr Sep 5 '15 at 1:10
• I don't think you are supposed to run latex on it. The M4 stuff is supposed to go first, then that produces code which gets input into a LaTeX document. At least, so this guide suggests. I can't see how it can work otherwise: \input uses the .tex extension by default but, in any case, what you are inputting is meaningless to TeX. I think it has to be transformed first. Note that although the guide configures things as 'post-processors' it says that the LaTeX tab does not include latex so they are post-nothing. – cfr Sep 5 '15 at 1:22