2

I need to put a table next to this circuit (1), as in the following image (2). Tranks in advance!

enter image description here enter image description here

\begin{figure}[h]
    \centering
\begin{circuitikz} 
    \draw
    (0, 0) node[op amp] (opamp) {}
    (opamp.-) to[R,l_=$R_s$] (-3, 0.5) 
    (opamp.-) |-  (-1, 1.5) to[R,l^=$R_f$] (1, 1.5) -| (opamp.out);
    \draw (-3,0.5) node[ground,below]{};
 \draw  (opamp.-) to[short,*-] ++(0,0);    
\draw  (opamp.out) to[short,*-] ++(0,0)to[short](2,0)node[right]{$V_o$};
\draw (opamp.+)node[left]{$V_i$}
\end{circuitikz}
\end{figure}
Matias Tevez
  • 239
  • 1
  • 6
  • 1
    Please add some clarifications: What exactly is the problematic part? Is it the placement of circuit and table side by side? Is it the vertical alignment? Is it the colored background? What did you try so far? – leandriis Jun 19 '20 at 21:20
  • This has really nothing to do with circuitikz... ;-) it is the same as aligning a tikzpicture and whatever else... for example: https://tex.stackexchange.com/questions/424121/placing-a-tikz-picture-and-table-side-by-side – Rmano Jun 20 '20 at 09:12

1 Answers1

3

Align at center:

\documentclass{article}
\usepackage{circuitikz}
\usepackage{lipsum}

\begin{document} \lipsum[1]

\begin{figure}[h] \centering \begin{circuitikz}[baseline=(current bounding box.center)] \draw (0, 0) node[op amp] (opamp) {} (opamp.-) to[R,l_=$R_s$] (-3, 0.5) (opamp.-) |- (-1, 1.5) to[R,l^=$R_f$] (1, 1.5) -| (opamp.out); \draw (-3,0.5) node[ground,below]{}; \draw (opamp.-) to[short,*-] ++(0,0);
\draw (opamp.out) to[short,*-] ++(0,0) to[short] (2,0) node[right] {$V_o$}; \draw (opamp.+)node[left]{$V_i$}; \end{circuitikz} \qquad \begin{tabular}[c]{lr} a & b \ aa & bb \end{tabular} \end{figure}

\lipsum[1] \end{document}

enter image description here

Align at top:

\documentclass{article}
\usepackage{circuitikz}
\usepackage{lipsum}

\begin{document} \lipsum[1]

\begin{figure}[h] \centering \begin{circuitikz}[baseline={(0, 1.5)}] \draw (0, 0) node[op amp] (opamp) {} (opamp.-) to[R,l_=$R_s$] (-3, 0.5) (opamp.-) |- (-1, 1.5) to[R,l^=$R_f$] (1, 1.5) -| (opamp.out); \draw (-3,0.5) node[ground,below]{}; \draw (opamp.-) to[short,*-] ++(0,0);
\draw (opamp.out) to[short,*-] ++(0,0) to[short] (2,0) node[right] {$V_o$}; \draw (opamp.+)node[left]{$V_i$}; \end{circuitikz} \qquad \begin{tabular}[t]{lr} a & b \ aa & bb \end{tabular} \end{figure}

\lipsum[1] \end{document}

enter image description here

muzimuzhi Z
  • 26,474
  • 1
    +1. It could be interesting to use, for example, baseline=(A.out) and then centering the table. That way you can align the tabular to any component of the circuit. – Rmano Jun 20 '20 at 09:14