Seite 1 von 1

Align oder Tabular Umgebung?!

Verfasst: Fr 3. Mai 2013, 18:30
von Latexneuling
Ich denke mein Problem wird offensichtlich sobald man sich folgendes anschaut:

Ich möchte die allerletzte Tabelle also das "schriftliche Multiplizieren" genauso darstellen wie das addieren, aber da dort die Zeichen anders untereinander stehen müssen bereitet das Probleme und wenn ich es so habe wie jetzt ist das größenverhältnis irgendwie abstruß

$33_{10} = 100001_2$, $19_{10} = 10011_2$ \\
	\newline
	\begin{tabular}{ccc}
	
	\begin{tabular}{rrl}
	& 100001 & \\
	+ & 10011 & \\
	\cline{2-2}& 110100 & = 52	\\
	\end{tabular} 
	&
	\begin{tabular}{rrl}
	& 100001 & \\
	- & 10011 & \\
	\cline{2-2}& 1110 & = 14	\\
	\end{tabular}
	&
	\begin{tabular}{ccccccccccccc}
	1&0&0&0&0&1&*&1&0&0&1&1& \\ 
	\cline{1-12}&&1&0&0&0&0&1& \\
	&&&0&0&0&0&0&0& \\
	&&&&0&0&0&0&0&0& \\
	&&&&&1&0&0&0&0&1& \\
	&&&&&&1&0&0&0&0&1& \\
	\cline{3-12}&&1&0&0&1&1&1&0&0&1&1& = 627
	\end{tabular}
	\end{tabular}

Verfasst: Sa 4. Mai 2013, 22:11
von esdd
Hallo,

meinst du so:
\documentclass{scrartcl}

\begin{document}
$33_{10} = 100001_2$, $19_{10} = 10011_2$ \\[\baselineskip] 
    \begin{tabular}{ccc} 
     
    \begin{tabular}[t]{rrl} 
    & 100001 & \\ 
    + & 10011 & \\ 
    \cline{2-2}& 110100 & = 52   \\ 
    \end{tabular} 
    & 
    \begin{tabular}[t]{rrl} 
    & 100001 & \\ 
    - & 10011 & \\ 
    \cline{2-2}& 1110 & = 14   \\ 
    \end{tabular} 
    & 
    \begin{tabular}[t]{c*{11}{@{}c}c} 
    1&0&0&0&0&1&*&1&0&0&1&1& \\ 
    \cline{1-12}&&1&0&0&0&0&1& \\ 
    &&&0&0&0&0&0&0& \\ 
    &&&&0&0&0&0&0&0& \\ 
    &&&&&1&0&0&0&0&1& \\ 
    &&&&&&1&0&0&0&0&1& \\ 
    \cline{2-12}&&1&0&0&1&1&1&0&0&1&1& = 627 
    \end{tabular} 
    \end{tabular}
\end{document}
Gruß
Elke

Verfasst: Mo 6. Mai 2013, 11:11
von Latexneuling
Ja genau so=) :) Dankeschön

Verfasst: Mo 6. Mai 2013, 11:15
von Latexneuling
Kann mir dann nochmal kurz jemand erklären wie genau:
 c*{11}{@{}c}c 
das funktioniert, damit ichs beim nächsten mal selber kann?

Verfasst: Mo 6. Mai 2013, 14:13
von esdd
Hallo,

wenn mehrere gleiche Spaltentypen hintereinander folgen, dann kann man dies mit *{spaltenanzahl}{spaltentyp} abkürzen, also lässt sich z.B. ccccccccccc durch *{11}{c} abkürzen.

@{code} ersetzt den Spaltenabstand durch code. Mit @{} wird also der Spaltenabstand durch nichts ersetzt, sprich er wird entfernt.

c*{11}{@{}c}c erzeugt allso eine normale c Spalte mit Abstand davor, dann ohne Spaltenabstand 11 c Spalten und danach noch eine c Spalte mit Abstand davor und danach.

Gruß
Elke

Verfasst: Mo 6. Mai 2013, 14:28
von Latexneuling
Vielen dank für die Hilfe:)