summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost/metauml/metauml_templates.mp
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/metapost/metauml/metauml_templates.mp')
-rw-r--r--Master/texmf-dist/metapost/metauml/metauml_templates.mp16
1 files changed, 14 insertions, 2 deletions
diff --git a/Master/texmf-dist/metapost/metauml/metauml_templates.mp b/Master/texmf-dist/metapost/metauml/metauml_templates.mp
index f4125097108..4ce5fc44e78 100644
--- a/Master/texmf-dist/metapost/metauml/metauml_templates.mp
+++ b/Master/texmf-dist/metapost/metauml/metauml_templates.mp
@@ -20,8 +20,20 @@ if known _metauml_templates_mp:
fi;
_metauml_templates_mp:=1;
-input metauml_defaults;
-input util_log;
+% Sadly, this copy of the macro is needed to prevent multiple file loads being shown by MetaPost.
+% The guard values (such as _metauml_mp) do ensure that the file isn't loaded multiple times,
+% but this macro makes sure that MetaPost won't try to load the file and display a message for that.
+def inputonce text libraryFile=
+ if not known scantokens ("_" & str libraryFile & "_mp"):
+ %includeonce% show "Loading " & str libraryFile;
+ scantokens ("input " & str libraryFile);
+ else:
+ %includeonce% show str libraryFile & " already loaded.";
+ fi;
+enddef;
+
+inputonce metauml_defaults;
+inputonce util_log;
vardef TemplateInfo@#=
color @#background;