von Stimpy6 » Do 28. Mai 2015, 09:38
Hallo an die Experten,
mir wurde hier in diesem Forum eine superschöne Tabelle (im Beispiel Tabelle 1) erstellt. Nun will ich die in meine Arbeit einfügen, aber es kommt eine Fehlermeldung "Command \mcb already defined". Der Grund ist wahrscheinlich, dass ich so eine ähnliche Tabelle (Tabelle 2 im Beispiel) davor schon erstellt habe.
Was muss ich tun, damit ich die beiden Tabellen in umgekehrter Reihenfolge in die Arbeit einfügen kann?
\documentclass[12pt,a4paper,pointednumbers,parindent]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{float}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{upquote}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{amsmath,amsthm}
\usepackage{tabulary}
\usepackage{longtable}
\usepackage{arydshln}
\addtokomafont{captionlabel}{\bfseries}
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{blindtext}
\usepackage[absolute]{textpos}
\renewcommand{\footnotesep}{1.5em}
\begin {document}
\begin{table}[htb]
\newcommand\mcb[1]{\multicolumn{2}{c}{\bfseries#1}}
\newcommand\mcc[1]{\multicolumn{2}{C{\dimexpr6em+2\tabcolsep\relax}}{\bfseries#1}}
\captionabove{ Mean preference and standard deviation of the Codes 1 and 2
in every examined condition.}
\begin{tabular}{l*{8}{C{3em}}}
\toprule
& \mcb{Condition I} & \mcb{Conditon II} & \mcb{Condition III} & \mcb{Condition III} \\
& \mcc{Positive paraphrases} & \mcc{Negative paraphrases}
& \mcc{Positive paraphrases} & \mcc{Negative paraphrases} \\
& \textbf{M} & SD & \textbf{M} & SD & \textbf{M} & SD & \textbf{M} & SD \\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}\cmidrule(lr){8-9}
\textbf{Code 1} & 2,6 & 1,3 & 2,9 & 1,4 & 3,2 & 1,3 & 3,5 & 1,3 \\
\textbf{Code 2} & 2,2 & 1,2 & 2,6 & 1,4 & 2,7 & 1,2 & 3,4 & 1,2 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
% Die Tabelle, die ich davor habe sieht so aus:
\begin {document}
\newcommand\mcb[1]{\multicolumn{2}{c}{\bfseries#1}}
\begin{table}[htb]
\noindent \textbf{Example 5}: Counting of the \textit{contentual units} in the story 'A dog' (For better visualization, one \textit{contentual unit} is printed in plain type, another unit in italic type.)
\vspace*{5mm}
\begin{tabular}{p{.4cm}p{12cm}l}
\toprule
& \textbf{Type of participants' replies} & \textbf{Units} \\
\midrule
\textbf{5.1} & Michael can stay over.\textit{He can look forward to playing with the dog.}& 2 \\
\textbf{5.2} & Thomas would be thrilled if Michael stayed over and \textit{he wants to make his stay even more pleasurable by mentioning the fact that he has a dog now} & 2 \\
\textbf{5.3} & Yes, Michael can spend the night at Thomas's place. & 1 \\
\textbf{5.4} & Thomas has no time for Michael anymore because he has to take care of his dog & 1 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Für alle Vorschläge bin ich sehr dankbar!
Viele Grüße,
Karin
Hallo an die Experten,
mir wurde hier in diesem Forum eine superschöne Tabelle (im Beispiel Tabelle 1) erstellt. Nun will ich die in meine Arbeit einfügen, aber es kommt eine Fehlermeldung "Command \mcb already defined". Der Grund ist wahrscheinlich, dass ich so eine ähnliche Tabelle (Tabelle 2 im Beispiel) davor schon erstellt habe.
Was muss ich tun, damit ich die beiden Tabellen in umgekehrter Reihenfolge in die Arbeit einfügen kann?
[code]
\documentclass[12pt,a4paper,pointednumbers,parindent]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{float}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{upquote}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{amsmath,amsthm}
\usepackage{tabulary}
\usepackage{longtable}
\usepackage{arydshln}
\addtokomafont{captionlabel}{\bfseries}
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{blindtext}
\usepackage[absolute]{textpos}
\renewcommand{\footnotesep}{1.5em}
\begin {document}
\begin{table}[htb]
\newcommand\mcb[1]{\multicolumn{2}{c}{\bfseries#1}}
\newcommand\mcc[1]{\multicolumn{2}{C{\dimexpr6em+2\tabcolsep\relax}}{\bfseries#1}}
\captionabove{ Mean preference and standard deviation of the Codes 1 and 2
in every examined condition.}
\begin{tabular}{l*{8}{C{3em}}}
\toprule
& \mcb{Condition I} & \mcb{Conditon II} & \mcb{Condition III} & \mcb{Condition III} \\
& \mcc{Positive paraphrases} & \mcc{Negative paraphrases}
& \mcc{Positive paraphrases} & \mcc{Negative paraphrases} \\
& \textbf{M} & SD & \textbf{M} & SD & \textbf{M} & SD & \textbf{M} & SD \\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}\cmidrule(lr){8-9}
\textbf{Code 1} & 2,6 & 1,3 & 2,9 & 1,4 & 3,2 & 1,3 & 3,5 & 1,3 \\
\textbf{Code 2} & 2,2 & 1,2 & 2,6 & 1,4 & 2,7 & 1,2 & 3,4 & 1,2 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
% Die Tabelle, die ich davor habe sieht so aus:
\begin {document}
\newcommand\mcb[1]{\multicolumn{2}{c}{\bfseries#1}}
\begin{table}[htb]
\noindent \textbf{Example 5}: Counting of the \textit{contentual units} in the story 'A dog' (For better visualization, one \textit{contentual unit} is printed in plain type, another unit in italic type.)
\vspace*{5mm}
\begin{tabular}{p{.4cm}p{12cm}l}
\toprule
& \textbf{Type of participants' replies} & \textbf{Units} \\
\midrule
\textbf{5.1} & Michael can stay over.\textit{He can look forward to playing with the dog.}& 2 \\
\textbf{5.2} & Thomas would be thrilled if Michael stayed over and \textit{he wants to make his stay even more pleasurable by mentioning the fact that he has a dog now} & 2 \\
\textbf{5.3} & Yes, Michael can spend the night at Thomas's place. & 1 \\
\textbf{5.4} & Thomas has no time for Michael anymore because he has to take care of his dog & 1 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
[/code]
Für alle Vorschläge bin ich sehr dankbar!
Viele Grüße,
Karin