diff options
author | Dohyun Kim <nomosnomos@gmail.com> | 2015-05-04 21:17:22 +0900 |
---|---|---|
committer | Dohyun Kim <nomosnomos@gmail.com> | 2015-05-04 21:17:22 +0900 |
commit | df9882e83b16b3ae3695b9bb10deacdbd5bb204d (patch) | |
tree | 1fc510d83a07633651d5ee6d6985d3da6c4286cf | |
parent | 3b391191018f67233e593a5d5053d9f1ace4a509 (diff) | |
download | luaotfload-df9882e83b16b3ae3695b9bb10deacdbd5bb204d.tar.gz |
under latex, order of package loading is irrelevant
-rw-r--r-- | src/luaotfload.sty | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/luaotfload.sty b/src/luaotfload.sty index 63d98ca..7bcde64 100644 --- a/src/luaotfload.sty +++ b/src/luaotfload.sty @@ -46,7 +46,16 @@ \RequireLuaModule{luaotfload-main} % for compatibility with beamer class, which loads pgf package. -% under non-beamer class, tikz (pgf) should be loaded before luaotfload. +\ifcsname AtBeginDocument\endcsname +\AtBeginDocument{ + \@ifpackageloaded{pgf}{ + \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}} + }{}} +\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 |