diff options
author | Norbert Preining <norbert@preining.info> | 2020-03-27 03:01:30 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-03-27 03:01:30 +0000 |
commit | 6c0ddfe655a39b71d1ab6a4a95d57a7ea0d94243 (patch) | |
tree | 65567ae2d29e1e8af56375fccfc1debc19b190c5 /graphics/asymptote/picture.cc | |
parent | 2bd4f7f317b392c32ce18c70d03fd5ba9ddd9e6d (diff) |
CTAN sync 202003270301
Diffstat (limited to 'graphics/asymptote/picture.cc')
-rw-r--r-- | graphics/asymptote/picture.cc | 16 |
1 files changed, 12 insertions, 4 deletions
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<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; |