summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/picture.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-26 21:33:06 +0000
committerKarl Berry <karl@freefriends.org>2020-03-26 21:33:06 +0000
commit9d8ff0db40a3ccd5826fee73d7e3fb916b9f1841 (patch)
tree3b9d9b28b50a95993e93aef2033b44aee075a2c6 /Build/source/utils/asymptote/picture.cc
parent43d422c5abd7a05708ebb2dab98b18043436fd08 (diff)
asy 2.65 sources
git-svn-id: svn://tug.org/texlive/trunk@54566 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/picture.cc')
-rw-r--r--Build/source/utils/asymptote/picture.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc
index 7047254751f..da053467338 100644
--- a/Build/source/utils/asymptote/picture.cc
+++ b/Build/source/utils/asymptote/picture.cc
@@ -277,10 +277,12 @@ bbox picture::bounds()
if(havelabels()) texinit();
nodelist::iterator p=nodes.begin();
+ processDataStruct& pd=processData();
+
for(size_t i=0; i < lastnumber; ++i) ++p;
for(; p != nodes.end(); ++p) {
assert(*p);
- (*p)->bounds(b_cached,processData().tex,labelbounds,bboxstack);
+ (*p)->bounds(b_cached,pd.tex,labelbounds,bboxstack);
// Optimization for interpreters with fixed stack limits.
if((*p)->endclip()) {
@@ -369,27 +371,31 @@ void texinit()
mem::vector<string> cmd;
cmd.push_back(texprogram());
+ string texfatal;
if(context) {
cmd.push_back("--pipe");
} else {
if(!dir.empty())
cmd.push_back("-output-directory="+dir.substr(0,dir.length()-1));
+ string jobname="texput";
if(getSetting<bool>("inlineimage") || getSetting<bool>("inlinetex")) {
string name=stripDir(stripExt((outname())));
size_t pos=name.rfind("-");
if(pos < string::npos) {
name=stripExt(name).substr(0,pos);
unlink((name+".aux").c_str());
- cmd.push_back("-jobname="+name.substr(0,pos));
+ jobname=name.substr(0,pos);
+ cmd.push_back("-jobname="+jobname);
#ifdef __MSDOS__
cmd.push_back("NUL"); // For MikTeX
#endif
}
}
cmd.push_back("\\scrollmode");
+ texfatal="Transcript written on "+jobname+".log.\n";
}
- pd.tex.open(cmd,"texpath",texpathmessage());
+ pd.tex.open(cmd,"texpath",texpathmessage(),Strdup(texfatal));
pd.tex.wait("\n*");
pd.tex << "\n";
texdocumentclass(pd.tex,true);
@@ -1045,6 +1051,8 @@ bool picture::shipout(picture *preamble, const string& Prefix,
for(nodelist::const_iterator r=begin.begin(); r != begin.end(); ++r)
(*r)->draw(&out);
+ processDataStruct &pd=processData();
+
for(; p != nodes.end(); ++p) {
assert(*p);
if(Labels && (*p)->islayer()) break;
@@ -1108,7 +1116,7 @@ bool picture::shipout(picture *preamble, const string& Prefix,
static pair zero;
L=new drawLabel(cmd.str(),"",identity,pair(m.getx(),M.gety()),zero,P);
texinit();
- L->bounds(b_cached,processData().tex,labelbounds,bboxstack);
+ L->bounds(b_cached,pd.tex,labelbounds,bboxstack);
postscript=true;
}
break;