Graphics, Figures & TablesCommand already defined

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
krabby
Posts: 12
Joined: Tue Mar 20, 2012 9:38 pm

Command already defined

Post by krabby »

Hi,

I am having some troubles using the tabular wizard from kile. I did create a tabular with the wizard. But if i try to compile my document it says:

Code: Select all

Command \mc already defined. \newcommand{\mc}[3]{\multicolumn{#1}{#2}{#3}}
Any ideas? Here is the table :

Code: Select all

{%
\newcommand{\mc}[3]{\multicolumn{#1}{#2}{#3}}
\begin{center}
\begin{tabular}{llllll}
 & [h] & [mm] & [mm/h] & [ml/h] & [Tropfen/h]\\
Nr. & Dauer & Absenkung & Geschwindigkeit & \mc{2}{l}{Verdrängtes Volumen}\\\cline{1-6}
401 & 66 & 5.8 & 0.088 & 0.33 & 5.2\\
402 & 19 & 5.8 & 0.31 & 1.15 & 18.0\\
403 & 24 & 1.8 & 0.075 & 0.28 & 4.4\\
404 & 24 & 2.8 & 0.12 & 0.44 & 6.9\\
405 & 24 & 2.4 & 0.1 & 0.38 & 5.9\\
406 & 1 & x & x & x & x\\
407 & 1 & x & x & x & x\\
408 & 1 & x & x & x & x\\
409 & 1 & x & x & x & x\\
410 & 1 & x & x & x & x\\
411 & 1 & x & x & x & x\\
412 & 1 & x & x & x & x\\
413 & 1 & x & x & x & x\\
414 & 1 & x & x & x & x\\
415 & 1 & x & x & x & x\\
416 & 1 & x & x & x & x\\
417 & 1 & x & x & x & x\\
418 & 1 & x & x & x & x\\
419 & 1 & x & x & x & x\\
420 & 1 & x & x & x & x
\end{tabular}
\end{center}
}%
Thank you!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
tom
Posts: 73
Joined: Thu Apr 18, 2013 4:02 am

Command already defined

Post by tom »

Hi krabby!

This line causes the error and is nothing more than a shortcut saving some typing:

Code: Select all

\newcommand{\mc}[3]{\multicolumn{#1}{#2}{#3}}
Two possibilities:
  • The command \mc is defined by a package you load
  • You used the wizard for multiple tables and the command definition is produced more than once.
In the latter case just delete subsequent command definitions.
Post Reply