summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/lualatex/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/doc/lualatex/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/doc/lualatex/lualatex-math')
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST18
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/Makefile102
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/README42
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.el17
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdfbin0 -> 227656 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.tex232
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.tex160
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.tex137
8 files changed, 708 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST b/Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST
new file mode 100644
index 00000000000..7b2b8d0e972
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST
@@ -0,0 +1,18 @@
+This work consists of the non-derived files
+
+README
+README.rst
+MANIFEST
+Makefile
+lualatex-math.dtx
+lualatex-math.ins
+lualatex-math.el
+
+and the derived files
+
+lualatex-math.sty
+lualatex-math.lua
+test-kernel.tex
+test-amsmath.tex
+test-unicode.tex
+lualatex-math.pdf
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/Makefile b/Master/texmf-dist/doc/lualatex/lualatex-math/Makefile
new file mode 100644
index 00000000000..9415d2a148e
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/Makefile
@@ -0,0 +1,102 @@
+# Makefile
+# Copyright 2011 Philipp Stephani
+#
+# This work 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.
+#
+# This work has the LPPL maintenance status `maintained'.
+# The Current Maintainer of this work is Philipp Stephani.
+# This work consists of all files listed in MANIFEST.
+
+SHELL := /bin/sh
+INSTALL := install
+INSTALL_PROGRAM := $(INSTALL) -c -m 755
+INSTALL_DATA := $(INSTALL) -c -m 644
+
+ZIP := zip -v
+MKTEXLSR := mktexlsr
+TEX := tex
+LATEX := lualatex
+MAKEINDEX := makeindex
+
+name := lualatex-math
+
+texmf := $(shell kpsewhich --var-value=TEXMFHOME)
+branch := lualatex/$(name)
+destdir := $(texmf)/tex/$(branch)
+docdir := $(texmf)/doc/$(branch)
+auctexdir := ~/.emacs.d/auctex/style
+
+LATEXFLAGS := --file-line-error --interaction=scrollmode
+LATEXFLAGS_DRAFT := $(LATEXFLAGS) --draftmode
+LATEXFLAGS_FINAL := $(LATEXFLAGS) --synctex=1
+
+source := $(name).dtx
+driver := $(name).ins
+dest_sty := $(name).sty
+dest_lua := $(name).lua
+destination := $(dest_sty) $(dest_lua)
+tests := test-kernel test-amsmath test-unicode
+tests_src := $(addsuffix .tex, $(tests))
+tests_dest := $(addsuffix .pdf, $(tests))
+manual := $(name).pdf
+auctex_style := $(name).el
+index_src := $(name).idx
+index_dest := $(name).ind
+index_log := $(name).ilg
+index_sty := gind.ist
+changes_src := $(name).glo
+changes_dest := $(name).gls
+changes_log := $(name).glg
+changes_sty := gglo.ist
+ctan_arch := $(name).zip
+ctan_files := README MANIFEST Makefile $(source) $(driver) $(destination) $(test_src) $(manual) $(auctex_style)
+
+
+all: $(destination) $(auctex_style)
+
+check: $(tests_dest)
+
+pdf: $(manual)
+
+complete: all check pdf
+
+ctan: $(ctan_arch)
+
+install: all
+ $(INSTALL) -d $(destdir)
+ $(INSTALL_DATA) $(destination) $(destdir)
+ $(INSTALL) -d $(auctexdir)
+ $(INSTALL_DATA) $(auctex_style) $(auctexdir)
+ $(MKTEXLSR)
+
+install-pdf: pdf
+ $(INSTALL) -d $(docdir)
+ $(INSTALL_DATA) $(manual) $(docdir)
+ $(MKTEXLSR)
+
+install-complete: install install-pdf
+
+$(destination) $(tests_src): $(driver) $(source)
+ $(TEX) $<
+
+$(tests_dest): %.pdf: %.tex $(destination)
+ $(LATEX) $(LATEXFLAGS_FINAL) $<
+
+$(manual): $(source) $(destination)
+ $(LATEX) $(LATEXFLAGS_DRAFT) $<
+ $(MAKEINDEX) -s $(index_sty) -o $(index_dest) -t $(index_log) $(index_src)
+ $(MAKEINDEX) -s $(changes_sty) -o $(changes_dest) -t $(changes_log) $(changes_src)
+ $(LATEX) $(LATEXFLAGS_DRAFT) $<
+ $(LATEX) $(LATEXFLAGS_FINAL) $<
+
+$(ctan_arch): $(ctan_files)
+ $(ZIP) $@ $^
+
+.PHONY: all check pdf complete ctan install install-pdf install-complete
+.SUFFIXES:
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/README b/Master/texmf-dist/doc/lualatex/lualatex-math/README
new file mode 100644
index 00000000000..95fe5c2b45f
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/README
@@ -0,0 +1,42 @@
+The ``lualatex-math`` package
+=============================
+
+This package patches a few commands of the LaTeX 2ε kernel and the ``amsmath``
+and ``mathtools`` packages to be more compatible with the LuaTeX engine. It is
+only meaningful if you compile your documents with LuaLaTeX.
+
+
+License
+-------
+
+This material is subject to the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later version. See
+http://www.latex-project.org/lppl/ for the details of that license.
+
+
+Installation
+------------
+
+Copy the files ``lualatex-math.sty`` and ``lualatex-math.lua`` to a place where
+TeX can find them. The documentation is contained in the file
+``lualatex-math.pdf``.
+
+To produce the runtime files from the Docstrip source, run ``make``. To
+produce the PDF manual, run ``make pdf``. To produce and compile a few test
+files, run ``make check``. To install the runtime files in your home TEXMF
+tree, run ``make install``. To install the PDF manual in your home TEXMF tree,
+run ``make install-pdf``. The package includes an AucTeX style file which will
+be installed in ``~/.emacs.d``.
+
+
+Usage
+-----
+
+Include the package via ``\usepackage{lualatex-math}``. The package has no
+options and no public interface; it applies the appropriate fixes
+automatically. See ``lualatex-math.pdf`` for details.
+
+If you encounter any issues, please report them by means of the `issue
+tracker`_.
+
+.. _issue tracker: https://github.com/phst/lualatex-math/issues
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.el b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.el
new file mode 100644
index 00000000000..c451f22671b
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.el
@@ -0,0 +1,17 @@
+;; 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.
+
+(TeX-add-style-hook
+ "lualatex-math"
+ (function
+ (lambda ()
+ (TeX-run-style-hooks "expl3" "etoolbox" "luatexbase" "filehook"))))
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf
new file mode 100644
index 00000000000..f14febac606
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.tex b/Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.tex
new file mode 100644
index 00000000000..b96f5e9dc87
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.tex
@@ -0,0 +1,232 @@
+%%
+%% This is file `test-amsmath.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lualatex-math.dtx (with options: `test,test-amsmath')
+%%
+%% 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.
+%%
+\documentclass[pagesize=auto]{scrartcl}
+\usepackage{xparse}[2008/08/03]
+\ExplSyntaxOn
+\msg_new:nnn { test } { pass } { #1 }
+\cs_new_protected_nopar:Npn \test_pass:x #1 {
+ \msg_info:nnx { test } { pass } { #1 }
+}
+\msg_new:nnn { test } { fail } { #1 }
+\cs_new_protected_nopar:Npn \test_fail:x #1 {
+ \msg_error:nnx { test } { fail } { #1 }
+}
+\cs_generate_variant:Nn \tl_const:Nn { Nx }
+\tl_const:Nx \c_test_equal_tl { \c_space_tl == \c_space_tl }
+\tl_const:Nx \c_test_not_equal_tl { \c_space_tl != \c_space_tl }
+\cs_new_protected_nopar:Npn \test_equal_pass:nxnx #1 #2 #3 #4 {
+ \test_pass:x {
+ \exp_not:n { #1 }
+ \c_test_equal_tl
+ #2
+ \c_test_equal_tl
+ #4
+ \c_test_equal_tl
+ \exp_not:n { #3 }
+ }
+}
+\cs_new_protected_nopar:Npn \test_equal_fail:nxnx #1 #2 #3 #4 {
+ \test_fail:x {
+ \exp_not:n { #1 }
+ \c_test_equal_tl
+ #2
+ \c_test_not_equal_tl
+ #4
+ \c_test_equal_tl
+ \exp_not:n { #3 }
+ }
+}
+\cs_new_protected_nopar:Npn
+\test_assert_equal:NNNNNnn #1 #2 #3 #4 #5 #6 #7 {
+ #1 #4 { #6 }
+ #1 #5 { #7 }
+ #3 { #4 } = { #5 } {
+ \test_equal_pass:nxnx { #6 } { #2 #4 } { #7 } { #2 #5 }
+ } {
+ \test_equal_fail:nxnx { #6 } { #2 #4 } { #7 } { #2 #5 }
+ }
+}
+\cs_generate_variant:Nn \test_assert_equal:NNNNNnn { ccccc }
+\cs_new_protected_nopar:Npn \test_assert_equal:nnn #1 #2 #3 {
+ \test_assert_equal:cccccnn
+ { #1 _set:Nn } { #1 _use:N } { #1 _compare:nNnTF }
+ { l_test_tmpa_ #1 } { l_test_tmpb_ #1 } { #2 } { #3 }
+}
+\int_new:N \l_test_tmpa_int
+\int_new:N \l_test_tmpb_int
+\NewDocumentCommand \AssertIntEqual { m m } {
+ \test_assert_equal:nnn { int } { #1 } { #2 }
+}
+\dim_new:N \l_test_tmpa_dim
+\dim_new:N \l_test_tmpb_dim
+\NewDocumentCommand \AssertDimEqual { m m } {
+ \test_assert_equal:nnn { dim } { #1 } { #2 }
+}
+\NewDocumentCommand \AssertMathStyle { m } {
+ \AssertIntEqual { \luatexmathstyle } { #1 }
+}
+\cs_new_protected_nopar:Npn \test_assert_cramped:Nx #1 #2 {
+ \int_set:Nn \l_test_tmpa_int { \luatexmathstyle }
+ \bool_if:nTF {
+ \int_compare_p:nNn { \l_test_tmpa_int } > { \c_minus_one }
+ &&
+ #1 { \l_test_tmpa_int }
+ } {
+ \test_pass:x {
+ \exp_not:N \luatexmathstyle
+ \c_test_equal_tl
+ \int_use:N \l_test_tmpa_int
+ \c_space_tl
+ is~ a~ #2~ style
+ }
+ } {
+ \test_fail:x {
+ \exp_not:N \luatexmathstyle
+ \c_test_equal_tl
+ \int_use:N \l_test_tmpa_int
+ \c_space_tl
+ is~ not~ a~ #2~ style
+ }
+ }
+}
+\NewDocumentCommand \AssertNoncrampedStyle { } {
+ \test_assert_cramped:Nx \int_if_even_p:n { non-cramped }
+}
+\NewDocumentCommand \AssertCrampedStyle { } {
+ \test_assert_cramped:Nx \int_if_odd_p:n { cramped }
+}
+\ExplSyntaxOff
+\usepackage{lualatex-math}
+\newsavebox{\testbox}
+\luatexUmathcode`\-="2 "33 "44444 \relax
+\usepackage{amsmath}
+\AssertIntEqual{\luatexUmathcode`\-}{"33444444}
+\makeatletter
+\AssertIntEqual{\std@minus}{"33444444}
+\makeatother
+\usepackage{mathtools}
+\luatexUmathcode`\="5 "66 "77777 \relax
+\begin{document}
+\AssertIntEqual{\luatexUmathcode`\=}{"66A77777}
+\makeatletter
+\AssertIntEqual{\std@equal}{"66A77777}
+\makeatother
+\sbox{\testbox}{$($} % )
+\makeatletter
+\AssertDimEqual{\ht\Mathstrutbox@}{\ht\testbox}
+\AssertDimEqual{\dp\Mathstrutbox@}{\dp\testbox}
+\makeatother
+\begin{equation*}
+ \AssertMathStyle{0} \sqrt{\AssertMathStyle{1}}
+ \sum_{
+ \substack{\frac12 \\ \frac34 \\ \frac56}
+ }
+ \sum_{
+ \begin{subarray}{l} \frac12 \\ \frac34 \\ \frac56 \end{subarray}
+ }
+ \frac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ a^{\frac{\AssertMathStyle{6}}{\AssertMathStyle{7}}}
+ \dfrac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \tfrac{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \binom{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ a^{\binom{\AssertMathStyle{6}}{\AssertMathStyle{7}}}
+ \dbinom{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \tbinom{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \genfrac{}{}{}{}{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \genfrac{<}{/}{0pt}{0}{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \genfrac{}{}{}{1}{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \genfrac{|}{]}{4pt}{2}{\AssertMathStyle{6}}{\AssertMathStyle{7}}
+ \genfrac{}{}{}{3}{\AssertMathStyle{6}}{\AssertMathStyle{7}}
+\end{equation*}
+\begin{math}
+ \AssertMathStyle{2} \sqrt{\AssertMathStyle{3}}
+ \sum_{
+ \substack{\frac12 \\ \frac34 \\ \frac56}
+ }
+ \sum_{
+ \begin{subarray}{l} \frac12 \\ \frac34 \\ \frac56 \end{subarray}
+ }
+ \frac{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ a^{\frac{\AssertMathStyle{6}}{\AssertMathStyle{7}}}
+ \dfrac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \tfrac{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \binom{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ a^{\binom{\AssertMathStyle{6}}{\AssertMathStyle{7}}}
+ \dbinom{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \tbinom{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \genfrac{}{}{}{}{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \genfrac{<}{/}{0pt}{0}{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \genfrac{}{}{}{1}{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \genfrac{|}{]}{4pt}{2}{\AssertMathStyle{6}}{\AssertMathStyle{7}}
+ \genfrac{}{}{}{3}{\AssertMathStyle{6}}{\AssertMathStyle{7}}
+\end{math}
+\begin{equation*}
+ \AssertMathStyle{0}
+ a^{\AssertMathStyle{4} a}
+ \cramped{\AssertCrampedStyle a^{\AssertCrampedStyle a}}
+ a^{
+ \AssertMathStyle{4}
+ a^a
+ \cramped{\AssertCrampedStyle a^{\AssertCrampedStyle a}}
+ a^a
+ \AssertMathStyle{4}
+ }
+ a^{
+ a^{
+ \AssertMathStyle{6}
+ a^a
+ \cramped{\AssertCrampedStyle a^{\AssertCrampedStyle a}}
+ a^a
+ \AssertMathStyle{6}
+ }
+ }
+ a^{\AssertMathStyle{4} a}
+ \AssertMathStyle{0}
+\end{equation*}
+\begin{math}
+ \AssertMathStyle{2}
+ a^{\AssertMathStyle{4} a}
+ \cramped{\AssertCrampedStyle a^{\AssertCrampedStyle a}}
+ a^{
+ \AssertMathStyle{4}
+ a^a
+ \cramped{\AssertCrampedStyle a^{\AssertCrampedStyle a}}
+ a^a
+ \AssertMathStyle{4}
+ }
+ a^{
+ a^{
+ \AssertMathStyle{6}
+ a^a
+ \cramped{\AssertCrampedStyle a^{\AssertCrampedStyle a}}
+ a^a
+ \AssertMathStyle{6}
+ }
+ }
+ a^{\AssertMathStyle{4} a}
+ \AssertMathStyle{2}
+\end{math}
+\end{document}
+\endinput
+%%
+%% End of file `test-amsmath.tex'.
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.tex b/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.tex
new file mode 100644
index 00000000000..68032ec0543
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.tex
@@ -0,0 +1,160 @@
+%%
+%% This is file `test-kernel.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lualatex-math.dtx (with options: `test,test-kernel')
+%%
+%% 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.
+%%
+\documentclass[pagesize=auto]{scrartcl}
+\usepackage{xparse}[2008/08/03]
+\ExplSyntaxOn
+\msg_new:nnn { test } { pass } { #1 }
+\cs_new_protected_nopar:Npn \test_pass:x #1 {
+ \msg_info:nnx { test } { pass } { #1 }
+}
+\msg_new:nnn { test } { fail } { #1 }
+\cs_new_protected_nopar:Npn \test_fail:x #1 {
+ \msg_error:nnx { test } { fail } { #1 }
+}
+\cs_generate_variant:Nn \tl_const:Nn { Nx }
+\tl_const:Nx \c_test_equal_tl { \c_space_tl == \c_space_tl }
+\tl_const:Nx \c_test_not_equal_tl { \c_space_tl != \c_space_tl }
+\cs_new_protected_nopar:Npn \test_equal_pass:nxnx #1 #2 #3 #4 {
+ \test_pass:x {
+ \exp_not:n { #1 }
+ \c_test_equal_tl
+ #2
+ \c_test_equal_tl
+ #4
+ \c_test_equal_tl
+ \exp_not:n { #3 }
+ }
+}
+\cs_new_protected_nopar:Npn \test_equal_fail:nxnx #1 #2 #3 #4 {
+ \test_fail:x {
+ \exp_not:n { #1 }
+ \c_test_equal_tl
+ #2
+ \c_test_not_equal_tl
+ #4
+ \c_test_equal_tl
+ \exp_not:n { #3 }
+ }
+}
+\cs_new_protected_nopar:Npn
+\test_assert_equal:NNNNNnn #1 #2 #3 #4 #5 #6 #7 {
+ #1 #4 { #6 }
+ #1 #5 { #7 }
+ #3 { #4 } = { #5 } {
+ \test_equal_pass:nxnx { #6 } { #2 #4 } { #7 } { #2 #5 }
+ } {
+ \test_equal_fail:nxnx { #6 } { #2 #4 } { #7 } { #2 #5 }
+ }
+}
+\cs_generate_variant:Nn \test_assert_equal:NNNNNnn { ccccc }
+\cs_new_protected_nopar:Npn \test_assert_equal:nnn #1 #2 #3 {
+ \test_assert_equal:cccccnn
+ { #1 _set:Nn } { #1 _use:N } { #1 _compare:nNnTF }
+ { l_test_tmpa_ #1 } { l_test_tmpb_ #1 } { #2 } { #3 }
+}
+\int_new:N \l_test_tmpa_int
+\int_new:N \l_test_tmpb_int
+\NewDocumentCommand \AssertIntEqual { m m } {
+ \test_assert_equal:nnn { int } { #1 } { #2 }
+}
+\dim_new:N \l_test_tmpa_dim
+\dim_new:N \l_test_tmpb_dim
+\NewDocumentCommand \AssertDimEqual { m m } {
+ \test_assert_equal:nnn { dim } { #1 } { #2 }
+}
+\NewDocumentCommand \AssertMathStyle { m } {
+ \AssertIntEqual { \luatexmathstyle } { #1 }
+}
+\cs_new_protected_nopar:Npn \test_assert_cramped:Nx #1 #2 {
+ \int_set:Nn \l_test_tmpa_int { \luatexmathstyle }
+ \bool_if:nTF {
+ \int_compare_p:nNn { \l_test_tmpa_int } > { \c_minus_one }
+ &&
+ #1 { \l_test_tmpa_int }
+ } {
+ \test_pass:x {
+ \exp_not:N \luatexmathstyle
+ \c_test_equal_tl
+ \int_use:N \l_test_tmpa_int
+ \c_space_tl
+ is~ a~ #2~ style
+ }
+ } {
+ \test_fail:x {
+ \exp_not:N \luatexmathstyle
+ \c_test_equal_tl
+ \int_use:N \l_test_tmpa_int
+ \c_space_tl
+ is~ not~ a~ #2~ style
+ }
+ }
+}
+\NewDocumentCommand \AssertNoncrampedStyle { } {
+ \test_assert_cramped:Nx \int_if_even_p:n { non-cramped }
+}
+\NewDocumentCommand \AssertCrampedStyle { } {
+ \test_assert_cramped:Nx \int_if_odd_p:n { cramped }
+}
+\ExplSyntaxOff
+\usepackage{lualatex-math}
+\begin{document}
+\begin{displaymath}
+ \AssertMathStyle{0} \sqrt{\AssertMathStyle{1}}
+ \frac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ a^{\frac{\AssertMathStyle{6}}{\AssertMathStyle{7}}}
+ \sqrt{\frac{\AssertMathStyle{3}}{\AssertMathStyle{3}}}
+ \displaystyle
+ \frac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \luatexcrampeddisplaystyle
+ \frac{\AssertMathStyle{3}}{\AssertMathStyle{3}}
+ \textstyle
+ \frac{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \luatexcrampedtextstyle
+ \frac{\AssertMathStyle{5}}{\AssertMathStyle{5}}
+ \scriptstyle
+ \frac{\AssertMathStyle{6}}{\AssertMathStyle{7}}
+ \luatexcrampedscriptstyle
+ \frac{\AssertMathStyle{7}}{\AssertMathStyle{7}}
+\end{displaymath}
+\begin{math}
+ \AssertMathStyle{2} \sqrt{\AssertMathStyle{3}}
+ \frac{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ a^{\frac{\AssertMathStyle{6}}{\AssertMathStyle{7}}}
+ \sqrt{\frac{\AssertMathStyle{5}}{\AssertMathStyle{5}}}
+ \displaystyle
+ \frac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \luatexcrampeddisplaystyle
+ \frac{\AssertMathStyle{3}}{\AssertMathStyle{3}}
+ \textstyle
+ \frac{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+ \luatexcrampedtextstyle
+ \frac{\AssertMathStyle{5}}{\AssertMathStyle{5}}
+ \scriptstyle
+ \frac{\AssertMathStyle{6}}{\AssertMathStyle{7}}
+ \luatexcrampedscriptstyle
+ \frac{\AssertMathStyle{7}}{\AssertMathStyle{7}}
+\end{math}
+\end{document}
+\endinput
+%%
+%% End of file `test-kernel.tex'.
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.tex b/Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.tex
new file mode 100644
index 00000000000..1551142aaa3
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.tex
@@ -0,0 +1,137 @@
+%%
+%% This is file `test-unicode.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lualatex-math.dtx (with options: `test,test-unicode')
+%%
+%% 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.
+%%
+\documentclass[pagesize=auto]{scrartcl}
+\usepackage{xparse}[2008/08/03]
+\ExplSyntaxOn
+\msg_new:nnn { test } { pass } { #1 }
+\cs_new_protected_nopar:Npn \test_pass:x #1 {
+ \msg_info:nnx { test } { pass } { #1 }
+}
+\msg_new:nnn { test } { fail } { #1 }
+\cs_new_protected_nopar:Npn \test_fail:x #1 {
+ \msg_error:nnx { test } { fail } { #1 }
+}
+\cs_generate_variant:Nn \tl_const:Nn { Nx }
+\tl_const:Nx \c_test_equal_tl { \c_space_tl == \c_space_tl }
+\tl_const:Nx \c_test_not_equal_tl { \c_space_tl != \c_space_tl }
+\cs_new_protected_nopar:Npn \test_equal_pass:nxnx #1 #2 #3 #4 {
+ \test_pass:x {
+ \exp_not:n { #1 }
+ \c_test_equal_tl
+ #2
+ \c_test_equal_tl
+ #4
+ \c_test_equal_tl
+ \exp_not:n { #3 }
+ }
+}
+\cs_new_protected_nopar:Npn \test_equal_fail:nxnx #1 #2 #3 #4 {
+ \test_fail:x {
+ \exp_not:n { #1 }
+ \c_test_equal_tl
+ #2
+ \c_test_not_equal_tl
+ #4
+ \c_test_equal_tl
+ \exp_not:n { #3 }
+ }
+}
+\cs_new_protected_nopar:Npn
+\test_assert_equal:NNNNNnn #1 #2 #3 #4 #5 #6 #7 {
+ #1 #4 { #6 }
+ #1 #5 { #7 }
+ #3 { #4 } = { #5 } {
+ \test_equal_pass:nxnx { #6 } { #2 #4 } { #7 } { #2 #5 }
+ } {
+ \test_equal_fail:nxnx { #6 } { #2 #4 } { #7 } { #2 #5 }
+ }
+}
+\cs_generate_variant:Nn \test_assert_equal:NNNNNnn { ccccc }
+\cs_new_protected_nopar:Npn \test_assert_equal:nnn #1 #2 #3 {
+ \test_assert_equal:cccccnn
+ { #1 _set:Nn } { #1 _use:N } { #1 _compare:nNnTF }
+ { l_test_tmpa_ #1 } { l_test_tmpb_ #1 } { #2 } { #3 }
+}
+\int_new:N \l_test_tmpa_int
+\int_new:N \l_test_tmpb_int
+\NewDocumentCommand \AssertIntEqual { m m } {
+ \test_assert_equal:nnn { int } { #1 } { #2 }
+}
+\dim_new:N \l_test_tmpa_dim
+\dim_new:N \l_test_tmpb_dim
+\NewDocumentCommand \AssertDimEqual { m m } {
+ \test_assert_equal:nnn { dim } { #1 } { #2 }
+}
+\NewDocumentCommand \AssertMathStyle { m } {
+ \AssertIntEqual { \luatexmathstyle } { #1 }
+}
+\cs_new_protected_nopar:Npn \test_assert_cramped:Nx #1 #2 {
+ \int_set:Nn \l_test_tmpa_int { \luatexmathstyle }
+ \bool_if:nTF {
+ \int_compare_p:nNn { \l_test_tmpa_int } > { \c_minus_one }
+ &&
+ #1 { \l_test_tmpa_int }
+ } {
+ \test_pass:x {
+ \exp_not:N \luatexmathstyle
+ \c_test_equal_tl
+ \int_use:N \l_test_tmpa_int
+ \c_space_tl
+ is~ a~ #2~ style
+ }
+ } {
+ \test_fail:x {
+ \exp_not:N \luatexmathstyle
+ \c_test_equal_tl
+ \int_use:N \l_test_tmpa_int
+ \c_space_tl
+ is~ not~ a~ #2~ style
+ }
+ }
+}
+\NewDocumentCommand \AssertNoncrampedStyle { } {
+ \test_assert_cramped:Nx \int_if_even_p:n { non-cramped }
+}
+\NewDocumentCommand \AssertCrampedStyle { } {
+ \test_assert_cramped:Nx \int_if_odd_p:n { cramped }
+}
+\ExplSyntaxOff
+\ExplSyntaxOn
+\msg_redirect_class:nn { warning } { error }
+\ExplSyntaxOff
+\usepackage{amsmath}
+\usepackage{unicode-math}[2011/05/05]
+\setmathfont{XITS Math}
+\usepackage{lualatex-math}
+\begin{document}
+\begin{equation*}
+ \AssertMathStyle{0} \sqrt{\AssertMathStyle{1}}
+ \frac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ a^{\frac{\AssertMathStyle{6}}{\AssertMathStyle{7}}}
+ \dfrac{\AssertMathStyle{2}}{\AssertMathStyle{3}}
+ \tfrac{\AssertMathStyle{4}}{\AssertMathStyle{5}}
+\end{equation*}
+\end{document}
+\endinput
+%%
+%% End of file `test-unicode.tex'.