# QuickLatex Setup

The code below shows the basic setup to draw a Circuitikz diagram in a WordPress post using the QuickLatex plugin.

Add the actual Circuitikz code between the end of the preamble and the end of the tikzpicture elements.

Sometimes in can be beneficial to add a background to the circuit drawing. This is true when using QuickLatex with WordPress to render Circuitikz (as this site does), as by default it uses a transparent background, which is good for inline equations, but not so much for circuit drawings.

Tailor the corners of the rectangle to provide the correct size background for your circuit drawing.

# Capacitors

The three types of capacitors used are easily drawn.

 *** QuickLaTeX cannot compile formula: \begin{tikzpicture} % Draw a non-polarized capacitor.\draw (0,0) to [C, l=$C$] (0,2);\end{tikzpicture} *** Error message: Error: Cannot create svg file  *** QuickLaTeX cannot compile formula: \begin{tikzpicture} % Draw a polarized capacitor.\draw (0,0) to [pC, l=$C$] (0,2);\end{tikzpicture} *** Error message: Error: Cannot create svg file  *** QuickLaTeX cannot compile formula: \begin{tikzpicture} % Draw a variable capacitor.\draw (0,0) to [vC, l=$C$] (0,2);\end{tikzpicture} *** Error message: Error: Cannot create svg file  Unpolarised capacitor. Polarised capacitor. Variable capacitor.

# Op-Amps And Comparators

Op-amps and caparators share the same symbol.

*** QuickLaTeX cannot compile formula:
\begin{tikzpicture}[scale=1]  \draw % Draw an op-amp (0,0) node[op amp] (opamp) {} (opamp.+) node[left] {$v_+$} (opamp.−) node[left] {$v_−$} (opamp.out) node[right] {$v_o$}; \end{tikzpicture}

*** Error message:
Error: Cannot create svg file


# Dashed Lines

It took me awhile to get dashed lines to work, here is the correct way to draw them:

Make sure to use a separate draw command for dashed lines, rather than tacking it onto another one, otherwise you will find all lines in that draw command will become dashed.

Posted: June 28th, 2014 at 10:24 pm
Last Updated on: January 31st, 2015 at 9:53 am