diff options
Diffstat (limited to 'macros/luatex/generic/penlight/penlight.sty')
-rw-r--r-- | macros/luatex/generic/penlight/penlight.sty | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/macros/luatex/generic/penlight/penlight.sty b/macros/luatex/generic/penlight/penlight.sty index b9f5a9490a..936cb6dce7 100644 --- a/macros/luatex/generic/penlight/penlight.sty +++ b/macros/luatex/generic/penlight/penlight.sty @@ -1,6 +1,6 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2022-02-27 -% Copyright (C) 2021 Kale Ewasiuk +% 2022-03-03 +% Copyright (C) 2021-2022 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE % OR OTHER DEALINGS IN THE SOFTWARE. -\ProvidesPackage{penlight}[2022-02-27] +\ProvidesPackage{penlight}[2022-03-03] \RequirePackage{luacode} @@ -32,17 +32,23 @@ }} \DeclareOption{penlight}{\luadirect{ penlight = require('penlight') - __PENLIGHT__ = 'penlight' + __PENLIGHT__ = 'penlight' }} \DeclareOption{stringx}{\luadirect{_G[__PENLIGHT__].stringx.import()}} \DeclareOption{format}{\luadirect{_G[__PENLIGHT__].stringx.format_operator()}} \DeclareOption{func}{\luadirect{_G[__PENLIGHT__].utils.import(__PENLIGHT__..'.func')}} -\DeclareOption{extras}{\luadirect{require('penlightextras')}} -\DeclareOption{extrasnoglobals}{ +\DeclareOption{extras}{\luadirect{require'penlightextras'}} +\DeclareOption{extrasnoglobals}{\luadirect{ __PL_NO_GLOBALS__ = true - \luadirect{require('penlightextras') - }} + require'penlightextras' +}} \ProcessOptions*\relax + +\luadirect{ +if __PENLIGHT__ == nil then + tex.print('\\PackageError{penlight}{penlight or pl option must be passed to penlight as the first option}{}') +end +} |