Martin is right, you need to rewrite parts of the parser. It's not very difficult, however. The parser lives in tikz.code.tex. There's a macro called \tikz@cchar which processes all keywords starting with c. It contains nested \pgfutil@ifnextchar statements that act as a "select" expression: They look at the next letter in the keyword and call the corresponding macro.
Here's the original \tikz@cchar definition:
\def\tikz@cchar{%
\pgfutil@ifnextchar i{\tikz@circle}%
{\pgfutil@ifnextchar h{\tikz@children}{\tikz@cochar}}}%
If the character following a c is an i, TikZ assumes you mean the circle keyword. If it is an h, it assumes you want a child in a tree. If it is neither, TikZ assumes you want either a cosine or a coordinate, so it passes control on to the \tikz@cochar, which then decides in a similar manner which of the two keywords are present.
To make the parser recognise carc, we can redefine the \tikz@cchar macro like this:
\makeatletter
\def\tikz@cchar{% If keyword starts with "c..."
\pgfutil@ifnextchar i %... starts with "ci..."
{\tikz@circle}%
{\pgfutil@ifnextchar h% ... starts with "ch..."
{\tikz@children}
{\pgfutil@ifnextchar a % ... starts with "ca..."
{\carc}
\tikz@cochar
}
}
}%
The \carc macro needs to be redefined slightly. The syntax isn't \carc (#1:#2:#3), but rather \carc arc (#1:#2:#3), since the initial c is the entity that actually calls the macro, and the arc is still present in the macro argument. Also, we can't use TikZ commands directly in the code (PGF commands would work). TikZ commands can be used by wrapping them in \tikzset{insert path={<TikZ code>}}, which directly inserts the desired code. Finally, we need to tell the TikZ parser to go back to looking for keywords by issuing a \tikz@scan@next@command at the end of the \carc macro.
Here's a full example:
\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}
\makeatletter
\def\tikz@cchar{% If keyword starts with "c..."
\pgfutil@ifnextchar i %... starts with "ci..."
{\tikz@circle}%
{\pgfutil@ifnextchar h% ... starts with "ch..."
{\tikz@children}
{\pgfutil@ifnextchar a % ... starts with "ca..."
{\carc}
\tikz@cochar
}
}
}%
\def\carc arc (#1:#2:#3){% The macro will get called after the initial "c" of "carc" is already gobbled up, and only "arc" is left
\tikzset{insert path={++(#1:#3) arc(#1:#2:#3) ++(#2+180:#3)}}% Inject the TikZ commands
\tikz@scan@next@command% Return control to the parser
}
\makeatother
\begin{tikzpicture}%
\draw (0,0) carc (30:90:1) carc (30:90:2) carc (30:90:3);
\end{tikzpicture}%
\end{document}
tkz-euclide, which is built on TikZ. The centre needs to be a namedcoordinate/node. With\usepackage{tkz-euclide} \usetkzobj{arcs}in the preamble, and a node namedO, you can write\tkzDrawArc[R](O,2cm)(30,90)in atikzpictureto draw an arc with radius 2 cm from 30° to 90°. – Torbjørn T. Nov 15 '11 at 23:00