summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/texfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/texfile.h')
-rw-r--r--Build/source/utils/asymptote/texfile.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/texfile.h b/Build/source/utils/asymptote/texfile.h
index 0a99b4aafd7..4a51459ee71 100644
--- a/Build/source/utils/asymptote/texfile.h
+++ b/Build/source/utils/asymptote/texfile.h
@@ -56,15 +56,16 @@ void latexfontencoding(T& out)
template<class T>
void texpreamble(T& out, mem::list<string>& preamble=processData().TeXpreamble,
- bool ASYalign=true)
+ bool ASYalign=true, bool ASYbox=true)
{
texuserpreamble(out,preamble);
string texengine=settings::getSetting<string>("tex");
if(settings::context(texengine))
out << "\\disabledirectives[system.errorcontext]%" << newl;
+ if(ASYbox)
+ out << "\\newbox\\ASYbox" << newl
+ << "\\newdimen\\ASYdimen" << newl;
out << "\\def\\ASYprefix{" << stripFile(settings::outname()) << "}" << newl
- << "\\newbox\\ASYbox" << newl
- << "\\newdimen\\ASYdimen" << newl
<< "\\long\\def\\ASYbase#1#2{\\leavevmode\\setbox\\ASYbox=\\hbox{#1}%"
<< "\\ASYdimen=\\ht\\ASYbox%" << newl
<< "\\setbox\\ASYbox=\\hbox{#2}\\lower\\ASYdimen\\box\\ASYbox}" << newl;