summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/lualatex/luatextra/luatextra.sty31
-rw-r--r--Master/texmf-dist/tex/luatex/luatextra/luatextra-latex.tex16
-rw-r--r--Master/texmf-dist/tex/luatex/luatextra/luatextra.lua147
-rw-r--r--Master/texmf-dist/tex/luatex/luatextra/luatextra.sty108
4 files changed, 31 insertions, 271 deletions
diff --git a/Master/texmf-dist/tex/lualatex/luatextra/luatextra.sty b/Master/texmf-dist/tex/lualatex/luatextra/luatextra.sty
new file mode 100644
index 00000000000..f31958299ae
--- /dev/null
+++ b/Master/texmf-dist/tex/lualatex/luatextra/luatextra.sty
@@ -0,0 +1,31 @@
+%%
+%% This is file `luatextra.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% luatextra.dtx (with options: `package')
+%%
+%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
+%%
+%% This work is under the CC0 license.
+%% See source file 'luatextra.dtx' for details.
+%%
+\ProvidesPackage{luatextra}[2010/10/10 v1.0 Loading usual LuaLaTeX packages]
+\RequirePackage{ifluatex}
+\ifluatex\else
+ \PackageError{luatextra}{LuaTeX is required for this package. Aborting.}{%
+ This package can only be used with the LuaTeX engine^^J%
+ (command `lualatex' or `luatex').^^J%
+ Package loading has been stopped to prevent additional errors.}
+ \expandafter\endinput
+\fi
+\RequirePackage{luatexbase}
+\RequireLuaModule{lualibs}
+\RequirePackage{fontspec}
+\RequirePackage{metalogo}
+\RequirePackage{luacode}
+\RequirePackage{fixltx2e}
+\endinput
+%%
+%% End of file `luatextra.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatextra/luatextra-latex.tex b/Master/texmf-dist/tex/luatex/luatextra/luatextra-latex.tex
deleted file mode 100644
index 9b53a13c3c2..00000000000
--- a/Master/texmf-dist/tex/luatex/luatextra/luatextra-latex.tex
+++ /dev/null
@@ -1,16 +0,0 @@
-%%
-%% This is file `luatextra-latex.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% luatextra.dtx (with options: `latex')
-%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatextra.dtx' for details.
-%%
-\endinput
-%%
-%% End of file `luatextra-latex.tex'.
diff --git a/Master/texmf-dist/tex/luatex/luatextra/luatextra.lua b/Master/texmf-dist/tex/luatex/luatextra/luatextra.lua
deleted file mode 100644
index 164d67a8ea8..00000000000
--- a/Master/texmf-dist/tex/luatex/luatextra/luatextra.lua
+++ /dev/null
@@ -1,147 +0,0 @@
---
--- This is file `luatextra.lua',
--- generated with the docstrip utility.
---
--- The original source files were:
---
--- luatextra.dtx (with options: `lua')
---
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatextra.dtx' for details.
---
-module("luatextra", package.seeall)
-luatexbase.provides_module {
- version = 0.99,
- name = "luatextra",
- date = "2010/10/08",
- description = "Additional low level functions for LuaTeX",
- author = "Elie Roux and Manuel Pegourie-Gonnard",
- copyright = "Elie Roux, 2009 and Manuel Pegourie-Gonnard, 2010",
- license = "CC0",
-}
-local format = string.format
-function luatextra.open_read_file(filename)
- local path = kpse.find_file(filename)
- local env = {
- ['filename'] = filename,
- ['path'] = path,
- }
- luatexbase.call_callback('pre_read_file', env)
- path = env.path
- if not path then
- return
- end
- local f = env.file
- if not f then
- f = io.open(path)
- env.file = f
- end
- if not f then
- return
- end
- env.reader = luatextra.reader
- env.close = luatextra.close
- return env
-end
-function luatextra.reader(env)
- local line = (env.file):read()
- line = luatexbase.call_callback('file_reader', env, line)
- return line
-end
-function luatextra.close(env)
- (env.file):close()
- luatexbase.call_callback('file_close', env)
-end
-function luatextra.default_reader(env, line)
- return line
-end
-function luatextra.default_close(env)
- return
-end
-function luatextra.default_pre_read(env)
- return env
-end
-do
- if tex.luatexversion < 36 then
- fontloader = fontforge
- end
-end
-function luatextra.find_font(name)
- local types = {'ofm', 'ovf', 'opentype fonts', 'truetype fonts'}
- local path = kpse.find_file(name)
- if path then return path end
- for _,t in pairs(types) do
- path = kpse.find_file(name, t)
- if path then return path end
- end
- return nil
-end
-function luatextra.font_load_error(error)
- luatextra.module_warning('luatextra', string.format('%s\nloading lmr10 instead...', error))
-end
-function luatextra.load_default_font(size)
- return font.read_tfm("lmr10", size)
-end
-function luatextra.define_font(name, size)
- if (size < 0) then size = (- 655.36) * size end
- local fontinfos = {
- asked_name = name,
- name = name,
- size = size
- }
- callback.call('font_syntax', fontinfos)
- name = fontinfos.name
- local path = fontinfos.path
- if not path then
- path = luatextra.find_font(name)
- fontinfos.path = luatextra.find_font(name)
- end
- if not path then
- luatextra.font_load_error("unable to find font "..name)
- return luatextra.load_default_font(size)
- end
- if not fontinfos.filename then
- fontinfos.filename = file.basename(path)
- end
- local ext = file.suffix(path)
- local f
- if ext == 'tfm' or ext == 'ofm' then
- f = font.read_tfm(name, size)
- elseif ext == 'vf' or ext == 'ovf' then
- f = font.read_vf(name, size)
- elseif ext == 'ttf' or ext == 'otf' or ext == 'ttc' then
- f = luatexbase.call_callback('open_otf_font', fontinfos)
- else
- luatextra.font_load_error("unable to determine the type of font "..name)
- f = luatextra.load_default_font(size)
- end
- if not f then
- luatextra.font_load_error("unable to load font "..name)
- f = luatextra.load_default_font(size)
- end
- luatexbase.call_callback('post_font_opening', f, fontinfos)
- return f
-end
-function luatextra.default_font_syntax(fontinfos)
- return
-end
-function luatextra.default_open_otf(fontinfos)
- return nil
-end
-function luatextra.default_post_font(f, fontinfos)
- return true
-end
-function luatextra.register_font_callback()
- luatexbase.add_to_callback('define_font', luatextra.define_font, 'luatextra.define_font')
-end
- luatexbase.create_callback('pre_read_file', 'simple', luatextra.default_pre_read)
- luatexbase.create_callback('file_reader', 'data', luatextra.default_reader)
- luatexbase.create_callback('file_close', 'simple', luatextra.default_close)
- luatexbase.add_to_callback('open_read_file', luatextra.open_read_file, 'luatextra.open_read_file')
- luatexbase.create_callback('font_syntax', 'simple', luatextra.default_font_syntax)
- luatexbase.create_callback('open_otf_font', 'first', luatextra.default_open_otf)
- luatexbase.create_callback('post_font_opening', 'simple', luatextra.default_post_font)
---
--- End of File `luatextra.lua'.
diff --git a/Master/texmf-dist/tex/luatex/luatextra/luatextra.sty b/Master/texmf-dist/tex/luatex/luatextra/luatextra.sty
deleted file mode 100644
index 6ab2a11f48b..00000000000
--- a/Master/texmf-dist/tex/luatex/luatextra/luatextra.sty
+++ /dev/null
@@ -1,108 +0,0 @@
-%%
-%% This is file `luatextra.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% luatextra.dtx (with options: `package')
-%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatextra.dtx' for details.
-%%
-\csname ifluatextraloaded\endcsname
-\let\ifluatextraloaded\endinput
-
-
-\bgroup\expandafter\expandafter\expandafter\egroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \expandafter\ifx\csname ifluatex\endcsname\relax
- \input ifluatex.sty
- \fi
-\else
- \RequirePackage{ifluatex}
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatextra}
- [2010/10/08 v0.98 LuaTeX extra low-level macros]
-\fi
-
-\ifluatex\else
- \begingroup
- \expandafter\ifx\csname PackageError\endcsname\relax
- \def\x#1#2#3{\begingroup \newlinechar10
- \errhelp{#3}\errmessage{Package #1 error: #2}\endgroup}
- \else
- \let\x\PackageError
- \fi
- \expandafter\endgroup
- \x{luatextra}{LuaTeX is required for this package. Aborting.}{%
- This package can only be used with the LuaTeX engine^^J%
- (command `lualatex' or `luatex').^^J%
- Package loading has been stopped to prevent additional errors.}
- \expandafter\endinput
-\fi
-\bgroup\expandafter\expandafter\expandafter\egroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \input luatexbase.sty
- \input luatexbase-modutils.sty
- \input luatexbase-mcb.sty
- \luatexUseModule{lualibs}
- \input luaotfload.sty
-\else
- \RequirePackage{luatexbase}
- \RequirePackage{luatexbase-modutils}
- \RequirePackage{luatexbase-mcb}
- \luatexUseModule{lualibs}
- \RequirePackage{luaotfload}
- %
- \RequirePackage{metalogo}
- \RequirePackage{luacode}
- \RequirePackage{fixltx2e}
-\fi
-\ifnum\luatexversion<36
- \def\directlua{\pdfprimitive\directlua0}
- \def\latelua{\pdfprimitive\latelua0}
- \def\lualate{\pdfprimitive\latelua0}
- \def\luatexattribute{\attribute}
- \def\luatexattributedef{\attributedef}
- \def\luatexclearmarks{\pdfprimitive\luaclearmarks}
- \def\luatexformatname{\pdfprimitive\formatname}
- \def\luatexscantexttokens{\pdfprimitive\scantexttokens}
- \def\luatexcatcodetable{\catcodetable}
- \def\initluatexcatcodetable{\pdfprimitive\initcatcodetable}
- \def\saveluatexcatcodetable{\pdfprimitive\savecatcodetable}
- \def\luaclose{\pdfprimitive\closelua}
-\else
- \directlua{tex.enableprimitives('luatex', {'attribute'})}
- \directlua{tex.enableprimitives('luatex', {'attributedef'})}
- \directlua{tex.enableprimitives('luatex', {'clearmarks'})}
- \directlua{tex.enableprimitives('luatex', {'formatname'})}
- \directlua{tex.enableprimitives('luatex', {'scantexttokens'})}
- \directlua{tex.enableprimitives('luatex', {'catcodetable'})}
- \directlua{tex.enableprimitives('luatex', {'latelua'})}
- \directlua{tex.enableprimitives('luatex', {'initcatcodetable'})}
- \directlua{tex.enableprimitives('luatex', {'savecatcodetable'})}
- \directlua{tex.enableprimitives('luatex', {'closelua'})}
- \let\lualate\luatexlatelua
- \let\initluatexcatcodetable\luatexinitcatcodetable
- \let\saveluatexcatcodetable\luatexsavecatcodetable
- \let\luaclose\luatexcloselua
-\fi
-\let\newluaattribute\newluatexattribute
-\let\luaattribute\luatexattribute
-\let\unsetluaattribute\unsetluatexattribute
-\let\initluacatcodetable\initluatexcatcodetable
-\let\luasetcatcoderange\luatexsetcatcoderange
-\let\newluacatcodetable\newluatexcatcodetable
-\let\setluaattribute\setluatexattribute
-\let\luaModuleError\luatexModuleError
-\let\luaRequireModule\luatexRequireModule
-\let\luaUseModule\luatexUseModule
-\directlua{dofile(kpse.find_file("luatextra.lua"))}
-\def\ltxtra@RegisterFontCallback{
- \directlua{luatextra.register_font_callback()}
-}
-\endinput
-%%
-%% End of file `luatextra.sty'.