% --- start of displayed preamble in the book ---
input makecirc;
initlatex("");
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
resistor.a(origin,normal,90,"R","10\ohm");
inductor.a(R.a.r+(2cm,0),Up,-90,"L","");
centreof.A(R.a.r,L.a.l,cap);
capacitor.a(c.A,normal,phi.A,"C","");
wire(R.a.r,C.a.l,nsq);wire(C.a.r,L.a.l,nsq);
wire(L.a.r,R.a.l,udsq);
endfig;
end;