summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-22 14:41:35 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-22 14:41:35 +0200
commit83d1a96aab50cc552604357dedc0b4810914c31a (patch)
tree45c3b96c26b21ed37ee87efbcadad75eb1cae14d
parent3598f72232426c45f81165df60211b65a2bbcf8a (diff)
downloadluatexbase-83d1a96aab50cc552604357dedc0b4810914c31a.tar.gz
Filenames are not printed if called by texlua
-rw-r--r--luatexbase-loader.dtx15
1 files changed, 14 insertions, 1 deletions
diff --git a/luatexbase-loader.dtx b/luatexbase-loader.dtx
index 77b9b9b..b8e5098 100644
--- a/luatexbase-loader.dtx
+++ b/luatexbase-loader.dtx
@@ -283,6 +283,17 @@ module('luatexbase', package.seeall)
kpse.set_program_name("luatex")
% \end{macrocode}
%
+% In \LaTeX, it's traditional to print the included file paths. We don't want
+% to do this for scripts using texlua... Currently there is no perfect check
+% of texlua vs. luatex, so we check for the token table.
+%
+% \begin{macrocode}
+local print_included_path = false
+if token then
+ print_included_path = true
+end
+% \end{macrocode}
+%
% Emulate (approximatively) kpse's lua format search. More precisely,
% combine the search path of |texmfscripts| and |tex| in order to
% approximate |LUAINPUTS|. But we need to handle suffixes ourselves.
@@ -357,7 +368,9 @@ local function load_module(mod)
if not loader then
return "\n\t[luatexbase.loader] Loading error:\n\t"..error
end
- texio.write_nl("("..file..")")
+ if print_included_path then
+ texio.write_nl("("..file..")")
+ end
return loader
end
% \end{macrocode}