Arabic Text inside Tikz decorations.text












11














I am trying to create a TikZ figure as below, but the compilation is problematic when one adds some Arabic text.



documentclass[tikz, border=5pt, multi]{standalone}
usepackage{polyglossia}
usepackage [utf] {arabxetex}
usepackage{fontspec}
usepackage{amsfonts}
usepackage{amsmath}
usepackage{fourier}
setmainlanguage[variant=british]{english}
newfontfamilyarabicfont{Amiri}[Script=Arabic]
usetikzlibrary{arrows.meta,calc}
usepackage{color}
usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/

begin{document}

begin{tikzpicture}

node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
node[circle, minimum size=6cm, draw, fill=green] (b) {};
draw [decorate, decoration={text along path, text =textarabic{المنزل العربي الكبير يحب الخير} }]
(150:3.1) arc (150:30:3.1cm);
%draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
%(150:3.1) arc (150:30:3.1cm);
end{tikzpicture}

end{document}


enter image description here










share|improve this question









New contributor




Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Side note: you might try the packages unicode-math and libertinus-otf as an alternative to legacy NFSS fonts. Libertinus Math and Amiri were created by the same person, Khaled Hosny, and complement each other very well.
    – Davislor
    Dec 22 at 20:30










  • Could you show me an example how?
    – Mostafa Alaa
    Dec 22 at 20:47






  • 1




    Here’s one: tex.stackexchange.com/questions/453115/…
    – Davislor
    Dec 22 at 21:29
















11














I am trying to create a TikZ figure as below, but the compilation is problematic when one adds some Arabic text.



documentclass[tikz, border=5pt, multi]{standalone}
usepackage{polyglossia}
usepackage [utf] {arabxetex}
usepackage{fontspec}
usepackage{amsfonts}
usepackage{amsmath}
usepackage{fourier}
setmainlanguage[variant=british]{english}
newfontfamilyarabicfont{Amiri}[Script=Arabic]
usetikzlibrary{arrows.meta,calc}
usepackage{color}
usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/

begin{document}

begin{tikzpicture}

node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
node[circle, minimum size=6cm, draw, fill=green] (b) {};
draw [decorate, decoration={text along path, text =textarabic{المنزل العربي الكبير يحب الخير} }]
(150:3.1) arc (150:30:3.1cm);
%draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
%(150:3.1) arc (150:30:3.1cm);
end{tikzpicture}

end{document}


enter image description here










share|improve this question









New contributor




Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Side note: you might try the packages unicode-math and libertinus-otf as an alternative to legacy NFSS fonts. Libertinus Math and Amiri were created by the same person, Khaled Hosny, and complement each other very well.
    – Davislor
    Dec 22 at 20:30










  • Could you show me an example how?
    – Mostafa Alaa
    Dec 22 at 20:47






  • 1




    Here’s one: tex.stackexchange.com/questions/453115/…
    – Davislor
    Dec 22 at 21:29














11












11








11







I am trying to create a TikZ figure as below, but the compilation is problematic when one adds some Arabic text.



documentclass[tikz, border=5pt, multi]{standalone}
usepackage{polyglossia}
usepackage [utf] {arabxetex}
usepackage{fontspec}
usepackage{amsfonts}
usepackage{amsmath}
usepackage{fourier}
setmainlanguage[variant=british]{english}
newfontfamilyarabicfont{Amiri}[Script=Arabic]
usetikzlibrary{arrows.meta,calc}
usepackage{color}
usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/

begin{document}

begin{tikzpicture}

node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
node[circle, minimum size=6cm, draw, fill=green] (b) {};
draw [decorate, decoration={text along path, text =textarabic{المنزل العربي الكبير يحب الخير} }]
(150:3.1) arc (150:30:3.1cm);
%draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
%(150:3.1) arc (150:30:3.1cm);
end{tikzpicture}

end{document}


enter image description here










share|improve this question









New contributor




Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am trying to create a TikZ figure as below, but the compilation is problematic when one adds some Arabic text.



documentclass[tikz, border=5pt, multi]{standalone}
usepackage{polyglossia}
usepackage [utf] {arabxetex}
usepackage{fontspec}
usepackage{amsfonts}
usepackage{amsmath}
usepackage{fourier}
setmainlanguage[variant=british]{english}
newfontfamilyarabicfont{Amiri}[Script=Arabic]
usetikzlibrary{arrows.meta,calc}
usepackage{color}
usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/

begin{document}

begin{tikzpicture}

node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
node[circle, minimum size=6cm, draw, fill=green] (b) {};
draw [decorate, decoration={text along path, text =textarabic{المنزل العربي الكبير يحب الخير} }]
(150:3.1) arc (150:30:3.1cm);
%draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
%(150:3.1) arc (150:30:3.1cm);
end{tikzpicture}

end{document}


enter image description here







tikz-pgf xetex arabic






share|improve this question









New contributor




Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 22 at 21:56









Roboticist

1,59121131




1,59121131






New contributor




Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 22 at 18:23









Mostafa Alaa

585




585




New contributor




Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Mostafa Alaa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Side note: you might try the packages unicode-math and libertinus-otf as an alternative to legacy NFSS fonts. Libertinus Math and Amiri were created by the same person, Khaled Hosny, and complement each other very well.
    – Davislor
    Dec 22 at 20:30










  • Could you show me an example how?
    – Mostafa Alaa
    Dec 22 at 20:47






  • 1




    Here’s one: tex.stackexchange.com/questions/453115/…
    – Davislor
    Dec 22 at 21:29


















  • Side note: you might try the packages unicode-math and libertinus-otf as an alternative to legacy NFSS fonts. Libertinus Math and Amiri were created by the same person, Khaled Hosny, and complement each other very well.
    – Davislor
    Dec 22 at 20:30










  • Could you show me an example how?
    – Mostafa Alaa
    Dec 22 at 20:47






  • 1




    Here’s one: tex.stackexchange.com/questions/453115/…
    – Davislor
    Dec 22 at 21:29
















Side note: you might try the packages unicode-math and libertinus-otf as an alternative to legacy NFSS fonts. Libertinus Math and Amiri were created by the same person, Khaled Hosny, and complement each other very well.
– Davislor
Dec 22 at 20:30




Side note: you might try the packages unicode-math and libertinus-otf as an alternative to legacy NFSS fonts. Libertinus Math and Amiri were created by the same person, Khaled Hosny, and complement each other very well.
– Davislor
Dec 22 at 20:30












Could you show me an example how?
– Mostafa Alaa
Dec 22 at 20:47




Could you show me an example how?
– Mostafa Alaa
Dec 22 at 20:47




1




1




Here’s one: tex.stackexchange.com/questions/453115/…
– Davislor
Dec 22 at 21:29




Here’s one: tex.stackexchange.com/questions/453115/…
– Davislor
Dec 22 at 21:29










1 Answer
1






active

oldest

votes


















13














Because Arabic is complex, characters are connected to form a word, unlike English and Latin, it can not bend to follow a path easily. To remedy this, you have to break the text into separate words using text format delimiters={|}{|} and activate the font at the begining of the tikzpicture by adding arabicfontfontsize{12pt}{20}selectfont.



documentclass[tikz, border=5pt, multi]{standalone}
usepackage{polyglossia}
usepackage [utf] {arabxetex}
usepackage{fontspec}
usepackage{amsfonts}
usepackage{amsmath}
usepackage{fourier}
setmainlanguage[variant=british]{english}
newfontfamilyarabicfont{Amiri}[Script=Arabic]
usetikzlibrary{arrows.meta,calc}
usepackage{color}
usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/


begin{document}

begin{tikzpicture}arabicfontfontsize{12pt}{20}selectfont

node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
node[circle, minimum size=6cm, draw, fill=green] (b) {};
draw [decorate, decoration={text along path,text format delimiters={|}{|},text={|textarabic|{الخير} |textarabic|{يحب} |textarabic|{الكبير} |textarabic|{العربي} |textarabic|{الوطن}},raise=1.5pt}]
(150:3.1) arc (150:30:3.1cm);
%draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
%(150:3.1) arc (150:30:3.1cm);
end{tikzpicture}

end{document}



enter image description here







share|improve this answer























    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',
    autoActivateHeartbeat: false,
    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
    });


    }
    });






    Mostafa Alaa is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f467017%2farabic-text-inside-tikz-decorations-text%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    13














    Because Arabic is complex, characters are connected to form a word, unlike English and Latin, it can not bend to follow a path easily. To remedy this, you have to break the text into separate words using text format delimiters={|}{|} and activate the font at the begining of the tikzpicture by adding arabicfontfontsize{12pt}{20}selectfont.



    documentclass[tikz, border=5pt, multi]{standalone}
    usepackage{polyglossia}
    usepackage [utf] {arabxetex}
    usepackage{fontspec}
    usepackage{amsfonts}
    usepackage{amsmath}
    usepackage{fourier}
    setmainlanguage[variant=british]{english}
    newfontfamilyarabicfont{Amiri}[Script=Arabic]
    usetikzlibrary{arrows.meta,calc}
    usepackage{color}
    usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
    usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/


    begin{document}

    begin{tikzpicture}arabicfontfontsize{12pt}{20}selectfont

    node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
    node[circle, minimum size=6cm, draw, fill=green] (b) {};
    draw [decorate, decoration={text along path,text format delimiters={|}{|},text={|textarabic|{الخير} |textarabic|{يحب} |textarabic|{الكبير} |textarabic|{العربي} |textarabic|{الوطن}},raise=1.5pt}]
    (150:3.1) arc (150:30:3.1cm);
    %draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
    %(150:3.1) arc (150:30:3.1cm);
    end{tikzpicture}

    end{document}



    enter image description here







    share|improve this answer




























      13














      Because Arabic is complex, characters are connected to form a word, unlike English and Latin, it can not bend to follow a path easily. To remedy this, you have to break the text into separate words using text format delimiters={|}{|} and activate the font at the begining of the tikzpicture by adding arabicfontfontsize{12pt}{20}selectfont.



      documentclass[tikz, border=5pt, multi]{standalone}
      usepackage{polyglossia}
      usepackage [utf] {arabxetex}
      usepackage{fontspec}
      usepackage{amsfonts}
      usepackage{amsmath}
      usepackage{fourier}
      setmainlanguage[variant=british]{english}
      newfontfamilyarabicfont{Amiri}[Script=Arabic]
      usetikzlibrary{arrows.meta,calc}
      usepackage{color}
      usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
      usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/


      begin{document}

      begin{tikzpicture}arabicfontfontsize{12pt}{20}selectfont

      node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
      node[circle, minimum size=6cm, draw, fill=green] (b) {};
      draw [decorate, decoration={text along path,text format delimiters={|}{|},text={|textarabic|{الخير} |textarabic|{يحب} |textarabic|{الكبير} |textarabic|{العربي} |textarabic|{الوطن}},raise=1.5pt}]
      (150:3.1) arc (150:30:3.1cm);
      %draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
      %(150:3.1) arc (150:30:3.1cm);
      end{tikzpicture}

      end{document}



      enter image description here







      share|improve this answer


























        13












        13








        13






        Because Arabic is complex, characters are connected to form a word, unlike English and Latin, it can not bend to follow a path easily. To remedy this, you have to break the text into separate words using text format delimiters={|}{|} and activate the font at the begining of the tikzpicture by adding arabicfontfontsize{12pt}{20}selectfont.



        documentclass[tikz, border=5pt, multi]{standalone}
        usepackage{polyglossia}
        usepackage [utf] {arabxetex}
        usepackage{fontspec}
        usepackage{amsfonts}
        usepackage{amsmath}
        usepackage{fourier}
        setmainlanguage[variant=british]{english}
        newfontfamilyarabicfont{Amiri}[Script=Arabic]
        usetikzlibrary{arrows.meta,calc}
        usepackage{color}
        usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
        usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/


        begin{document}

        begin{tikzpicture}arabicfontfontsize{12pt}{20}selectfont

        node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
        node[circle, minimum size=6cm, draw, fill=green] (b) {};
        draw [decorate, decoration={text along path,text format delimiters={|}{|},text={|textarabic|{الخير} |textarabic|{يحب} |textarabic|{الكبير} |textarabic|{العربي} |textarabic|{الوطن}},raise=1.5pt}]
        (150:3.1) arc (150:30:3.1cm);
        %draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
        %(150:3.1) arc (150:30:3.1cm);
        end{tikzpicture}

        end{document}



        enter image description here







        share|improve this answer














        Because Arabic is complex, characters are connected to form a word, unlike English and Latin, it can not bend to follow a path easily. To remedy this, you have to break the text into separate words using text format delimiters={|}{|} and activate the font at the begining of the tikzpicture by adding arabicfontfontsize{12pt}{20}selectfont.



        documentclass[tikz, border=5pt, multi]{standalone}
        usepackage{polyglossia}
        usepackage [utf] {arabxetex}
        usepackage{fontspec}
        usepackage{amsfonts}
        usepackage{amsmath}
        usepackage{fourier}
        setmainlanguage[variant=british]{english}
        newfontfamilyarabicfont{Amiri}[Script=Arabic]
        usetikzlibrary{arrows.meta,calc}
        usepackage{color}
        usepackage{tikz,pgfornament,tikzrput} % altermundus.com/pages/tkz/tikzrput/
        usetikzlibrary{decorations,decorations.text} % altermundus.com/pages/tkz/ornament/


        begin{document}

        begin{tikzpicture}arabicfontfontsize{12pt}{20}selectfont

        node[circle, minimum size=7cm, draw, fill=yellow] (a) {};
        node[circle, minimum size=6cm, draw, fill=green] (b) {};
        draw [decorate, decoration={text along path,text format delimiters={|}{|},text={|textarabic|{الخير} |textarabic|{يحب} |textarabic|{الكبير} |textarabic|{العربي} |textarabic|{الوطن}},raise=1.5pt}]
        (150:3.1) arc (150:30:3.1cm);
        %draw [decorate, decoration={text along path, text =XXXXX YYYYY XXXXX}]
        %(150:3.1) arc (150:30:3.1cm);
        end{tikzpicture}

        end{document}



        enter image description here








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 22 at 19:25

























        answered Dec 22 at 19:13









        AboAmmar

        32.7k22882




        32.7k22882






















            Mostafa Alaa is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Mostafa Alaa is a new contributor. Be nice, and check out our Code of Conduct.













            Mostafa Alaa is a new contributor. Be nice, and check out our Code of Conduct.












            Mostafa Alaa is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f467017%2farabic-text-inside-tikz-decorations-text%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            If I really need a card on my start hand, how many mulligans make sense? [duplicate]

            Alcedinidae

            Can an atomic nucleus contain both particles and antiparticles? [duplicate]