In my preamble, you'll find:

\usepackage[breaklinks,colorlinks=true,linkcolor=red,citecolor=red, urlcolor=blue]{hyperref}
\usepackage[breakable, theorems, skins]{tcolorbox,empheq}
\usetikzlibrary{matrix,arrows, positioning,shadows,shadings,backgrounds,calc, shapes, tikzmark}

I'm trying to draw an arrow for X axis and Y axis.

\draw[yellow!10, fill=blue!5](-1, -1) rectangle (7, 5);
\draw[dotted] (-0.75,-0.75) grid (6.75,4.75);
\node[below] at (-0.25,0){$O$};
\draw[->,black, thick] (-0.75,0)--(6.75,0);

But I get this error:

enter image description here

Additionally, if I remove -> from the options of \draw the tikz picture compiles normally.

  • 4
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – jub0bs Sep 18 '14 at 16:33
  • 1
    Particularly important is showing what language(s) you're loading with babel. Have you tried adding \usetikzlibrary{babel}? Spanish, I guess. – egreg Sep 18 '14 at 16:36
  • I didn't have that command \usetikzlibrary{babel}. I was compiling with this code before (but on beamer) and now switched to LaTeX, it appeared. Strange – hkviktor Sep 18 '14 at 16:40
  • 1
    What do you mean by on beamer? Beamer is a special LaTeX class. – user31729 Sep 18 '14 at 17:03
  • 2
    Please reduce your preamble to the packages needed to reproduce the error. Also, I would recommend eliminating packages you do not need and replacing deprecated ones. (times is deprecated. You do not need all of the font packages you are using e.g. lmodern, times, tgheros, tgtermes, tgcursor, gillius. These are just overwriting each others' settings.) – cfr Sep 18 '14 at 17:18

You need to

  1. load tikz after babel

  2. load \usetikzlibrary{babel} after \usepackage{tikz}

  3. (optional, but recommended) prune off several packages from your preamble, leaving only what's really necessary for your document

Note that the arcs package has very severe bugs.

  • I loaded them this way: first \usepackage{tikz} and then \usetikzlibrary{babel} and worked fine for me. Additionally, arcs isn't in use right now. I keeped by mistake, because I have another way to create arcs. – hkviktor Sep 18 '14 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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