summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/texfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/texfile.cc')
-rw-r--r--Build/source/utils/asymptote/texfile.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/Build/source/utils/asymptote/texfile.cc b/Build/source/utils/asymptote/texfile.cc
index 15410d569cd..3f5de393c50 100644
--- a/Build/source/utils/asymptote/texfile.cc
+++ b/Build/source/utils/asymptote/texfile.cc
@@ -148,11 +148,16 @@ void texfile::beginlayer(const string& psname, bool postscript)
*out << "{\\catcode`\"=12%" << newl
<< "\\includegraphics";
bool pdf=settings::pdf(texengine);
+ string quote;
+ if(stripDir(psname) != psname)
+ quote="\"";
+
if(!pdf)
*out << "[bb=" << box.left << " " << box.bottom << " "
<< box.right << " " << box.top << "]";
- if(pdf) *out << "{\"" << stripExt(psname) << "\".pdf}%" << newl;
- else *out << "{\"" << psname << "\"}%" << newl;
+ if(pdf) *out << "{" << quote << stripExt(psname) << quote << ".pdf}%"
+ << newl;
+ else *out << "{" << quote << psname << quote << "}%" << newl;
*out << "}%" << newl;
}
if(!inlinetex)