0

I was trying to put arrows on some lines using the TikZ package and the information of this website https://tikz.dev/tutorial#sec-2.17, where it's using the command [>=Stealth] to abbreviate the code, but for some reason it's not working on my Overleaf document. I have identified the problem, it seems like the command \usepackage[spanish]{babel} is messing with the arrows somehow, but I don't know why.

Here's the code

\documentclass{article}

%\usepackage[spanish]{babel} \usepackage{tikz}

\begin{document} \usetikzlibrary{intersections} \usetikzlibrary{arrows.meta} \begin{tikzpicture}[>=Stealth][scale=3] \draw [->] (-0.5,0) -- (1.5,0); \draw [->] (0,-0.5) -- (0,1.5); \draw [<<-,very thick] (0.3,0.3) -- (1.2,1.2); \end{tikzpicture} \end{document}

with the command \usepackage[spanish]{babel} muted so it doesn't mess with the diagram, which is below.enter image description here

Davizon
  • 45
  • 1
    Add \usetikzlibrary{babel} to the preamble of your document (after \usepackage{tikz}), and move \usetikzlibrary{intersections} \usetikzlibrary{arrows.meta} before \begin{document}. –  Jul 01 '23 at 23:33
  • It works, thank you, but do I have to put the commands always before \begin{document} like now? and is there a way to put the [spanish] option like before? – Davizon Jul 01 '23 at 23:39
  • Yes, you have to load the libraries before \begin{document}. And I am not sure if \usetikzlibrary{babel} has separate options for different languages. Rather, I think that this library works for all languages alike. –  Jul 01 '23 at 23:43
  • Ok, thank you very much :) – Davizon Jul 01 '23 at 23:45

0 Answers0