diff options
Diffstat (limited to 'Build/source/utils/asymptote/base/plain_shipout.asy')
-rw-r--r-- | Build/source/utils/asymptote/base/plain_shipout.asy | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Build/source/utils/asymptote/base/plain_shipout.asy b/Build/source/utils/asymptote/base/plain_shipout.asy index e96a3a8acb1..ccf94e6c9fd 100644 --- a/Build/source/utils/asymptote/base/plain_shipout.asy +++ b/Build/source/utils/asymptote/base/plain_shipout.asy @@ -1,6 +1,8 @@ // Default file prefix used for inline LaTeX mode string defaultfilename; +string[] file3; + string outprefix(string prefix=defaultfilename) { return stripextension(prefix != "" ? prefix : outname()); } @@ -77,7 +79,8 @@ void shipout(string prefix=defaultfilename, frame f, int limit=2000; if(abs(m.x) > limit || abs(m.y) > limit) f=shift(-m)*f; - shipout(prefix,f,currentpatterns,format,wait,view,xformStack.pop0); + shipout(prefix,f,currentpatterns,format,wait,view, + xformStack.empty() ? null : xformStack.pop0); shipped=true; } @@ -91,8 +94,17 @@ void shipout(string prefix=defaultfilename, picture pic=currentpicture, bool inlinetex=settings.inlinetex; bool prc=prc(format); bool empty3=pic.empty3(); - if(prc && !empty3) + if(prc && !empty3) { + if(settings.render == 0) { + string image=outprefix(prefix)+"+"+(string) file3.length; + if(settings.inlineimage) image += "_0"; + settings.inlinetex=false; + settings.prc=false; + shipout(image,pic,orientation,nativeformat(),view=false,light,P); + settings.prc=true; + } settings.inlinetex=settings.inlineimage; + } frame f=pic.fit(prefix,format,view=view,options,script,light,P); if(!pic.empty2() || settings.render == 0 || prc || empty3) shipout(prefix,orientation(f),format,wait,view); |