From 6c0ddfe655a39b71d1ab6a4a95d57a7ea0d94243 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 27 Mar 2020 03:01:30 +0000 Subject: CTAN sync 202003270301 --- graphics/asymptote/picture.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'graphics/asymptote/picture.cc') diff --git a/graphics/asymptote/picture.cc b/graphics/asymptote/picture.cc index 7047254751..da05346733 100644 --- a/graphics/asymptote/picture.cc +++ b/graphics/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 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("inlineimage") || getSetting("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; -- cgit v1.2.3