Using Lcapy with LaTeX

Lcapy can generate .pgf image files for both schematics and plots. This format has the advantages of vector graphics and the same fonts as the LaTeX document.

Lcapy can also generate expressions using LaTeX math markup. These can be automatically embedded using the sympytex LaTeX package (see

Here’s a bare bones example that includes a figure generated by schtex (see schtex) and equations generated with sympytex:

\documentclass[a4paper, 12pt]{article}


  \caption{RLC network.}

  from lcapy import Circuit, s, t
  cct = Circuit('demo1.sch')

  V_C(s) = \sympy{cct.C.V(s).simplify()}

  v_C(t) = \sympy{cct.C.V(t).simplify()}