von lukasen » Fr 11. Dez 2015, 19:41
Hallo alle zusammen,
ich bin hier neu im Forum und habe auch schon gleich meine erste Frage und hoffe, dass mir diese auch jemand beantworten kann.
Ich habe eine lange Tabelle wie in der folgenden Art. Ich würde gerne alle Elemente vertikal zentrieren, sodass die Schrift der ersten Spalten mittig zentriert neben den mittig zentrierten circuitikz Zeichnungen steht. Kann mir jemand helfen?
Mit dem Befehl
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
bin ich nicht zu einer Lösung gekommen.
Hier meine Tabelle:
\documentclass{scrartcl}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage[europeanresistors, europeanports, siunitx]{circuitikz}
\begin{document}
\begin{longtable}{c|c|c|c|c|c|l}
$x_1$ & 0 & 0 & 1 & 1 & Bezeich- & \multirow{2}*{Schaltbild}\\
$x_2$ & 0 & 1 & 0 & 1 & nung&\\\hline
$y_{7}$ & 0 & 1 & 1 & 0 & XOR &
\begin{circuitikz}
\draw(0,0) node[nand port] (nand1) {}
(2,0.5) node[nand port] (nand2) {}
(2,-0.5) node[nand port] (nand3) {}
(4,0) node[nand port] (nand4) {}
(-1.76,0.775) node[circ] (){}
(-1.76,-0.775) node[circ] (){}
(nand1.out) node[circ] (){}
%
(-2,0.775) -| (nand1.in 1)
(-2,-0.775) -| (nand1.in 2)
(-2,0.775) -| (nand2.in 1)
(-2,-0.775) -| (nand3.in 2)
(nand1.out) |- (nand2.in 2)
(nand1.out) |- (nand3.in 1)
(nand2.out) -| (nand4.in 1)
(nand3.out) -| (nand4.in 2)
%
(-2,0.775) node[left] () {$x_1$}
(-2,-0.775) node[left] () {$x_2$}
(nand4.out) node[right] () {$y_7$}
%
;\end{circuitikz}
\\\hline
$y_{8}$ & 0 & 1 & 1 & 1 & OR &
\begin{circuitikz}
\draw(1,0) node[nand port] (nand1) {}
(1,1) node[nand port] (nand2) {}
(3,0.5) node[nand port] (nand3) {}
(-0.76,0) node[circ] (){}
(-0.76,1) node[circ] (){}
%
(-1,0) -| (nand1.in 1)
(-1,0) -| (nand1.in 2)
(-1,1) -| (nand2.in 1)
(-1,1) -| (nand2.in 2)
%
(nand1.out) |- (nand3.in 2)
(nand2.out) |- (nand3.in 1)
%
(-1,0) node[left] () {$x_2$}
(-1,1) node[left] () {$x_1$}
(nand3.out) node[right] () {$y_8$}
%
;\end{circuitikz}
\\\hline
$y_{9}$ & 1 & 0 & 0 & 0 & NOR&
\begin{circuitikz}
\draw(1,0) node[nand port] (nand1) {}
(1,1) node[nand port] (nand2) {}
(3,0.5) node[nand port] (nand3) {}
(5,0.5) node[nand port] (nand4) {}
(-0.76,0) node[circ] (){}
(-0.76,1) node[circ] (){}
(nand3.out) node[circ] (){}
%
(-1,0) -| (nand1.in 1)
(-1,0) -| (nand1.in 2)
(-1,1) -| (nand2.in 1)
(-1,1) -| (nand2.in 2)
%
(nand1.out) |- (nand3.in 2)
(nand2.out) |- (nand3.in 1)
(nand3.out) |- (nand4.in 1)
(nand3.out) |- (nand4.in 2)
%
(-1,0) node[left] () {$x_2$}
(-1,1) node[left] () {$x_1$}
(nand4.out) node[right] () {$y_9$}
%
;\end{circuitikz}
\end{longtable}
\end{document}
PS: Mir ist klar, dass das kein Minimalbeispiel ist. Ich wollte jedoch auch eine ähnlich Tabelle wie bei mir haben.
Vielen Dank schon einmal!
Hallo alle zusammen,
ich bin hier neu im Forum und habe auch schon gleich meine erste Frage und hoffe, dass mir diese auch jemand beantworten kann.
Ich habe eine lange Tabelle wie in der folgenden Art. Ich würde gerne alle Elemente vertikal zentrieren, sodass die Schrift der ersten Spalten mittig zentriert neben den mittig zentrierten circuitikz Zeichnungen steht. Kann mir jemand helfen?
Mit dem Befehl
[code]\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}[/code]
bin ich nicht zu einer Lösung gekommen.
Hier meine Tabelle:
[code]
\documentclass{scrartcl}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage[europeanresistors, europeanports, siunitx]{circuitikz}
\begin{document}
\begin{longtable}{c|c|c|c|c|c|l}
$x_1$ & 0 & 0 & 1 & 1 & Bezeich- & \multirow{2}*{Schaltbild}\\
$x_2$ & 0 & 1 & 0 & 1 & nung&\\\hline
$y_{7}$ & 0 & 1 & 1 & 0 & XOR &
\begin{circuitikz}
\draw(0,0) node[nand port] (nand1) {}
(2,0.5) node[nand port] (nand2) {}
(2,-0.5) node[nand port] (nand3) {}
(4,0) node[nand port] (nand4) {}
(-1.76,0.775) node[circ] (){}
(-1.76,-0.775) node[circ] (){}
(nand1.out) node[circ] (){}
%
(-2,0.775) -| (nand1.in 1)
(-2,-0.775) -| (nand1.in 2)
(-2,0.775) -| (nand2.in 1)
(-2,-0.775) -| (nand3.in 2)
(nand1.out) |- (nand2.in 2)
(nand1.out) |- (nand3.in 1)
(nand2.out) -| (nand4.in 1)
(nand3.out) -| (nand4.in 2)
%
(-2,0.775) node[left] () {$x_1$}
(-2,-0.775) node[left] () {$x_2$}
(nand4.out) node[right] () {$y_7$}
%
;\end{circuitikz}
\\\hline
$y_{8}$ & 0 & 1 & 1 & 1 & OR &
\begin{circuitikz}
\draw(1,0) node[nand port] (nand1) {}
(1,1) node[nand port] (nand2) {}
(3,0.5) node[nand port] (nand3) {}
(-0.76,0) node[circ] (){}
(-0.76,1) node[circ] (){}
%
(-1,0) -| (nand1.in 1)
(-1,0) -| (nand1.in 2)
(-1,1) -| (nand2.in 1)
(-1,1) -| (nand2.in 2)
%
(nand1.out) |- (nand3.in 2)
(nand2.out) |- (nand3.in 1)
%
(-1,0) node[left] () {$x_2$}
(-1,1) node[left] () {$x_1$}
(nand3.out) node[right] () {$y_8$}
%
;\end{circuitikz}
\\\hline
$y_{9}$ & 1 & 0 & 0 & 0 & NOR&
\begin{circuitikz}
\draw(1,0) node[nand port] (nand1) {}
(1,1) node[nand port] (nand2) {}
(3,0.5) node[nand port] (nand3) {}
(5,0.5) node[nand port] (nand4) {}
(-0.76,0) node[circ] (){}
(-0.76,1) node[circ] (){}
(nand3.out) node[circ] (){}
%
(-1,0) -| (nand1.in 1)
(-1,0) -| (nand1.in 2)
(-1,1) -| (nand2.in 1)
(-1,1) -| (nand2.in 2)
%
(nand1.out) |- (nand3.in 2)
(nand2.out) |- (nand3.in 1)
(nand3.out) |- (nand4.in 1)
(nand3.out) |- (nand4.in 2)
%
(-1,0) node[left] () {$x_2$}
(-1,1) node[left] () {$x_1$}
(nand4.out) node[right] () {$y_9$}
%
;\end{circuitikz}
\end{longtable}
\end{document}
[/code]
PS: Mir ist klar, dass das kein Minimalbeispiel ist. Ich wollte jedoch auch eine ähnlich Tabelle wie bei mir haben.
Vielen Dank schon einmal!