Using Lcapy with LaTeXΒΆ

Lcapy can generate .pgf image files for both schematics and plots. These have the advantage is that they use the same fonts as the 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()}