Add support for the Pic language

This commit is contained in:
Alhadis
2016-10-12 02:46:17 +11:00
parent 22c2cf4967
commit eb0e75e11e
4 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
# Dextroamphetamine molecule
.cstart
.ps 26
size 28
R1:
ring double 1,2 3,4 5,6
bond 60 from R1.V2
bond 120
A1:
front bond down ; CH3
bond 60 from A1 ; NH2
.ps
.cend

25
samples/Pic/graph.pic Normal file
View File

@@ -0,0 +1,25 @@
.PS
ellipse "Pic" "example"
arrow
box "This is" "a box"
arrow right
box "Another" "box" dashed
move down then right;
Thing: ellipse "This is a" "circle-thing"
arrow <-> from last box.r to Thing.l
move down then left;
B: box "Still a box"
arrow from Thing.l to B.r
sprintf("Width = %g, Height = %g ", B.wid, B.ht) rjust at B.w
move down
.ps 15
define sadness {
boxwid = 3;
boxht = 1;
textht = .5;
box "\"I run from my depression by" " " "burying myself in code\""
arrow down from last box.s
"Me"
}
sadness();
.PE

15
samples/Pic/ritalin.chem Normal file
View File

@@ -0,0 +1,15 @@
.\" RITALIN: Methylphenidate Hydrochloride
.cstart
.ps 15
size 15
R1: ring double 1,2 3,4 5,6 pointing up
bond 60 length .35 from R1.V2 ; BP
bond 120 length .35 from BP
R2: ring pointing up put N at 1
H above R2
bond up length .35 from BP ; BP
bond -60 length .35 from BP ; O
bond up
double bond 60 length .35 from BP ; O
.ps 10
.cend