summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/lualatex-math
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-05-06 23:29:16 +0000
committerKarl Berry <karl@freefriends.org>2011-05-06 23:29:16 +0000
commitc12f7ff3c88e06dd8f3dd964f6c274ae97bbfbfe (patch)
treed646e8fa26dbc3d80d7f68374baddff3376a3859 /Master/texmf-dist/scripts/lualatex-math
parente1ef22356087d81c9700f75a1fa142404cec7772 (diff)
lualatex-math (6may11)
git-svn-id: svn://tug.org/texlive/trunk@22339 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/lualatex-math')
-rwxr-xr-xMaster/texmf-dist/scripts/lualatex-math/lualatex-math.lua49
1 files changed, 49 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/lualatex-math/lualatex-math.lua b/Master/texmf-dist/scripts/lualatex-math/lualatex-math.lua
new file mode 100755
index 00000000000..e4f18e8fb85
--- /dev/null
+++ b/Master/texmf-dist/scripts/lualatex-math/lualatex-math.lua
@@ -0,0 +1,49 @@
+--
+-- This is file `lualatex-math.lua',
+-- generated with the docstrip utility.
+--
+-- The original source files were:
+--
+-- lualatex-math.dtx (with options: `lua')
+--
+-- This is a generated file.
+--
+-- Copyright 2011 by Philipp Stephani
+--
+-- This file may be distributed and/or modified under the
+-- conditions of the LaTeX Project Public License, either
+-- version 1.3c of this license or (at your option) any later
+-- version. The latest version of this license is in
+--
+-- http://www.latex-project.org/lppl.txt
+--
+-- and version 1.3c or later is part of all distributions of
+-- LaTeX version 2009/09/24 or later.
+--
+require("luatexbase.modutils")
+require("luatexbase.cctb")
+local err, warn, info, log = luatexbase.provides_module({
+ name = "lualatex-math",
+ date = "2011/05/05",
+ version = 0.1,
+ description = "Patches for mathematics typesetting with LuaLaTeX",
+ author = "Philipp Stephani",
+ licence = "LPPL v1.3+"
+})
+local unpack = unpack
+local string = string
+local tex = tex
+local cctb = luatexbase.catcodetables
+module("lualatex.math")
+function print_fam_slot(char)
+ local code = tex.getmathcode(char)
+ local class, family, slot = unpack(code)
+ local result = string.format("%i %i ", family, slot)
+ tex.sprint(cctb.string, result)
+end
+function print_class_fam_slot(char)
+ local code = tex.getmathcode(char)
+ local class, family, slot = unpack(code)
+ local result = string.format("%i %i %i ", class, family, slot)
+ tex.sprint(cctb.string, result)
+end