summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-27 22:55:27 +0000
committerKarl Berry <karl@freefriends.org>2014-04-27 22:55:27 +0000
commit1e68ac74cb516c2688e64cdc6a15480551b2f80d (patch)
tree1e78d3810e87dec71e5cb9ad08da71f1db7768f4 /Master/texmf-dist/asymptote
parent55e45a0d588de0392d2198753e45d75cd58f9e4d (diff)
asymptote 2.25
git-svn-id: svn://tug.org/texlive/trunk@33704 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote')
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasy2asy.py4
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyCodeEditor.py19
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyMainWin.py2
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyOptions.py2
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyVersion.py2
-rw-r--r--Master/texmf-dist/asymptote/asy-keywords.el2
-rw-r--r--Master/texmf-dist/asymptote/embed.asy2
-rw-r--r--Master/texmf-dist/asymptote/plain_arrows.asy14
-rw-r--r--Master/texmf-dist/asymptote/three_arrows.asy8
-rw-r--r--Master/texmf-dist/asymptote/version.asy2
10 files changed, 30 insertions, 27 deletions
diff --git a/Master/texmf-dist/asymptote/GUI/xasy2asy.py b/Master/texmf-dist/asymptote/GUI/xasy2asy.py
index 984bd1f5dd9..3a2c1bcbe7b 100755
--- a/Master/texmf-dist/asymptote/GUI/xasy2asy.py
+++ b/Master/texmf-dist/asymptote/GUI/xasy2asy.py
@@ -65,6 +65,10 @@ def startQuickAsy():
except:
quickAsyFailed = True
+def stopQuickAsy():
+ if quickAsyRunning():
+ fout.write("exit;\n");
+
def getAsyTempDir():
return AsyTempDir
diff --git a/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py b/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py
index 1f7ad60328f..d09196a41be 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py
@@ -21,21 +21,26 @@ import xasyOptions
def getText(text=""):
"""Launch the external editor"""
temp = mkstemp()
- tempf = fdopen(temp[0],"r+w")
+ tempf = fdopen(temp[0],"w")
tempf.write(text)
- tempf.flush()
+ tempf.close()
try:
- cmdpath,cmd = path.split(xasyOptions.options['externalEditor'])
+ cmdpath,cmd = path.split(path.expandvars(xasyOptions.options['externalEditor']))
split_cmd = split(cmd)
cmdpart = [path.join(cmdpath,split_cmd[0])]
argpart = split_cmd[1:]+[temp[1]]
arglist = cmdpart+argpart
call(arglist)
- except:
+ except Exception as e:
raise Exception('Error launching external editor.')
- tempf.seek(0)
- text = tempf.read()
- remove(temp[1])
+
+ try:
+ tempf = open(temp[1],"r")
+ text = tempf.read()
+ tempf.close()
+ remove(temp[1])
+ except Exception as e:
+ raise Exception('Error reading from external editor.')
return text
if __name__ == '__main__':
diff --git a/Master/texmf-dist/asymptote/GUI/xasyMainWin.py b/Master/texmf-dist/asymptote/GUI/xasyMainWin.py
index e3a0044011a..657d24ba81b 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyMainWin.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyMainWin.py
@@ -566,6 +566,8 @@ class xasyMainWin:
os.rmdir(getAsyTempDir())
except:
pass
+
+ stopQuickAsy()
self.parent.destroy()
def openFile(self,name):
diff --git a/Master/texmf-dist/asymptote/GUI/xasyOptions.py b/Master/texmf-dist/asymptote/GUI/xasyOptions.py
index 4406687cbf4..17d58d760e5 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyOptions.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyOptions.py
@@ -33,7 +33,7 @@ defaultOptions = {
}
if sys.platform[:3] == "win":
- defaultOptions['externalEditor'] = "notepad.exe"
+ defaultOptions['externalEditor'] = "%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe"
else:
defaultOptions['externalEditor'] = "emacs"
diff --git a/Master/texmf-dist/asymptote/GUI/xasyVersion.py b/Master/texmf-dist/asymptote/GUI/xasyVersion.py
index aefd00148e1..48b2683382f 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyVersion.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyVersion.py
@@ -1,2 +1,2 @@
#!/usr/bin/env python
-xasyVersion = "2.25"
+xasyVersion = "2.26"
diff --git a/Master/texmf-dist/asymptote/asy-keywords.el b/Master/texmf-dist/asymptote/asy-keywords.el
index f2802d6aecc..5156a830ea3 100644
--- a/Master/texmf-dist/asymptote/asy-keywords.el
+++ b/Master/texmf-dist/asymptote/asy-keywords.el
@@ -2,7 +2,7 @@
;; This file is automatically generated by asy-list.pl.
;; Changes will be overwritten.
;;
-(defvar asy-keywords-version "2.25")
+(defvar asy-keywords-version "2.26")
(defvar asy-keyword-name '(
and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator ))
diff --git a/Master/texmf-dist/asymptote/embed.asy b/Master/texmf-dist/asymptote/embed.asy
index 30f2881da04..ad2b710c36b 100644
--- a/Master/texmf-dist/asymptote/embed.asy
+++ b/Master/texmf-dist/asymptote/embed.asy
@@ -10,7 +10,7 @@ if(latex() && !settings.inlineimage) {
}
// For documentation of the options see
-// http://www.ctan.org/tex-archive/macros/latex/contrib/media9/doc/media9.pdf
+// http://mirror.ctan.org/macros/latex/contrib/media9/doc/media9.pdf
// Embed PRC or SWF content in pdf file
string embedplayer(string name, string text="", string options="",
diff --git a/Master/texmf-dist/asymptote/plain_arrows.asy b/Master/texmf-dist/asymptote/plain_arrows.asy
index 3ae60938ed1..d4220103ce0 100644
--- a/Master/texmf-dist/asymptote/plain_arrows.asy
+++ b/Master/texmf-dist/asymptote/plain_arrows.asy
@@ -36,12 +36,12 @@ struct arrowhead
filltype defaultfilltype(pen) {return FillDraw;}
}
-real[] arrowbasepoints(path base, path left, path right)
+real[] arrowbasepoints(path base, path left, path right, real default=0)
{
real[][] Tl=transpose(intersections(left,base));
real[][] Tr=transpose(intersections(right,base));
- return new real[] {Tl.length > 0 ? Tl[0][0] : 0,
- Tr.length > 0 ? Tr[0][0] : 0};
+ return new real[] {Tl.length > 0 ? Tl[0][0] : default,
+ Tr.length > 0 ? Tr[0][0] : default};
}
path arrowbase(path r, pair y, real t, real size)
@@ -87,12 +87,12 @@ SimpleHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
path base=arrowbase(r,y,t,size);
path left=rotate(-angle,x)*r;
path right=rotate(angle,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
pair denom=point(right,T[1])-y;
real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
path left=rotate(-angle*factor,x)*r;
path right=rotate(angle*factor,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
return subpath(left,T[0],0)--subpath(right,0,T[1]);
};
@@ -114,12 +114,12 @@ arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb)
path base=arrowbase(r,y,t,size);
path left=rotate(-angle,x)*r;
path right=rotate(angle,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
pair denom=point(right,T[1])-y;
real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
path left=rotate(-angle*factor,x)*r;
path right=rotate(angle*factor,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
left=subpath(left,0,T[0]);
right=subpath(right,T[1],0);
pair pl0=point(left,0), pl1=relpoint(left,1);
diff --git a/Master/texmf-dist/asymptote/three_arrows.asy b/Master/texmf-dist/asymptote/three_arrows.asy
index 5b9bd45d56f..4398b9bd781 100644
--- a/Master/texmf-dist/asymptote/three_arrows.asy
+++ b/Master/texmf-dist/asymptote/three_arrows.asy
@@ -245,14 +245,6 @@ TeXHead3.head=new surface(path3 g, position position=EndPoint,
}
};
-real[] arrowbasepoints(path3 base, path3 left, path3 right)
-{
- real[][] Tl=transpose(intersections(left,base));
- real[][] Tr=transpose(intersections(right,base));
- return new real[] {Tl.length > 0 ? Tl[0][0] : 0,
- Tr.length > 0 ? Tr[0][0] : 0};
-}
-
path3 arrowbase(path3 r, triple y, real t, real size)
{
triple perp=2*size*perp(dir(r,t));
diff --git a/Master/texmf-dist/asymptote/version.asy b/Master/texmf-dist/asymptote/version.asy
index da1820b0a23..f3013d0d3d8 100644
--- a/Master/texmf-dist/asymptote/version.asy
+++ b/Master/texmf-dist/asymptote/version.asy
@@ -1 +1 @@
-string VERSION="2.25";
+string VERSION="2.26";