summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/picture.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-06-03 23:38:09 +0000
committerKarl Berry <karl@freefriends.org>2009-06-03 23:38:09 +0000
commit62e3ddd373e2bd1e5adbc7e45af95ba7150c03e6 (patch)
treebe497aba8d1c52ad428bf5649c53abb9fa59f8ff /Build/source/utils/asymptote/picture.cc
parent37f7f3460f7d20564974e440e873a84ca4570529 (diff)
asymptote 1.75
git-svn-id: svn://tug.org/texlive/trunk@13620 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/picture.cc')
-rw-r--r--Build/source/utils/asymptote/picture.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc
index 7b41fd7b530..827acc6ea70 100644
--- a/Build/source/utils/asymptote/picture.cc
+++ b/Build/source/utils/asymptote/picture.cc
@@ -20,7 +20,7 @@ using namespace settings;
using namespace gl;
texstream::~texstream() {
- string name=stripFile(outname())+"texput.";
+ string name=stripTeXFile(outname())+"texput.";
unlink((name+"aux").c_str());
unlink((name+"log").c_str());
unlink((name+"out").c_str());
@@ -213,7 +213,7 @@ void picture::texinit()
return;
}
- string name=stripFile(outname())+"texput.aux";
+ string name=stripTeXFile(outname())+"texput.aux";
const char *cname=name.c_str();
ofstream writeable(cname);
if(!writeable)
@@ -227,9 +227,9 @@ void picture::texinit()
if(context) {
// Create a null texput.tex file as a portable way of tricking context
// to enter interactive mode (pending the implementation of --pipe).
- string texput=stripFile(outname())+"texput.tex";
+ string texput=stripTeXFile(outname())+"texput.tex";
ofstream(texput.c_str());
- cmd << texprogram() << " --scrollmode --purgeall " << texput;
+ cmd << texprogram() << " --scrollmode " << texput;
} else
cmd << texprogram() << " \\scrollmode";
@@ -256,7 +256,7 @@ bool picture::texprocess(const string& texname, const string& outname,
string program=texprogram();
ostringstream cmd;
bool context=settings::context(getSetting<string>("tex"));
- cmd << program << (context ? " --nonstopmode --purgeall '" :
+ cmd << program << (context ? " --nonstopmode '" :
" \\nonstopmode\\input '") << texname << "'";
bool quiet=verbose <= 1;
status=System(cmd,quiet ? 1 : 0,true,"texpath",texpathmessage());
@@ -265,7 +265,7 @@ bool picture::texprocess(const string& texname, const string& outname,
if(status) {
if(quiet) {
ostringstream cmd;
- cmd << program << (context ? " --scrollmode --purgeall '" :
+ cmd << program << (context ? " --scrollmode '" :
" \\scrollmode\\input '") << texname << "'";
System(cmd,0);
}
@@ -531,7 +531,8 @@ bool picture::shipout(picture *preamble, const string& Prefix,
getSetting<string>("tex") != "none";
Labels=labels || TeXmode;
- pdf=settings::pdf(getSetting<string>("tex"));
+ string texengine=getSetting<string>("tex");
+ pdf=settings::pdf(texengine);
bool standardout=Prefix == "-";
string prefix=standardout ? "out" : Prefix;
@@ -682,6 +683,7 @@ bool picture::shipout(picture *preamble, const string& Prefix,
}
}
+ bool context=settings::context(texengine);
if(status) {
if(TeXmode) {
if(Labels && verbose > 0) cout << "Wrote " << texname << endl;
@@ -689,6 +691,7 @@ bool picture::shipout(picture *preamble, const string& Prefix,
} else {
if(Labels) {
tex->epilogue();
+ if(context) prefix=stripDir(prefix);
status=texprocess(texname,prename,prefix,bboxshift);
delete tex;
if(!getSetting<bool>("keep")) {
@@ -701,9 +704,11 @@ bool picture::shipout(picture *preamble, const string& Prefix,
if(xobject) {
if(transparency && pngxformat)
status=(epstopdf(prename,Outname(prefix,"pdf",standardout)) == 0);
- } else
+ } else {
+ if(context) prename=stripDir(prename);
status=postprocess(prename,outname,outputformat,magnification,wait,
view);
+ }
}
}
}