diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2015-05-05 22:59:59 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2015-05-05 22:59:59 +0200 |
commit | c9ee59f95e2d1f73d9c10b010ccbb1d09df4014c (patch) | |
tree | ae1bc3370698db60291df426c5b531e867d63b60 /src/luaotfload.sty | |
parent | fe729cc9736391f61a75ccbee5c0fc162a2c99bd (diff) | |
parent | 0092480f01e16c50a81b2cbe6bacde51d746802a (diff) | |
download | luaotfload-c9ee59f95e2d1f73d9c10b010ccbb1d09df4014c.tar.gz |
Merge pull request #1 from dohyunkim/phg
colors: node processing routine rewritten
Diffstat (limited to 'src/luaotfload.sty')
-rw-r--r-- | src/luaotfload.sty | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/luaotfload.sty b/src/luaotfload.sty index 100fb72..6ea4c0a 100644 --- a/src/luaotfload.sty +++ b/src/luaotfload.sty @@ -33,7 +33,7 @@ \csname ifluaotfloadloaded\endcsname \let\ifluaotfloadloaded\endinput \bgroup\expandafter\expandafter\expandafter\egroup -\expandafter\ifx\csname ProvidesPackage\endcsname\relax +\expandafter\ifx\csname selectfont\endcsname\relax \input luatexbase.sty \else \NeedsTeXFormat{LaTeX2e} @@ -45,3 +45,21 @@ \fi \RequireLuaModule{luaotfload-main} +% for compatibility with beamer class, which loads pgf package. +\ifcsname selectfont\endcsname + \AtBeginDocument{\@ifpackageloaded{pgfsys}{ + \csname newtoks\endcsname\pgf@sys@pgf@resource@list@extgs@toks + \def\pgf@sys@pgf@resource@list@extgs{\the\pgf@sys@pgf@resource@list@extgs@toks} + \def\pgf@sys@addpdfresource@extgs@plain#1{\global\pgf@sys@pgf@resource@list@extgs@toks + \expandafter{\the\pgf@sys@pgf@resource@list@extgs@toks #1}} + }{}} +\endinput\fi +% under plain tex, tikz (pgf) should be loaded before luaotfload. +\ifcsname pgf@sys@pgf@resource@list@extgs\endcsname\else\endinput\fi +\count255=\the\catcode`@\relax +\catcode`@=11\relax +\newtoks\pgf@sys@pgf@resource@list@extgs@toks +\def\pgf@sys@pgf@resource@list@extgs{\the\pgf@sys@pgf@resource@list@extgs@toks} +\def\pgf@sys@addpdfresource@extgs@plain#1{\global\pgf@sys@pgf@resource@list@extgs@toks + \expandafter{\the\pgf@sys@pgf@resource@list@extgs@toks #1}} +\catcode`@=\the\count255\relax |