diff options
author | Karl Berry <karl@freefriends.org> | 2009-12-22 00:57:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-12-22 00:57:04 +0000 |
commit | 7b016bf61c831dcd0c54e899b72b61a5295c550d (patch) | |
tree | c03fa10034b27b21061a767ac69009f5cbd49fd6 /Master/texmf-dist/tex | |
parent | b6eb5e035e6185bd8535ca38509a92e9ef5cdf97 (diff) |
luatextra update (21dec09)
git-svn-id: svn://tug.org/texlive/trunk@16473 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatextra/luatextra.lua | 39 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatextra/luatextra.sty | 57 |
2 files changed, 78 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatextra/luatextra.lua b/Master/texmf-dist/tex/luatex/luatextra/luatextra.lua index 02313348446..2340fec3164 100644 --- a/Master/texmf-dist/tex/luatex/luatextra/luatextra.lua +++ b/Master/texmf-dist/tex/luatex/luatextra/luatextra.lua @@ -21,7 +21,7 @@ do if luatextrapath:sub(1,2) == "./" then luatextrapath = luatextrapath:sub(3) end - texio.write(' ('..luatextrapath) + texio.write_nl('('..luatextrapath) end end @@ -34,9 +34,9 @@ module("luatextra", package.seeall) luatextra.modules = {} luatextra.modules['luatextra'] = { - version = 0.94, + version = 0.95, name = "luatextra", - date = "2009/09/22", + date = "2009/12/16", description = "Additional low level functions for LuaTeX", author = "Elie Roux", copyright = "Elie Roux, 2009", @@ -126,7 +126,7 @@ function luatextra.use_module(name) if path:sub(1,2) == "./" then path = path:sub(3) end - texio.write(' ('..path) + texio.write_nl('('..path) dofile(path) if not luatextra.modules[name] then luatextra.internal_warning(format("You have requested module `%s',\n%s but the file %s does not provide it.", name, luatextra.internal_warning_spaces, filename)) @@ -251,6 +251,37 @@ function luatextra.catcodetabledef_from_tex(name, number) end +function luatextra.catcodetable_do_shortcuts() + local cat = tex.catcodetablenumber + local val = cat['CatcodeTableLaTeX'] + if val then + cat['latex'] = val + end + val = cat['CatcodeTableLaTeXAtLetter'] + if val then + cat['latex-package'] = val + cat['latex-atletter'] = val + end + val = cat['CatcodeTableIniTeX'] + if val then + cat['ini'] = val + end + val = cat['CatcodeTableExpl'] + if val then + cat['expl3'] = val + cat['expl'] = val + end + val = cat['CatcodeTableString'] + if val then + cat['string'] = val + end + val = cat['CatcodeTableOther'] + if val then + cat['other'] = val + end +end + + function luatextra.open_read_file(filename) local path = kpse.find_file(filename) local env = { diff --git a/Master/texmf-dist/tex/luatex/luatextra/luatextra.sty b/Master/texmf-dist/tex/luatex/luatextra/luatextra.sty index db4acd9aa27..090e821a509 100644 --- a/Master/texmf-dist/tex/luatex/luatextra/luatextra.sty +++ b/Master/texmf-dist/tex/luatex/luatextra/luatextra.sty @@ -25,33 +25,37 @@ \fi \else \RequirePackage{ifluatex} + \NeedsTeXFormat{LaTeX2e} + \ProvidesPackage{luatextra} + [2009/12/16 v0.95 LuaTeX extra low-level macros] + \RequirePackage{etex}[1998/03/26] \fi -\expandafter\ifx\csname ProvidesPackage\endcsname\relax - \ifluatex\else + +\def\LuaTeX{Lua\TeX } +\def\LuaLaTeX{Lua\LaTeX } + + +\ifluatex\else + \expandafter\ifx\csname ProvidesPackage\endcsname\relax \immediate\write16{} - \errmessage{Package luatextra Error: This package must be used with LuaTeX} + \immediate\write16{Package luatextra Warning: this package should be used with LuaTeX.} + \else + \PackageWarning{luatextra}{this package should be used with LuaTeX.} \fi + \expandafter\endinput +\fi + +\expandafter\ifx\csname ProvidesPackage\endcsname\relax \def\luatexRequireModule#1#2{\luadirect{luatextra.require_module([[#1]], [[#2]])}} \else - \ifluatex\else - \PackageError{luatextra}{This package must be used with LuaTeX.} - \fi - \NeedsTeXFormat{LaTeX2e} - \ProvidesPackage{luatextra} - [2009/04/15 v0.93 LuaTeX extra low-level macros] \RequirePackage{environ} \NewEnviron{luacode}{\luadirect{\BODY}} \newcommand\luatexRequireModule[2][0]{\luadirect{luatextra.require_module([[#2]], [[#1]])}} - \RequirePackage{etex}[1998/03/26]% \input luatextra-latex.tex \fi -\def\LuaTeX{Lua\TeX } -\def\LuaLaTeX{Lua\LaTeX } - - \ifnum\luatexversion<36 \def\directlua{\pdfprimitive\directlua0} \def\latelua{\pdfprimitive\latelua0} @@ -189,6 +193,8 @@ See the module #1 documentation for explanation.^^J ...^^J}% \newluatexcatcodetable\CatcodeTableString \newluatexcatcodetable\CatcodeTableOther \newluatexcatcodetable\CatcodeTableLaTeX +\newluatexcatcodetable\CatcodeTableLaTeXAtLetter +\newluatexcatcodetable\CatcodeTableExpl \initluatexcatcodetable\CatcodeTableIniTeX \expandafter\ifx\csname @firstofone\endcsname\relax @@ -215,6 +221,27 @@ See the module #1 documentation for explanation.^^J ...^^J}% \catcode126=13 % tilde \catcode127=15 % \saveluatexcatcodetable\CatcodeTableLaTeX + \catcode64=11 % + \saveluatexcatcodetable\CatcodeTableLaTeXAtLetter + \endgroup + \begingroup + \luatexsetcatcoderange{0}{8}{15}% + \catcode9=9 % tab ignored + \catcode11=15 % + \catcode12=13 % form feed + \luatexsetcatcoderange{14}{31}{15}% + \catcode32=9 % space is ignored + \catcode35=6 % hash mark is macro parameter character + \catcode36=3 % dollar (not so sure about the catcode...) + \catcode38=4 % ampersand + \catcode58=11 % colon letter + \catcode94=7 % circumflex is superscript character + \catcode95=11 % underscore letter + \catcode123=1 % left brace is begin-group character + \catcode125=2 % right brace is end-group character + \catcode126=10 % tilde is a space char. + \catcode127=15 % + \saveluatexcatcodetable\CatcodeTableExpl \endgroup \@makeother{0}% nul \@makeother{13}% carriage return @@ -231,6 +258,8 @@ See the module #1 documentation for explanation.^^J ...^^J}% \ltxtra@AtEnd +\luadirect{luatextra.catcodetable_do_shortcuts()} + \let\newluaattribute\newluatexattribute \let\luaattribute\luatexattribute |