A problem with the command nccurve
up vote
3
down vote
favorite
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:
Picture 2:
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
add a comment |
up vote
3
down vote
favorite
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:
Picture 2:
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
2
Please improve question title.
– albert
Nov 29 at 12:02
:)))))))))))))))))))))))))))
– chishimotoji
Nov 29 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 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 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 at 12:37
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
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:
Picture 2:
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
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:
Picture 2:
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
pstricks pst-node psmatrix
edited Nov 29 at 12:54
asked Nov 29 at 11:54
chishimotoji
440212
440212
2
Please improve question title.
– albert
Nov 29 at 12:02
:)))))))))))))))))))))))))))
– chishimotoji
Nov 29 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 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 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 at 12:37
add a comment |
2
Please improve question title.
– albert
Nov 29 at 12:02
:)))))))))))))))))))))))))))
– chishimotoji
Nov 29 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 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 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 at 12:37
2
2
Please improve question title.
– albert
Nov 29 at 12:02
Please improve question title.
– albert
Nov 29 at 12:02
:)))))))))))))))))))))))))))
– chishimotoji
Nov 29 at 12:10
:)))))))))))))))))))))))))))
– chishimotoji
Nov 29 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 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 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 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 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 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 at 12:37
add a comment |
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
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}
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 at 13:14
sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.
– Herbert
Nov 29 at 13:18
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
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}
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 at 13:14
sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.
– Herbert
Nov 29 at 13:18
add a comment |
up vote
5
down vote
accepted
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}
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 at 13:14
sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.
– Herbert
Nov 29 at 13:18
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
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}
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}
answered Nov 29 at 12:55
Herbert
267k23406716
267k23406716
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 at 13:14
sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.
– Herbert
Nov 29 at 13:18
add a comment |
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 at 13:14
sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.
– Herbert
Nov 29 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 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 at 13:14
sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.
– Herbert
Nov 29 at 13:18
sure, it has absolute coordinates for the nodes! Can also be done with PSTricks.
– Herbert
Nov 29 at 13:18
add a comment |
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%2f462368%2fa-problem-with-the-command-nccurve%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
2
Please improve question title.
– albert
Nov 29 at 12:02
:)))))))))))))))))))))))))))
– chishimotoji
Nov 29 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 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 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 at 12:37