TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to define new arrows to use in a commutative diagram, but I just can't make it work. The documentation is not particularly helpful; it doesn't even tell you where to put the


bit for example. Even when TeX stops complaining about how I've defined the arrow, it won't use it; the undefined control sequence error comes up whenever I try and use the arrow. The error message suggests using the PostScript Option, but that also doesn't work. Any ideas?

(For now, I'll try and use a different diagrams tool, but I'd really like to know how to get this to work.) Any help would be much appreciated.

Edit: After doing what Stefan's answer suggested, I'm now trying

(other packages)
(other pramle etc)
A & \rDots & B

which works (in so much as TeX now produces the desired diagrams), but now it says:

LaTeX Error: missing \begin{document} ... \newarrow{Dots}{-} ...{-}

So presumably is has a problem with the arrowhead being a -? How to fix that?

(I'm trying to get an arrow looking something like - \cdots - to intidacate an infinite line (currently it just looks like \cdots, but that's fine I suppose).

share|improve this question
Welcome to {TeX}! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). – Stefan Kottwitz Mar 14 '11 at 18:17
Here's a link to the package: ctan.org/tex-archive/macros/generic/diagrams/taylor – Hendrik Vogt Mar 14 '11 at 18:17
The command works fine for me - you can put it everywhere as long as you declare the arrow before you use it in a diagram. I suspect it's a very specific problem - which programs do you use in order to compile your input file (latex,pdflatex,dvips,...)? – diabonas Mar 14 '11 at 19:04
The problem is caused by \newarrowhead and \newarrowtail. It seems that they take hidden arguments, such as \newarrowhead{triangle}\rhtriangle\lhtriangle\dhtriangle\uhtriangle. I would not use a package with unusual syntax and incomplete documentation. – Stefan Kottwitz Mar 14 '11 at 20:46
Right, I'll just use \newarrow{Dots}{.}{.}{.}{.}{.} – David K Mar 14 '11 at 21:27
up vote 1 down vote accepted

Here's a minimal example. It defines an arrow called SuperArrow. It uses the arrow to the right by putting \r right before the arrow name.

Global definitions should be done in the preamble, after the required package.

$A \rTo^{\text{ very long arrow }} B$

$A \rSuperArrow^{\text{ very long arrow }} B$

enter image description here

Note: you should correctly install the package. It's published as diagrams.tex, download it, save it into your texmf tree or besides your document and load it by \input{diagrams}, or rename it to diagrams.sty and load it by \usepackage{diagrams}.

share|improve this answer
Thanks very much. Your example certainly works, but when I put my arrow definition after \usepackage{diagrams}, TeX complains that \begin{document} is missing (even though it still produces the arrow as I'd like it to). @diabonas: I'm using pdflatex. – David K Mar 14 '11 at 19:28
@user4190: your comment is incomplete, perhaps you pressed the enter key too early. You could edit it or post a new comment. – Stefan Kottwitz Mar 14 '11 at 19:29
(yes, I just wanted to start a new line - shift + enter?) – David K Mar 14 '11 at 19:32
@David K: you could edit your question to add a minimal example, like I did in my answer, that illustrates your problem. – Stefan Kottwitz Mar 14 '11 at 19:40
Kottwitz: I have edited my original question as requested. – David K Mar 14 '11 at 20:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.