diff options
author | David Carlisle <d.p.carlisle@gmail.com> | 2015-07-28 18:39:05 +0100 |
---|---|---|
committer | David Carlisle <d.p.carlisle@gmail.com> | 2015-07-28 18:39:05 +0100 |
commit | 57edc8b592575a0fff30b0a23e6425adc04b974f (patch) | |
tree | fade7f5af29d5cb7f1586fad84948aca2936045e /src/luaotfload.sty | |
parent | 11cab572fa7addf670c958e680aaf81299f201ac (diff) | |
download | luaotfload-57edc8b592575a0fff30b0a23e6425adc04b974f.tar.gz |
Patch to not assume luatexbase needs to be loaded
The ltluatex code being trialed at
https://github.com/josephwright/ltluatex
includes a luatexbase emulation package that allows
luaotfload to run without change but the core code that
is intended to be included in future latex formats requires
two small changes and also would require that luaotfload
detect that luatex support is already provided and so not
load luatexbase.
\RequireLuaModule is not defined by default in TeX and
luatexbase.reset_callback is not defined by default in lua
in the core ltluatex code.
Diffstat (limited to 'src/luaotfload.sty')
-rw-r--r-- | src/luaotfload.sty | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/luaotfload.sty b/src/luaotfload.sty index 34f9a87..bff949b 100644 --- a/src/luaotfload.sty +++ b/src/luaotfload.sty @@ -35,16 +35,24 @@ \let\ifluaotfloadloaded\endinput \bgroup\expandafter\expandafter\expandafter\egroup \expandafter\ifx\csname selectfont\endcsname\relax + \ifdefined\newluafunction\else \input luatexbase.sty + \fi \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luaotfload}% %% FIXME The date is meaningless, we need to find a way to %% use the git revision instead. [2015/03/29 v2.6 OpenType layout system] - \RequirePackage{luatexbase} + \ifdefined\newluafunction\else + \RequirePackage{luatexbase} + \fi +\fi +\ifdefined \RequireLuaModule + \RequireLuaModule{luaotfload-main} +\else + \directlua{require("luaotfload-main")} \fi -\RequireLuaModule{luaotfload-main} % for compatibility with beamer class, which loads pgf package. \ifcsname selectfont\endcsname |