A problem with the command nccurve












3















documentclass[12pt,a4paper]{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{vietnam}
usepackage{pstricks,pst-node} % required package
usepackage{auto-pst-pdf}
begin{document}
begin{pspicture}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}

ncline{->}{3}{2}
ncline{->}{4}{3}
ncline{->}{4}{5}
ncline{->}{5}{3}
ncline{->}{5}{1}
ncline{->}{1}{4}

nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{pspicture}
end{document}


How to draw Picture 1 like as Picture 2?(I see, 2 is more beautiful than 1)



How to compact ncline or we can only typing manually? It means is there a macro like as ncline{->}{3}{2}{->}{4}{3}{->}{4}{5}... ?



Picture 1:



enter image description here



Picture 2:



enter image description here



The code of Picture 2 ( use tikz )



documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
[every node/.style={circle,draw=red},
every path/.style={blue,-latex,thick}]
defa{2}
node (5) at (0,0) {$5$};
node (1) at (-a,-a) {$1$};
node (2) at (-a,a) {$2$};
node (3) at (a,a) {$3$};
node (4) at (a,-a) {$4$};
draw (1)--(4); draw (4)--(3);
draw (3)--(2); draw (5)--(3);
draw (5)--(1); draw (4)--(5);
draw (2) to[out=-70,in=70] (1);
draw (1) to[out=110,in=-110] (2);
draw (3) .. controls +(80:1) and +(30:1) .. (3); % <<<---- notice!
end{tikzpicture}
end{document}









share|improve this question




















  • 2





    Please improve question title.

    – albert
    Nov 29 '18 at 12:02











  • :)))))))))))))))))))))))))))

    – chishimotoji
    Nov 29 '18 at 12:10











  • I assume you mean here that picture 2 (though hard to see that it are 2 pictures as they are in the output very close to one another) is nicer, in your eyse, than picture 1. In what respect ? What is the difference in the generation of picture 1 and picture 2?

    – albert
    Nov 29 '18 at 12:23











  • I don't know the difference in the generation between them. :-)). I only hope anyone improve its macro "nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}". ;))

    – chishimotoji
    Nov 29 '18 at 12:32











  • Can you change the title to reflect which problem you have? At the moment it won't help any future users who might have the same problem as you

    – samcarter
    Nov 29 '18 at 12:37
















3















documentclass[12pt,a4paper]{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{vietnam}
usepackage{pstricks,pst-node} % required package
usepackage{auto-pst-pdf}
begin{document}
begin{pspicture}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}

ncline{->}{3}{2}
ncline{->}{4}{3}
ncline{->}{4}{5}
ncline{->}{5}{3}
ncline{->}{5}{1}
ncline{->}{1}{4}

nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{pspicture}
end{document}


How to draw Picture 1 like as Picture 2?(I see, 2 is more beautiful than 1)



How to compact ncline or we can only typing manually? It means is there a macro like as ncline{->}{3}{2}{->}{4}{3}{->}{4}{5}... ?



Picture 1:



enter image description here



Picture 2:



enter image description here



The code of Picture 2 ( use tikz )



documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
[every node/.style={circle,draw=red},
every path/.style={blue,-latex,thick}]
defa{2}
node (5) at (0,0) {$5$};
node (1) at (-a,-a) {$1$};
node (2) at (-a,a) {$2$};
node (3) at (a,a) {$3$};
node (4) at (a,-a) {$4$};
draw (1)--(4); draw (4)--(3);
draw (3)--(2); draw (5)--(3);
draw (5)--(1); draw (4)--(5);
draw (2) to[out=-70,in=70] (1);
draw (1) to[out=110,in=-110] (2);
draw (3) .. controls +(80:1) and +(30:1) .. (3); % <<<---- notice!
end{tikzpicture}
end{document}









share|improve this question




















  • 2





    Please improve question title.

    – albert
    Nov 29 '18 at 12:02











  • :)))))))))))))))))))))))))))

    – chishimotoji
    Nov 29 '18 at 12:10











  • I assume you mean here that picture 2 (though hard to see that it are 2 pictures as they are in the output very close to one another) is nicer, in your eyse, than picture 1. In what respect ? What is the difference in the generation of picture 1 and picture 2?

    – albert
    Nov 29 '18 at 12:23











  • I don't know the difference in the generation between them. :-)). I only hope anyone improve its macro "nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}". ;))

    – chishimotoji
    Nov 29 '18 at 12:32











  • Can you change the title to reflect which problem you have? At the moment it won't help any future users who might have the same problem as you

    – samcarter
    Nov 29 '18 at 12:37














3












3








3








documentclass[12pt,a4paper]{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{vietnam}
usepackage{pstricks,pst-node} % required package
usepackage{auto-pst-pdf}
begin{document}
begin{pspicture}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}

ncline{->}{3}{2}
ncline{->}{4}{3}
ncline{->}{4}{5}
ncline{->}{5}{3}
ncline{->}{5}{1}
ncline{->}{1}{4}

nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{pspicture}
end{document}


How to draw Picture 1 like as Picture 2?(I see, 2 is more beautiful than 1)



How to compact ncline or we can only typing manually? It means is there a macro like as ncline{->}{3}{2}{->}{4}{3}{->}{4}{5}... ?



Picture 1:



enter image description here



Picture 2:



enter image description here



The code of Picture 2 ( use tikz )



documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
[every node/.style={circle,draw=red},
every path/.style={blue,-latex,thick}]
defa{2}
node (5) at (0,0) {$5$};
node (1) at (-a,-a) {$1$};
node (2) at (-a,a) {$2$};
node (3) at (a,a) {$3$};
node (4) at (a,-a) {$4$};
draw (1)--(4); draw (4)--(3);
draw (3)--(2); draw (5)--(3);
draw (5)--(1); draw (4)--(5);
draw (2) to[out=-70,in=70] (1);
draw (1) to[out=110,in=-110] (2);
draw (3) .. controls +(80:1) and +(30:1) .. (3); % <<<---- notice!
end{tikzpicture}
end{document}









share|improve this question
















documentclass[12pt,a4paper]{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{vietnam}
usepackage{pstricks,pst-node} % required package
usepackage{auto-pst-pdf}
begin{document}
begin{pspicture}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}

ncline{->}{3}{2}
ncline{->}{4}{3}
ncline{->}{4}{5}
ncline{->}{5}{3}
ncline{->}{5}{1}
ncline{->}{1}{4}

nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{pspicture}
end{document}


How to draw Picture 1 like as Picture 2?(I see, 2 is more beautiful than 1)



How to compact ncline or we can only typing manually? It means is there a macro like as ncline{->}{3}{2}{->}{4}{3}{->}{4}{5}... ?



Picture 1:



enter image description here



Picture 2:



enter image description here



The code of Picture 2 ( use tikz )



documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
[every node/.style={circle,draw=red},
every path/.style={blue,-latex,thick}]
defa{2}
node (5) at (0,0) {$5$};
node (1) at (-a,-a) {$1$};
node (2) at (-a,a) {$2$};
node (3) at (a,a) {$3$};
node (4) at (a,-a) {$4$};
draw (1)--(4); draw (4)--(3);
draw (3)--(2); draw (5)--(3);
draw (5)--(1); draw (4)--(5);
draw (2) to[out=-70,in=70] (1);
draw (1) to[out=110,in=-110] (2);
draw (3) .. controls +(80:1) and +(30:1) .. (3); % <<<---- notice!
end{tikzpicture}
end{document}






pstricks pst-node psmatrix






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 29 '18 at 12:54







chishimotoji

















asked Nov 29 '18 at 11:54









chishimotojichishimotoji

644318




644318








  • 2





    Please improve question title.

    – albert
    Nov 29 '18 at 12:02











  • :)))))))))))))))))))))))))))

    – chishimotoji
    Nov 29 '18 at 12:10











  • I assume you mean here that picture 2 (though hard to see that it are 2 pictures as they are in the output very close to one another) is nicer, in your eyse, than picture 1. In what respect ? What is the difference in the generation of picture 1 and picture 2?

    – albert
    Nov 29 '18 at 12:23











  • I don't know the difference in the generation between them. :-)). I only hope anyone improve its macro "nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}". ;))

    – chishimotoji
    Nov 29 '18 at 12:32











  • Can you change the title to reflect which problem you have? At the moment it won't help any future users who might have the same problem as you

    – samcarter
    Nov 29 '18 at 12:37














  • 2





    Please improve question title.

    – albert
    Nov 29 '18 at 12:02











  • :)))))))))))))))))))))))))))

    – chishimotoji
    Nov 29 '18 at 12:10











  • I assume you mean here that picture 2 (though hard to see that it are 2 pictures as they are in the output very close to one another) is nicer, in your eyse, than picture 1. In what respect ? What is the difference in the generation of picture 1 and picture 2?

    – albert
    Nov 29 '18 at 12:23











  • I don't know the difference in the generation between them. :-)). I only hope anyone improve its macro "nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}". ;))

    – chishimotoji
    Nov 29 '18 at 12:32











  • Can you change the title to reflect which problem you have? At the moment it won't help any future users who might have the same problem as you

    – samcarter
    Nov 29 '18 at 12:37








2




2





Please improve question title.

– albert
Nov 29 '18 at 12:02





Please improve question title.

– albert
Nov 29 '18 at 12:02













:)))))))))))))))))))))))))))

– chishimotoji
Nov 29 '18 at 12:10





:)))))))))))))))))))))))))))

– chishimotoji
Nov 29 '18 at 12:10













I assume you mean here that picture 2 (though hard to see that it are 2 pictures as they are in the output very close to one another) is nicer, in your eyse, than picture 1. In what respect ? What is the difference in the generation of picture 1 and picture 2?

– albert
Nov 29 '18 at 12:23





I assume you mean here that picture 2 (though hard to see that it are 2 pictures as they are in the output very close to one another) is nicer, in your eyse, than picture 1. In what respect ? What is the difference in the generation of picture 1 and picture 2?

– albert
Nov 29 '18 at 12:23













I don't know the difference in the generation between them. :-)). I only hope anyone improve its macro "nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}". ;))

– chishimotoji
Nov 29 '18 at 12:32





I don't know the difference in the generation between them. :-)). I only hope anyone improve its macro "nccurve[angleA=80,angleB=25,ncurv=5]{->}{3}{3}". ;))

– chishimotoji
Nov 29 '18 at 12:32













Can you change the title to reflect which problem you have? At the moment it won't help any future users who might have the same problem as you

– samcarter
Nov 29 '18 at 12:37





Can you change the title to reflect which problem you have? At the moment it won't help any future users who might have the same problem as you

– samcarter
Nov 29 '18 at 12:37










1 Answer
1






active

oldest

votes


















5














define your own macro and for the loop use symmetrical angles with respect to 45 degrees::



documentclass{article}
usepackage{pst-node} % required package
usepackage{auto-pst-pdf}

makeatletter
newcommandNCline[3]{ncline{#1}{#2}{#3}@ifnextcharbgroupNCline{}}
makeatother
begin{document}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}
NCline{->}{3}{2}{->}{4}{3}{->}{4}{5}{->}{5}{3}{->}{5}{1}{->}{1}{4}
nccurve[angleA=75,angleB=15,ncurv=6]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{document}


enter image description here






share|improve this answer
























  • What do you think about its the tikz code?. ( I see its code "shorter" but "complete" :-(( .The pstricks code is longer, more complex than or the reason my code is not enough short as it ). See my editted comment

    – chishimotoji
    Nov 29 '18 at 13:14













  • sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.

    – Herbert
    Nov 29 '18 at 13:18











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462368%2fa-problem-with-the-command-nccurve%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









5














define your own macro and for the loop use symmetrical angles with respect to 45 degrees::



documentclass{article}
usepackage{pst-node} % required package
usepackage{auto-pst-pdf}

makeatletter
newcommandNCline[3]{ncline{#1}{#2}{#3}@ifnextcharbgroupNCline{}}
makeatother
begin{document}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}
NCline{->}{3}{2}{->}{4}{3}{->}{4}{5}{->}{5}{3}{->}{5}{1}{->}{1}{4}
nccurve[angleA=75,angleB=15,ncurv=6]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{document}


enter image description here






share|improve this answer
























  • What do you think about its the tikz code?. ( I see its code "shorter" but "complete" :-(( .The pstricks code is longer, more complex than or the reason my code is not enough short as it ). See my editted comment

    – chishimotoji
    Nov 29 '18 at 13:14













  • sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.

    – Herbert
    Nov 29 '18 at 13:18
















5














define your own macro and for the loop use symmetrical angles with respect to 45 degrees::



documentclass{article}
usepackage{pst-node} % required package
usepackage{auto-pst-pdf}

makeatletter
newcommandNCline[3]{ncline{#1}{#2}{#3}@ifnextcharbgroupNCline{}}
makeatother
begin{document}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}
NCline{->}{3}{2}{->}{4}{3}{->}{4}{5}{->}{5}{3}{->}{5}{1}{->}{1}{4}
nccurve[angleA=75,angleB=15,ncurv=6]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{document}


enter image description here






share|improve this answer
























  • What do you think about its the tikz code?. ( I see its code "shorter" but "complete" :-(( .The pstricks code is longer, more complex than or the reason my code is not enough short as it ). See my editted comment

    – chishimotoji
    Nov 29 '18 at 13:14













  • sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.

    – Herbert
    Nov 29 '18 at 13:18














5












5








5







define your own macro and for the loop use symmetrical angles with respect to 45 degrees::



documentclass{article}
usepackage{pst-node} % required package
usepackage{auto-pst-pdf}

makeatletter
newcommandNCline[3]{ncline{#1}{#2}{#3}@ifnextcharbgroupNCline{}}
makeatother
begin{document}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}
NCline{->}{3}{2}{->}{4}{3}{->}{4}{5}{->}{5}{3}{->}{5}{1}{->}{1}{4}
nccurve[angleA=75,angleB=15,ncurv=6]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{document}


enter image description here






share|improve this answer













define your own macro and for the loop use symmetrical angles with respect to 45 degrees::



documentclass{article}
usepackage{pst-node} % required package
usepackage{auto-pst-pdf}

makeatletter
newcommandNCline[3]{ncline{#1}{#2}{#3}@ifnextcharbgroupNCline{}}
makeatother
begin{document}
psmatrix[linecolor=red,mnode=Circle,radius=3mm,colsep=1.25cm,rowsep=1.25cm]
[name=2] 2 & & [name=3] 3 \
&[name=5] 5 \
[name=1] 1 & & [name=4] 4
psset{linecolor=blue,arrowscale=1.5}
NCline{->}{3}{2}{->}{4}{3}{->}{4}{5}{->}{5}{3}{->}{5}{1}{->}{1}{4}
nccurve[angleA=75,angleB=15,ncurv=6]{->}{3}{3}

ncarc[arcangle=22]{->}{1}{2}
ncarc[arcangle=22]{->}{2}{1}
endpsmatrix

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 29 '18 at 12:55









HerbertHerbert

271k24409719




271k24409719













  • What do you think about its the tikz code?. ( I see its code "shorter" but "complete" :-(( .The pstricks code is longer, more complex than or the reason my code is not enough short as it ). See my editted comment

    – chishimotoji
    Nov 29 '18 at 13:14













  • sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.

    – Herbert
    Nov 29 '18 at 13:18



















  • What do you think about its the tikz code?. ( I see its code "shorter" but "complete" :-(( .The pstricks code is longer, more complex than or the reason my code is not enough short as it ). See my editted comment

    – chishimotoji
    Nov 29 '18 at 13:14













  • sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.

    – Herbert
    Nov 29 '18 at 13:18

















What do you think about its the tikz code?. ( I see its code "shorter" but "complete" :-(( .The pstricks code is longer, more complex than or the reason my code is not enough short as it ). See my editted comment

– chishimotoji
Nov 29 '18 at 13:14







What do you think about its the tikz code?. ( I see its code "shorter" but "complete" :-(( .The pstricks code is longer, more complex than or the reason my code is not enough short as it ). See my editted comment

– chishimotoji
Nov 29 '18 at 13:14















sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.

– Herbert
Nov 29 '18 at 13:18





sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.

– Herbert
Nov 29 '18 at 13:18


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462368%2fa-problem-with-the-command-nccurve%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

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...