Arabic Text inside Tikz decorations.text
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}
tikz-pgf xetex arabic
New contributor
add a comment |
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}
tikz-pgf xetex arabic
New contributor
Side note: you might try the packagesunicode-math
andlibertinus-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
add a comment |
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}
tikz-pgf xetex arabic
New contributor
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}
tikz-pgf xetex arabic
tikz-pgf xetex arabic
New contributor
New contributor
edited Dec 22 at 21:56
Roboticist
1,59121131
1,59121131
New contributor
asked Dec 22 at 18:23
Mostafa Alaa
585
585
New contributor
New contributor
Side note: you might try the packagesunicode-math
andlibertinus-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
add a comment |
Side note: you might try the packagesunicode-math
andlibertinus-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
add a comment |
1 Answer
1
active
oldest
votes
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}
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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}
add a comment |
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}
add a comment |
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}
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}
edited Dec 22 at 19:25
answered Dec 22 at 19:13
AboAmmar
32.7k22882
32.7k22882
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Side note: you might try the packages
unicode-math
andlibertinus-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