Problem with babel and tikz using draw











up vote
33
down vote

favorite
11












I'm trying the next code:



documentclass[pdftex,spanish]{article}
usepackage{babel}
usepackage{tikz}

begin{document}

Simple arrow:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

end{document}


but it doesn't work. It throws the errors:




  • ! Argument of language@active@arg> has an extra }.

  • ! Paragraph ended before language@active@arg> was complete.<to be read again>par draw[->]


What can I do if it works right without the babel package?










share|improve this question
























  • It seems that usepackage[english]{babel} works, but usepackage[spanish]{babel} does not. Also, not sure why you have [pdftex,spanish] options for documentclass - FYI, I am not that familiar with babel.
    – Peter Grill
    Mar 20 '14 at 23:08












  • Add shorthandoff{>}shorthandoff{<} after begin{document}. < and > are active characters in Spanish.
    – Malipivo
    Mar 20 '14 at 23:13










  • @PeterGrill using the pdftex option is not necessary with modern LaTeX systems (the driver is automatically detected). Using the idiomatic localization (spanish, in this case) as class option has the advantage that all language-sensitive packages (for example, babel, cleveref) that can eventually be loaded will pick it and produce the idiomatic localizations.
    – Gonzalo Medina
    Mar 20 '14 at 23:49






  • 1




    @Mario I've updated my answer with new information that might be of interest for you.
    – Gonzalo Medina
    Mar 21 '14 at 12:27










  • Neatly done with babel library, thanks @GonzaloMedina.
    – Mario
    Mar 24 '14 at 23:44















up vote
33
down vote

favorite
11












I'm trying the next code:



documentclass[pdftex,spanish]{article}
usepackage{babel}
usepackage{tikz}

begin{document}

Simple arrow:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

end{document}


but it doesn't work. It throws the errors:




  • ! Argument of language@active@arg> has an extra }.

  • ! Paragraph ended before language@active@arg> was complete.<to be read again>par draw[->]


What can I do if it works right without the babel package?










share|improve this question
























  • It seems that usepackage[english]{babel} works, but usepackage[spanish]{babel} does not. Also, not sure why you have [pdftex,spanish] options for documentclass - FYI, I am not that familiar with babel.
    – Peter Grill
    Mar 20 '14 at 23:08












  • Add shorthandoff{>}shorthandoff{<} after begin{document}. < and > are active characters in Spanish.
    – Malipivo
    Mar 20 '14 at 23:13










  • @PeterGrill using the pdftex option is not necessary with modern LaTeX systems (the driver is automatically detected). Using the idiomatic localization (spanish, in this case) as class option has the advantage that all language-sensitive packages (for example, babel, cleveref) that can eventually be loaded will pick it and produce the idiomatic localizations.
    – Gonzalo Medina
    Mar 20 '14 at 23:49






  • 1




    @Mario I've updated my answer with new information that might be of interest for you.
    – Gonzalo Medina
    Mar 21 '14 at 12:27










  • Neatly done with babel library, thanks @GonzaloMedina.
    – Mario
    Mar 24 '14 at 23:44













up vote
33
down vote

favorite
11









up vote
33
down vote

favorite
11






11





I'm trying the next code:



documentclass[pdftex,spanish]{article}
usepackage{babel}
usepackage{tikz}

begin{document}

Simple arrow:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

end{document}


but it doesn't work. It throws the errors:




  • ! Argument of language@active@arg> has an extra }.

  • ! Paragraph ended before language@active@arg> was complete.<to be read again>par draw[->]


What can I do if it works right without the babel package?










share|improve this question















I'm trying the next code:



documentclass[pdftex,spanish]{article}
usepackage{babel}
usepackage{tikz}

begin{document}

Simple arrow:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

end{document}


but it doesn't work. It throws the errors:




  • ! Argument of language@active@arg> has an extra }.

  • ! Paragraph ended before language@active@arg> was complete.<to be read again>par draw[->]


What can I do if it works right without the babel package?







tikz-pgf babel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 '14 at 15:20









Martin Schröder

12.7k638120




12.7k638120










asked Mar 20 '14 at 23:04









Mario

325139




325139












  • It seems that usepackage[english]{babel} works, but usepackage[spanish]{babel} does not. Also, not sure why you have [pdftex,spanish] options for documentclass - FYI, I am not that familiar with babel.
    – Peter Grill
    Mar 20 '14 at 23:08












  • Add shorthandoff{>}shorthandoff{<} after begin{document}. < and > are active characters in Spanish.
    – Malipivo
    Mar 20 '14 at 23:13










  • @PeterGrill using the pdftex option is not necessary with modern LaTeX systems (the driver is automatically detected). Using the idiomatic localization (spanish, in this case) as class option has the advantage that all language-sensitive packages (for example, babel, cleveref) that can eventually be loaded will pick it and produce the idiomatic localizations.
    – Gonzalo Medina
    Mar 20 '14 at 23:49






  • 1




    @Mario I've updated my answer with new information that might be of interest for you.
    – Gonzalo Medina
    Mar 21 '14 at 12:27










  • Neatly done with babel library, thanks @GonzaloMedina.
    – Mario
    Mar 24 '14 at 23:44


















  • It seems that usepackage[english]{babel} works, but usepackage[spanish]{babel} does not. Also, not sure why you have [pdftex,spanish] options for documentclass - FYI, I am not that familiar with babel.
    – Peter Grill
    Mar 20 '14 at 23:08












  • Add shorthandoff{>}shorthandoff{<} after begin{document}. < and > are active characters in Spanish.
    – Malipivo
    Mar 20 '14 at 23:13










  • @PeterGrill using the pdftex option is not necessary with modern LaTeX systems (the driver is automatically detected). Using the idiomatic localization (spanish, in this case) as class option has the advantage that all language-sensitive packages (for example, babel, cleveref) that can eventually be loaded will pick it and produce the idiomatic localizations.
    – Gonzalo Medina
    Mar 20 '14 at 23:49






  • 1




    @Mario I've updated my answer with new information that might be of interest for you.
    – Gonzalo Medina
    Mar 21 '14 at 12:27










  • Neatly done with babel library, thanks @GonzaloMedina.
    – Mario
    Mar 24 '14 at 23:44
















It seems that usepackage[english]{babel} works, but usepackage[spanish]{babel} does not. Also, not sure why you have [pdftex,spanish] options for documentclass - FYI, I am not that familiar with babel.
– Peter Grill
Mar 20 '14 at 23:08






It seems that usepackage[english]{babel} works, but usepackage[spanish]{babel} does not. Also, not sure why you have [pdftex,spanish] options for documentclass - FYI, I am not that familiar with babel.
– Peter Grill
Mar 20 '14 at 23:08














Add shorthandoff{>}shorthandoff{<} after begin{document}. < and > are active characters in Spanish.
– Malipivo
Mar 20 '14 at 23:13




Add shorthandoff{>}shorthandoff{<} after begin{document}. < and > are active characters in Spanish.
– Malipivo
Mar 20 '14 at 23:13












@PeterGrill using the pdftex option is not necessary with modern LaTeX systems (the driver is automatically detected). Using the idiomatic localization (spanish, in this case) as class option has the advantage that all language-sensitive packages (for example, babel, cleveref) that can eventually be loaded will pick it and produce the idiomatic localizations.
– Gonzalo Medina
Mar 20 '14 at 23:49




@PeterGrill using the pdftex option is not necessary with modern LaTeX systems (the driver is automatically detected). Using the idiomatic localization (spanish, in this case) as class option has the advantage that all language-sensitive packages (for example, babel, cleveref) that can eventually be loaded will pick it and produce the idiomatic localizations.
– Gonzalo Medina
Mar 20 '14 at 23:49




1




1




@Mario I've updated my answer with new information that might be of interest for you.
– Gonzalo Medina
Mar 21 '14 at 12:27




@Mario I've updated my answer with new information that might be of interest for you.
– Gonzalo Medina
Mar 21 '14 at 12:27












Neatly done with babel library, thanks @GonzaloMedina.
– Mario
Mar 24 '14 at 23:44




Neatly done with babel library, thanks @GonzaloMedina.
– Mario
Mar 24 '14 at 23:44










4 Answers
4






active

oldest

votes

















up vote
50
down vote



accepted










The problem is that the spanish module for babel makes > and < active characters for its special management of Spanish quotations.



Update:



With PGF/TikZ version 3.0.0 there's a babel library that solves the problems produced by changes to category codes made by some babel modules, so it's enough to load the library:



documentclass[spanish]{article}
usepackage{babel}
usepackage{tikz}
usetikzlibrary{babel}

begin{document}

Simple arrows:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

tikzdraw[->] (-1.5,0) -- (1.5,0);

end{document}


(Thanks to Claudio Fiandrino for pointing this out in his comment).



PGF/TikZ version 2.10



To deactivate the undesired redefinition for tikzpictures, but maintaining it for other parts of the document, you can use



  execute at begin picture={deactivatequoting},
execute at end picture={activatequoting}


for every tikzpicture. Notice that this approach has two advantages:




  1. No extra packages are required.


  2. It also produces the desired result when using the command version tikz (see example code below).



The code:



documentclass[spanish]{article}
usepackage{babel}
usepackage{tikz}

tikzset{
every picture/.append style={
execute at begin picture={deactivatequoting},
execute at end picture={activatequoting}
}
}
begin{document}

Simple arrows:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

tikzdraw[->] (-1.5,0) -- (1.5,0);

end{document}


enter image description here



As a side note, don't use pdftex option; modern LaTeX systems detect the driver automatically.






share|improve this answer



















  • 1




    With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
    – Claudio Fiandrino
    Mar 21 '14 at 6:19










  • @ClaudioFiandrino Ah, that's very useful information, thank you! I updated my answer accordingly.
    – Gonzalo Medina
    Mar 21 '14 at 12:26










  • Personally, I think it is one the major features introduced in version 3 in terms of utility (for my own purposes of course).
    – Claudio Fiandrino
    Mar 21 '14 at 13:51










  • @ClaudioFiandrino I agree. Not having to introduce special fixes for (some of) the babel modules is a great advantage.
    – Gonzalo Medina
    Mar 21 '14 at 19:26










  • it works also for czech babel. Thanks
    – jafan
    Sep 26 '16 at 6:08


















up vote
8
down vote













As noted by Malipivo, the spanish option of babel makes > active. You can make it inactive just inside (all) the tikzpicture environment locally, Add these in your preamble:



usepackage{etoolbox}
AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}


Full code:



documentclass{article}
usepackage[spanish]{babel}
usepackage{tikz}
usepackage{etoolbox}
AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}

begin{document}

Simple arrow:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

end{document}


enter image description here






share|improve this answer





















  • With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
    – Claudio Fiandrino
    Mar 21 '14 at 6:20










  • @ClaudioFiandrino --- the problem with the usetikzpackage{babel} is that it will not work if the tikzpicture is inside an ifthenelse{}{}{} block --- is there a solution for this?
    – Rmano
    Jun 15 '16 at 12:57












  • @Rmano: Actually, I don't know. It would be great if you can post a separate question for this: it will get more attention.
    – Claudio Fiandrino
    Jun 15 '16 at 13:02






  • 1




    @ClaudioFiandrino done, tex.stackexchange.com/questions/314884/…
    – Rmano
    Jun 15 '16 at 13:16


















up vote
8
down vote













If you don't need to use spanish quotes, just add es-noquoting to babel options and TiKZ arrows will appear again.



documentclass[pdftex,spanish]{article}
usepackage[es-noquoting]{babel}
usepackage{tikz}

begin{document}

Simple arrow:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0);
end{tikzpicture}

end{document}


enter image description here



If you need spanish quotes use new babel TiKZ 3.0 library (as Claudio suggested). Here you have an example:



documentclass[pdftex,spanish]{article}
usepackage{babel}
usepackage{tikz}
usetikzlibrary{babel}

begin{document}

Simple arrow:

begin{tikzpicture}
draw[->] (-1.5,0) -- (1.5,0) node[right] {<<Hola>>};
end{tikzpicture}

<<Hola>>
end{document}


enter image description here






share|improve this answer






























    up vote
    1
    down vote













    I do not know why, but none of the previous answers has worked for me. They showed me the right path though; adding just



    deactivatequoting


    on the preambled fixed the problem.



    Calling babel with english as well as spanish does the trick, too



    usepackage[spanish,english]{babel} 





    share|improve this answer

















    • 4




      It is quite normal that calling babel with the english option placed after the spanish one does the trick: it means that the english settings of Babel apply by default, and in that case there is no bug. But most of the time, having their documents typeset with English conventions is not what people want when they write in Spanish :-)
      – Franck Pastor
      Apr 7 '15 at 10:38











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f166772%2fproblem-with-babel-and-tikz-using-draw%23new-answer', 'question_page');
    }
    );

    Post as a guest
































    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    50
    down vote



    accepted










    The problem is that the spanish module for babel makes > and < active characters for its special management of Spanish quotations.



    Update:



    With PGF/TikZ version 3.0.0 there's a babel library that solves the problems produced by changes to category codes made by some babel modules, so it's enough to load the library:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}
    usetikzlibrary{babel}

    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    (Thanks to Claudio Fiandrino for pointing this out in his comment).



    PGF/TikZ version 2.10



    To deactivate the undesired redefinition for tikzpictures, but maintaining it for other parts of the document, you can use



      execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}


    for every tikzpicture. Notice that this approach has two advantages:




    1. No extra packages are required.


    2. It also produces the desired result when using the command version tikz (see example code below).



    The code:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}

    tikzset{
    every picture/.append style={
    execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}
    }
    }
    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    enter image description here



    As a side note, don't use pdftex option; modern LaTeX systems detect the driver automatically.






    share|improve this answer



















    • 1




      With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:19










    • @ClaudioFiandrino Ah, that's very useful information, thank you! I updated my answer accordingly.
      – Gonzalo Medina
      Mar 21 '14 at 12:26










    • Personally, I think it is one the major features introduced in version 3 in terms of utility (for my own purposes of course).
      – Claudio Fiandrino
      Mar 21 '14 at 13:51










    • @ClaudioFiandrino I agree. Not having to introduce special fixes for (some of) the babel modules is a great advantage.
      – Gonzalo Medina
      Mar 21 '14 at 19:26










    • it works also for czech babel. Thanks
      – jafan
      Sep 26 '16 at 6:08















    up vote
    50
    down vote



    accepted










    The problem is that the spanish module for babel makes > and < active characters for its special management of Spanish quotations.



    Update:



    With PGF/TikZ version 3.0.0 there's a babel library that solves the problems produced by changes to category codes made by some babel modules, so it's enough to load the library:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}
    usetikzlibrary{babel}

    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    (Thanks to Claudio Fiandrino for pointing this out in his comment).



    PGF/TikZ version 2.10



    To deactivate the undesired redefinition for tikzpictures, but maintaining it for other parts of the document, you can use



      execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}


    for every tikzpicture. Notice that this approach has two advantages:




    1. No extra packages are required.


    2. It also produces the desired result when using the command version tikz (see example code below).



    The code:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}

    tikzset{
    every picture/.append style={
    execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}
    }
    }
    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    enter image description here



    As a side note, don't use pdftex option; modern LaTeX systems detect the driver automatically.






    share|improve this answer



















    • 1




      With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:19










    • @ClaudioFiandrino Ah, that's very useful information, thank you! I updated my answer accordingly.
      – Gonzalo Medina
      Mar 21 '14 at 12:26










    • Personally, I think it is one the major features introduced in version 3 in terms of utility (for my own purposes of course).
      – Claudio Fiandrino
      Mar 21 '14 at 13:51










    • @ClaudioFiandrino I agree. Not having to introduce special fixes for (some of) the babel modules is a great advantage.
      – Gonzalo Medina
      Mar 21 '14 at 19:26










    • it works also for czech babel. Thanks
      – jafan
      Sep 26 '16 at 6:08













    up vote
    50
    down vote



    accepted







    up vote
    50
    down vote



    accepted






    The problem is that the spanish module for babel makes > and < active characters for its special management of Spanish quotations.



    Update:



    With PGF/TikZ version 3.0.0 there's a babel library that solves the problems produced by changes to category codes made by some babel modules, so it's enough to load the library:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}
    usetikzlibrary{babel}

    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    (Thanks to Claudio Fiandrino for pointing this out in his comment).



    PGF/TikZ version 2.10



    To deactivate the undesired redefinition for tikzpictures, but maintaining it for other parts of the document, you can use



      execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}


    for every tikzpicture. Notice that this approach has two advantages:




    1. No extra packages are required.


    2. It also produces the desired result when using the command version tikz (see example code below).



    The code:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}

    tikzset{
    every picture/.append style={
    execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}
    }
    }
    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    enter image description here



    As a side note, don't use pdftex option; modern LaTeX systems detect the driver automatically.






    share|improve this answer














    The problem is that the spanish module for babel makes > and < active characters for its special management of Spanish quotations.



    Update:



    With PGF/TikZ version 3.0.0 there's a babel library that solves the problems produced by changes to category codes made by some babel modules, so it's enough to load the library:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}
    usetikzlibrary{babel}

    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    (Thanks to Claudio Fiandrino for pointing this out in his comment).



    PGF/TikZ version 2.10



    To deactivate the undesired redefinition for tikzpictures, but maintaining it for other parts of the document, you can use



      execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}


    for every tikzpicture. Notice that this approach has two advantages:




    1. No extra packages are required.


    2. It also produces the desired result when using the command version tikz (see example code below).



    The code:



    documentclass[spanish]{article}
    usepackage{babel}
    usepackage{tikz}

    tikzset{
    every picture/.append style={
    execute at begin picture={deactivatequoting},
    execute at end picture={activatequoting}
    }
    }
    begin{document}

    Simple arrows:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    tikzdraw[->] (-1.5,0) -- (1.5,0);

    end{document}


    enter image description here



    As a side note, don't use pdftex option; modern LaTeX systems detect the driver automatically.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:35









    Community

    1




    1










    answered Mar 20 '14 at 23:24









    Gonzalo Medina

    391k4012841554




    391k4012841554








    • 1




      With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:19










    • @ClaudioFiandrino Ah, that's very useful information, thank you! I updated my answer accordingly.
      – Gonzalo Medina
      Mar 21 '14 at 12:26










    • Personally, I think it is one the major features introduced in version 3 in terms of utility (for my own purposes of course).
      – Claudio Fiandrino
      Mar 21 '14 at 13:51










    • @ClaudioFiandrino I agree. Not having to introduce special fixes for (some of) the babel modules is a great advantage.
      – Gonzalo Medina
      Mar 21 '14 at 19:26










    • it works also for czech babel. Thanks
      – jafan
      Sep 26 '16 at 6:08














    • 1




      With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:19










    • @ClaudioFiandrino Ah, that's very useful information, thank you! I updated my answer accordingly.
      – Gonzalo Medina
      Mar 21 '14 at 12:26










    • Personally, I think it is one the major features introduced in version 3 in terms of utility (for my own purposes of course).
      – Claudio Fiandrino
      Mar 21 '14 at 13:51










    • @ClaudioFiandrino I agree. Not having to introduce special fixes for (some of) the babel modules is a great advantage.
      – Gonzalo Medina
      Mar 21 '14 at 19:26










    • it works also for czech babel. Thanks
      – jafan
      Sep 26 '16 at 6:08








    1




    1




    With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
    – Claudio Fiandrino
    Mar 21 '14 at 6:19




    With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
    – Claudio Fiandrino
    Mar 21 '14 at 6:19












    @ClaudioFiandrino Ah, that's very useful information, thank you! I updated my answer accordingly.
    – Gonzalo Medina
    Mar 21 '14 at 12:26




    @ClaudioFiandrino Ah, that's very useful information, thank you! I updated my answer accordingly.
    – Gonzalo Medina
    Mar 21 '14 at 12:26












    Personally, I think it is one the major features introduced in version 3 in terms of utility (for my own purposes of course).
    – Claudio Fiandrino
    Mar 21 '14 at 13:51




    Personally, I think it is one the major features introduced in version 3 in terms of utility (for my own purposes of course).
    – Claudio Fiandrino
    Mar 21 '14 at 13:51












    @ClaudioFiandrino I agree. Not having to introduce special fixes for (some of) the babel modules is a great advantage.
    – Gonzalo Medina
    Mar 21 '14 at 19:26




    @ClaudioFiandrino I agree. Not having to introduce special fixes for (some of) the babel modules is a great advantage.
    – Gonzalo Medina
    Mar 21 '14 at 19:26












    it works also for czech babel. Thanks
    – jafan
    Sep 26 '16 at 6:08




    it works also for czech babel. Thanks
    – jafan
    Sep 26 '16 at 6:08










    up vote
    8
    down vote













    As noted by Malipivo, the spanish option of babel makes > active. You can make it inactive just inside (all) the tikzpicture environment locally, Add these in your preamble:



    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}


    Full code:



    documentclass{article}
    usepackage[spanish]{babel}
    usepackage{tikz}
    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}

    begin{document}

    Simple arrow:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    end{document}


    enter image description here






    share|improve this answer





















    • With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:20










    • @ClaudioFiandrino --- the problem with the usetikzpackage{babel} is that it will not work if the tikzpicture is inside an ifthenelse{}{}{} block --- is there a solution for this?
      – Rmano
      Jun 15 '16 at 12:57












    • @Rmano: Actually, I don't know. It would be great if you can post a separate question for this: it will get more attention.
      – Claudio Fiandrino
      Jun 15 '16 at 13:02






    • 1




      @ClaudioFiandrino done, tex.stackexchange.com/questions/314884/…
      – Rmano
      Jun 15 '16 at 13:16















    up vote
    8
    down vote













    As noted by Malipivo, the spanish option of babel makes > active. You can make it inactive just inside (all) the tikzpicture environment locally, Add these in your preamble:



    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}


    Full code:



    documentclass{article}
    usepackage[spanish]{babel}
    usepackage{tikz}
    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}

    begin{document}

    Simple arrow:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    end{document}


    enter image description here






    share|improve this answer





















    • With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:20










    • @ClaudioFiandrino --- the problem with the usetikzpackage{babel} is that it will not work if the tikzpicture is inside an ifthenelse{}{}{} block --- is there a solution for this?
      – Rmano
      Jun 15 '16 at 12:57












    • @Rmano: Actually, I don't know. It would be great if you can post a separate question for this: it will get more attention.
      – Claudio Fiandrino
      Jun 15 '16 at 13:02






    • 1




      @ClaudioFiandrino done, tex.stackexchange.com/questions/314884/…
      – Rmano
      Jun 15 '16 at 13:16













    up vote
    8
    down vote










    up vote
    8
    down vote









    As noted by Malipivo, the spanish option of babel makes > active. You can make it inactive just inside (all) the tikzpicture environment locally, Add these in your preamble:



    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}


    Full code:



    documentclass{article}
    usepackage[spanish]{babel}
    usepackage{tikz}
    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}

    begin{document}

    Simple arrow:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    end{document}


    enter image description here






    share|improve this answer












    As noted by Malipivo, the spanish option of babel makes > active. You can make it inactive just inside (all) the tikzpicture environment locally, Add these in your preamble:



    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}


    Full code:



    documentclass{article}
    usepackage[spanish]{babel}
    usepackage{tikz}
    usepackage{etoolbox}
    AtBeginEnvironment{tikzpicture}{shorthandoff{>}shorthandoff{<}}{}{}

    begin{document}

    Simple arrow:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    end{document}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 20 '14 at 23:23







    user11232



















    • With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:20










    • @ClaudioFiandrino --- the problem with the usetikzpackage{babel} is that it will not work if the tikzpicture is inside an ifthenelse{}{}{} block --- is there a solution for this?
      – Rmano
      Jun 15 '16 at 12:57












    • @Rmano: Actually, I don't know. It would be great if you can post a separate question for this: it will get more attention.
      – Claudio Fiandrino
      Jun 15 '16 at 13:02






    • 1




      @ClaudioFiandrino done, tex.stackexchange.com/questions/314884/…
      – Rmano
      Jun 15 '16 at 13:16


















    • With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
      – Claudio Fiandrino
      Mar 21 '14 at 6:20










    • @ClaudioFiandrino --- the problem with the usetikzpackage{babel} is that it will not work if the tikzpicture is inside an ifthenelse{}{}{} block --- is there a solution for this?
      – Rmano
      Jun 15 '16 at 12:57












    • @Rmano: Actually, I don't know. It would be great if you can post a separate question for this: it will get more attention.
      – Claudio Fiandrino
      Jun 15 '16 at 13:02






    • 1




      @ClaudioFiandrino done, tex.stackexchange.com/questions/314884/…
      – Rmano
      Jun 15 '16 at 13:16
















    With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
    – Claudio Fiandrino
    Mar 21 '14 at 6:20




    With TikZ 3.0.0 there is a babel library on purpose: see Tikz shortandoff-on newcommand problem.
    – Claudio Fiandrino
    Mar 21 '14 at 6:20












    @ClaudioFiandrino --- the problem with the usetikzpackage{babel} is that it will not work if the tikzpicture is inside an ifthenelse{}{}{} block --- is there a solution for this?
    – Rmano
    Jun 15 '16 at 12:57






    @ClaudioFiandrino --- the problem with the usetikzpackage{babel} is that it will not work if the tikzpicture is inside an ifthenelse{}{}{} block --- is there a solution for this?
    – Rmano
    Jun 15 '16 at 12:57














    @Rmano: Actually, I don't know. It would be great if you can post a separate question for this: it will get more attention.
    – Claudio Fiandrino
    Jun 15 '16 at 13:02




    @Rmano: Actually, I don't know. It would be great if you can post a separate question for this: it will get more attention.
    – Claudio Fiandrino
    Jun 15 '16 at 13:02




    1




    1




    @ClaudioFiandrino done, tex.stackexchange.com/questions/314884/…
    – Rmano
    Jun 15 '16 at 13:16




    @ClaudioFiandrino done, tex.stackexchange.com/questions/314884/…
    – Rmano
    Jun 15 '16 at 13:16










    up vote
    8
    down vote













    If you don't need to use spanish quotes, just add es-noquoting to babel options and TiKZ arrows will appear again.



    documentclass[pdftex,spanish]{article}
    usepackage[es-noquoting]{babel}
    usepackage{tikz}

    begin{document}

    Simple arrow:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0);
    end{tikzpicture}

    end{document}


    enter image description here



    If you need spanish quotes use new babel TiKZ 3.0 library (as Claudio suggested). Here you have an example:



    documentclass[pdftex,spanish]{article}
    usepackage{babel}
    usepackage{tikz}
    usetikzlibrary{babel}

    begin{document}

    Simple arrow:

    begin{tikzpicture}
    draw[->] (-1.5,0) -- (1.5,0) node[right] {<<Hola>>};
    end{tikzpicture}

    <<Hola>>
    end{document}


    enter image description here






    share|improve this answer



























      up vote
      8
      down vote













      If you don't need to use spanish quotes, just add es-noquoting to babel options and TiKZ arrows will appear again.



      documentclass[pdftex,spanish]{article}
      usepackage[es-noquoting]{babel}
      usepackage{tikz}

      begin{document}

      Simple arrow:

      begin{tikzpicture}
      draw[->] (-1.5,0) -- (1.5,0);
      end{tikzpicture}

      end{document}


      enter image description here



      If you need spanish quotes use new babel TiKZ 3.0 library (as Claudio suggested). Here you have an example:



      documentclass[pdftex,spanish]{article}
      usepackage{babel}
      usepackage{tikz}
      usetikzlibrary{babel}

      begin{document}

      Simple arrow:

      begin{tikzpicture}
      draw[->] (-1.5,0) -- (1.5,0) node[right] {<<Hola>>};
      end{tikzpicture}

      <<Hola>>
      end{document}


      enter image description here






      share|improve this answer

























        up vote
        8
        down vote










        up vote
        8
        down vote









        If you don't need to use spanish quotes, just add es-noquoting to babel options and TiKZ arrows will appear again.



        documentclass[pdftex,spanish]{article}
        usepackage[es-noquoting]{babel}
        usepackage{tikz}

        begin{document}

        Simple arrow:

        begin{tikzpicture}
        draw[->] (-1.5,0) -- (1.5,0);
        end{tikzpicture}

        end{document}


        enter image description here



        If you need spanish quotes use new babel TiKZ 3.0 library (as Claudio suggested). Here you have an example:



        documentclass[pdftex,spanish]{article}
        usepackage{babel}
        usepackage{tikz}
        usetikzlibrary{babel}

        begin{document}

        Simple arrow:

        begin{tikzpicture}
        draw[->] (-1.5,0) -- (1.5,0) node[right] {<<Hola>>};
        end{tikzpicture}

        <<Hola>>
        end{document}


        enter image description here






        share|improve this answer














        If you don't need to use spanish quotes, just add es-noquoting to babel options and TiKZ arrows will appear again.



        documentclass[pdftex,spanish]{article}
        usepackage[es-noquoting]{babel}
        usepackage{tikz}

        begin{document}

        Simple arrow:

        begin{tikzpicture}
        draw[->] (-1.5,0) -- (1.5,0);
        end{tikzpicture}

        end{document}


        enter image description here



        If you need spanish quotes use new babel TiKZ 3.0 library (as Claudio suggested). Here you have an example:



        documentclass[pdftex,spanish]{article}
        usepackage{babel}
        usepackage{tikz}
        usetikzlibrary{babel}

        begin{document}

        Simple arrow:

        begin{tikzpicture}
        draw[->] (-1.5,0) -- (1.5,0) node[right] {<<Hola>>};
        end{tikzpicture}

        <<Hola>>
        end{document}


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 21 '14 at 8:05

























        answered Mar 21 '14 at 7:57









        Ignasi

        89.6k4160301




        89.6k4160301






















            up vote
            1
            down vote













            I do not know why, but none of the previous answers has worked for me. They showed me the right path though; adding just



            deactivatequoting


            on the preambled fixed the problem.



            Calling babel with english as well as spanish does the trick, too



            usepackage[spanish,english]{babel} 





            share|improve this answer

















            • 4




              It is quite normal that calling babel with the english option placed after the spanish one does the trick: it means that the english settings of Babel apply by default, and in that case there is no bug. But most of the time, having their documents typeset with English conventions is not what people want when they write in Spanish :-)
              – Franck Pastor
              Apr 7 '15 at 10:38















            up vote
            1
            down vote













            I do not know why, but none of the previous answers has worked for me. They showed me the right path though; adding just



            deactivatequoting


            on the preambled fixed the problem.



            Calling babel with english as well as spanish does the trick, too



            usepackage[spanish,english]{babel} 





            share|improve this answer

















            • 4




              It is quite normal that calling babel with the english option placed after the spanish one does the trick: it means that the english settings of Babel apply by default, and in that case there is no bug. But most of the time, having their documents typeset with English conventions is not what people want when they write in Spanish :-)
              – Franck Pastor
              Apr 7 '15 at 10:38













            up vote
            1
            down vote










            up vote
            1
            down vote









            I do not know why, but none of the previous answers has worked for me. They showed me the right path though; adding just



            deactivatequoting


            on the preambled fixed the problem.



            Calling babel with english as well as spanish does the trick, too



            usepackage[spanish,english]{babel} 





            share|improve this answer












            I do not know why, but none of the previous answers has worked for me. They showed me the right path though; adding just



            deactivatequoting


            on the preambled fixed the problem.



            Calling babel with english as well as spanish does the trick, too



            usepackage[spanish,english]{babel} 






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 7 '15 at 9:58









            Vicent

            111




            111








            • 4




              It is quite normal that calling babel with the english option placed after the spanish one does the trick: it means that the english settings of Babel apply by default, and in that case there is no bug. But most of the time, having their documents typeset with English conventions is not what people want when they write in Spanish :-)
              – Franck Pastor
              Apr 7 '15 at 10:38














            • 4




              It is quite normal that calling babel with the english option placed after the spanish one does the trick: it means that the english settings of Babel apply by default, and in that case there is no bug. But most of the time, having their documents typeset with English conventions is not what people want when they write in Spanish :-)
              – Franck Pastor
              Apr 7 '15 at 10:38








            4




            4




            It is quite normal that calling babel with the english option placed after the spanish one does the trick: it means that the english settings of Babel apply by default, and in that case there is no bug. But most of the time, having their documents typeset with English conventions is not what people want when they write in Spanish :-)
            – Franck Pastor
            Apr 7 '15 at 10:38




            It is quite normal that calling babel with the english option placed after the spanish one does the trick: it means that the english settings of Babel apply by default, and in that case there is no bug. But most of the time, having their documents typeset with English conventions is not what people want when they write in Spanish :-)
            – Franck Pastor
            Apr 7 '15 at 10:38


















             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f166772%2fproblem-with-babel-and-tikz-using-draw%23new-answer', 'question_page');
            }
            );

            Post as a guest




















































































            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?