summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-09-28 21:17:44 +0000
committerKarl Berry <karl@freefriends.org>2015-09-28 21:17:44 +0000
commit472e2dc119ba3eca6a8672e7606df6a7dc847a19 (patch)
tree7c10e4ee61b72663387bc5e19e97ddb6c8e57c62
parent3b599d9910b4fe668c87ddd32a48d48f8a377560 (diff)
l3 (28sep15)
git-svn-id: svn://tug.org/texlive/trunk@38490 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/l3build/README.md43
-rw-r--r--Master/texmf-dist/doc/latex/l3build/l3build.pdfbin595373 -> 595422 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/README.md45
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3sort/l3sort.pdfbin377156 -> 377497 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3str/l3flag.pdfbin319977 -> 320319 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3str/l3regex.pdfbin455921 -> 456250 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdfbin448216 -> 448521 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-expl.pdfbin415277 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdfbin379605 -> 380165 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-analysis.pdfbin352835 -> 352803 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-build.pdfbin385138 -> 385138 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdfbin395295 -> 395295 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdfbin397180 -> 397522 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdfbin291807 -> 291807 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/README.md45
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/expl3.pdfbin586154 -> 586689 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/interface3.pdfbin1474357 -> 1496740 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdfbin268234 -> 268234 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt60
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdfbin276800 -> 276800 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdfbin220220 -> 220220 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3kernel/source3.pdfbin4599008 -> 4674312 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3packages/README.md45
-rw-r--r--Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdfbin333520 -> 333870 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdfbin478402 -> 478402 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdfbin459465 -> 459801 bytes
-rw-r--r--Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdfbin422544 -> 422874 bytes
-rw-r--r--Master/texmf-dist/source/latex/l3build/l3build.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx984
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx22
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str.ins3
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx3
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx35
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins1
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx134
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx10
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx39
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx62
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx11
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx38
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx10
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx1
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx11
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx1070
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sys.dtx165
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx34
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx88
-rw-r--r--Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx87
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx6
-rw-r--r--Master/texmf-dist/tex/latex/l3build/l3build.lua267
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty6
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3flag.sty6
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty8
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty8
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty4
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty18
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty355
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty3
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty6
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex701
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex4
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3.sty29
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3doc.cls10
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3str.sty76
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty6
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty85
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty6
75 files changed, 2312 insertions, 2391 deletions
diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md
index d39bf486108..e2498b4921c 100644
--- a/Master/texmf-dist/doc/latex/l3build/README.md
+++ b/Master/texmf-dist/doc/latex/l3build/README.md
@@ -1,16 +1,16 @@
l3build: a testing and building system for LaTeX3
=================================================
-Release 2015/09/14 (r6007)
+Release 2015/09/27 (r6111)
Overview
--------
The `l3build` module is designed to support the development of
high-quality LaTeX code by providing:
- - A unit testing system
- - Automated typesetting of code sources
- - A reliable packaging system for CTAN releases
+* A unit testing system
+* Automated typesetting of code sources
+* A reliable packaging system for CTAN releases
The bundle consists of a Lua script to run the tasks and a
`.tex` file which provides the testing environment. These were
@@ -36,9 +36,8 @@ with the body containing
Issues
------
-The issue tracker for LaTeX3 is currently located at
-
- https://github.com/latex3/latex3/issues
+The issue tracker for LaTeX3 is currently located
+[on GitHub](https://github.com/latex3/latex3/issues).
Please report specific issues with LaTeX3 code there; more general
discussion should be directed to the [LaTeX-L list](#Discussion).
@@ -50,24 +49,24 @@ Development of LaTeX3 is carried out by
[The LaTeX3 Project](http://www.latex-project.org/latex3.html). Currently,
the team members are
- * Johannes Braams
- * David Carlisle
- * Robin Fairbairns
- * Morten Høgholm
- * Bruno Le Floch
- * Thomas Lotze
- * Frank Mittelbach
- * Will Robertson
- * Chris Rowley
- * Rainer Schöpf
- * Joseph Wright
+* Johannes Braams
+* David Carlisle
+* Robin Fairbairns
+* Morten Høgholm
+* Bruno Le Floch
+* Thomas Lotze
+* Frank Mittelbach
+* Will Robertson
+* Chris Rowley
+* Rainer Schöpf
+* Joseph Wright
Former members of The LaTeX3 Project team were
- * Michael Downes
- * Denys Duchier
- * Alan Jeffrey
- * Martin Schröder
+* Michael Downes
+* Denys Duchier
+* Alan Jeffrey
+* Martin Schröder
The development team can be contacted
by e-mail: <latex-team@latex-project.org>; for general LaTeX3 discussion
diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
index a7ba01b7084..651953a00bb 100644
--- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf
+++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/README.md b/Master/texmf-dist/doc/latex/l3experimental/README.md
index e843f68e93d..9b6941d761c 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/README.md
+++ b/Master/texmf-dist/doc/latex/l3experimental/README.md
@@ -1,7 +1,7 @@
Experimental LaTeX3 Concepts
============================
-Released 2015/09/11
+Release 2015/09/27 (r6111)
Overview
--------
@@ -21,10 +21,10 @@ updated at the same time.
Currently included in the CTAN release of l3experimental are the following
bundles:
- * `l3sort`
- * `l3str`
- * `xcoffins`
- * `xgalley`
+* `l3sort`
+* `l3str`
+* `xcoffins`
+* `xgalley`
`l3sort`
--------
@@ -87,9 +87,8 @@ with the body containing
Issues
------
-The issue tracker for LaTeX3 is currently located at
-
- https://github.com/latex3/latex3/issues
+The issue tracker for LaTeX3 is currently located
+[on GitHub](https://github.com/latex3/latex3/issues).
Please report specific issues with LaTeX3 code there; more general
discussion should be directed to the [LaTeX-L list](#Discussion).
@@ -101,24 +100,24 @@ Development of LaTeX3 is carried out by
[The LaTeX3 Project](http://www.latex-project.org/latex3.html). Currently,
the team members are
- * Johannes Braams
- * David Carlisle
- * Robin Fairbairns
- * Morten Høgholm
- * Bruno Le Floch
- * Thomas Lotze
- * Frank Mittelbach
- * Will Robertson
- * Chris Rowley
- * Rainer Schöpf
- * Joseph Wright
+* Johannes Braams
+* David Carlisle
+* Robin Fairbairns
+* Morten Høgholm
+* Bruno Le Floch
+* Thomas Lotze
+* Frank Mittelbach
+* Will Robertson
+* Chris Rowley
+* Rainer Schöpf
+* Joseph Wright
Former members of The LaTeX3 Project team were
- * Michael Downes
- * Denys Duchier
- * Alan Jeffrey
- * Martin Schröder
+* Michael Downes
+* Denys Duchier
+* Alan Jeffrey
+* Martin Schröder
The development team can be contacted
by e-mail: <latex-team@latex-project.org>; for general LaTeX3 discussion
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3sort/l3sort.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3sort/l3sort.pdf
index 797da4cae3e..31930b4ae12 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/l3sort/l3sort.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/l3sort/l3sort.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3flag.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3flag.pdf
index 61fd18802fb..b0079115df5 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3flag.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3flag.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3regex.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3regex.pdf
index 565edcb5068..11e1d5ac2f9 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3regex.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3regex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf
index c4e96c9ddad..b486865c597 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-convert.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-expl.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-expl.pdf
deleted file mode 100644
index 52e065fc76d..00000000000
--- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-expl.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf
index e2a0349fe3e..7fc1d9072ff 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3str-format.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-analysis.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-analysis.pdf
index 53571442520..12be17e905e 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-analysis.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-analysis.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-build.pdf b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-build.pdf
index 2f2fffe31c4..1d088cc0a77 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-build.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/l3str/l3tl-build.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf b/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf
index abb6fd5860a..7b3ee0d55de 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/xcoffins/xcoffins.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf b/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf
index 9e166e0cc15..46d7ca254a4 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/xgalley/l3galley.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf b/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf
index 4c24ea86f43..ccad0b3bb5e 100644
--- a/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf
+++ b/Master/texmf-dist/doc/latex/l3experimental/xgalley/xgalley.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/README.md b/Master/texmf-dist/doc/latex/l3kernel/README.md
index 805819330ad..171f9fc2733 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/README.md
+++ b/Master/texmf-dist/doc/latex/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Released 2015/09/11
+Release 2015/09/27 (r6111)
Overview
--------
@@ -31,10 +31,10 @@ The `l3kernel` bundle requires the e-TeX extensions and the functionality
of the `\pdfstrcmp` primitive. As a result, the bundle will only work
with the following engines:
- - pdfTeX v1.30 or later
- - XeTeX v0.9994 or later
- - LuaTeX v0.40 or later
- - e-(u)pTeX from mid-2012 onward
+* pdfTeX v1.30 or later
+* XeTeX v0.9994 or later
+* LuaTeX v0.40 or later
+* e-(u)pTeX from mid-2012 onward
pdfTeX v1.30 was released in 2005, and so any recent TeX distribution
will support `l3kernel`. Both XeTeX and LuaTeX have developed more
@@ -59,9 +59,8 @@ with the body containing
Issues
------
-The issue tracker for LaTeX3 is currently located at
-
- https://github.com/latex3/latex3/issues
+The issue tracker for LaTeX3 is currently located
+[on GitHub](https://github.com/latex3/latex3/issues).
Please report specific issues with LaTeX3 code there; more general
discussion should be directed to the [LaTeX-L list](#Discussion).
@@ -73,24 +72,24 @@ Development of LaTeX3 is carried out by
[The LaTeX3 Project](http://www.latex-project.org/latex3.html). Currently,
the team members are
- * Johannes Braams
- * David Carlisle
- * Robin Fairbairns
- * Morten Høgholm
- * Bruno Le Floch
- * Thomas Lotze
- * Frank Mittelbach
- * Will Robertson
- * Chris Rowley
- * Rainer Schöpf
- * Joseph Wright
+* Johannes Braams
+* David Carlisle
+* Robin Fairbairns
+* Morten Høgholm
+* Bruno Le Floch
+* Thomas Lotze
+* Frank Mittelbach
+* Will Robertson
+* Chris Rowley
+* Rainer Schöpf
+* Joseph Wright
Former members of The LaTeX3 Project team were
- * Michael Downes
- * Denys Duchier
- * Alan Jeffrey
- * Martin Schröder
+* Michael Downes
+* Denys Duchier
+* Alan Jeffrey
+* Martin Schröder
The development team can be contacted
by e-mail: <latex-team@latex-project.org>; for general LaTeX3 discussion
diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf
index 3a1fac84e6d..441a55d24f0 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf
index af83501f041..35d9ad58135 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf
index 54f92d362f4..3775ae12357 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt b/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt
index 6bc885b0765..a5db9f15f83 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3obsolete.txt
@@ -1,12 +1,59 @@
-This file lists functions and variables removed from l3kernel.
-Functions which were added with 'experimental' status only are
-not listed. The 'Date removed' and 'SVN' columns detail when the
-functions are removed from the standard DocStrip extraction for
-l3kernel.
+This file lists functions and variables which were part of l3kernel
+but which are either deprecated or which have been removed entirely.
+The file is split into two parts. The first part lists functions
+which are deprecated but are still currently included in the
+extracted files. The second part lists functions which have been
+removed from the distribution entirely. Functions which were added
+with 'experimental' status only are not listed.
+Deprecated functions and variables
+==================================
+
+These functions are deprecated and should be removed from packages.
+They will be removed from the sources at the end of the given year.
+
+--------------------------------------
+Function Expires end
+--------------------------------------
+\c_job_name_tl 2016
+\fp_gset_from_dim:cn 2015
+\fp_gset_from_dim:Nn 2015
+\fp_set_from_dim:cn 2015
+\fp_set_from_dim:Nn 2015
+\int_from_binary:n 2015
+\int_to_binary:n 2015
+\int_from_hexadecimal:n 2015
+\int_to_hexadecimal:n 2015
+\int_from_octal:n 2015
+\int_to_octal:n 2015
+\luatex_if_engine_p: 2016
+\luatex_if_engine:F 2016
+\luatex_if_engine:T 2016
+\luatex_if_engine:TF 2016
+\pdftex_if_engine_p: 2016
+\pdftex_if_engine:F 2016
+\pdftex_if_engine:T 2016
+\pdftex_if_engine:TF 2016
+\prop_get:cn 2015
+\prop_get:Nn 2015
+\scan_align_safe_stop: 2016
+\xetex_if_engine_p: 2016
+\xetex_if_engine:F 2016
+\xetex_if_engine:T 2016
+\xetex_if_engine:TF 2016
+[key property] .value_forbidden: 2016
+[key property] .value_required: 2016
+---------------------------------------
+
+Removed functions and variables
+===============================
+
+The 'Date removed' and 'SVN' columns detail when the functions were
+removed from the sources.
+
+------------------------------------------------------------------
Function Date removed SVN
------------------------------------------------------------------
-
\c_active_char_token 2011-09-08 2786
\c_alignment_tab_token 2011-09-08 2786
\c_empty_toks 2011-09-08 2786
@@ -500,3 +547,4 @@ Function Date removed SVN
[key property] .code:x 2013-07-10 4539
[key property] .generate_choices:n 2015-07-14 5655
[key property] .meta:x 2013-07-10 4538
+------------------------------------------------------------------ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf
index 1652f555cf6..ac1cb97920a 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf
index f65e76046a5..234aded2a39 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf
index 4ec3f18b9a7..f3e955613e1 100644
--- a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf
+++ b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3packages/README.md b/Master/texmf-dist/doc/latex/l3packages/README.md
index 84e929500cb..3d20865dbb2 100644
--- a/Master/texmf-dist/doc/latex/l3packages/README.md
+++ b/Master/texmf-dist/doc/latex/l3packages/README.md
@@ -1,7 +1,7 @@
LaTeX3 High-Level Concepts
==========================
-Released 2015/09/11
+Release 2015/09/27 (r6111)
Overview
--------
@@ -20,10 +20,10 @@ updated at the same time.
Currently included in the CTAN release of `l3packages` are the following
bundles:
- * `l3keys2e`
- * `xfrac`
- * `xparse`
- * `xtemplate`
+* `l3keys2e`
+* `xfrac`
+* `xparse`
+* `xtemplate`
`l3keys2e`
----------
@@ -74,9 +74,8 @@ with the body containing
Issues
------
-The issue tracker for LaTeX3 is currently located at
-
- https://github.com/latex3/latex3/issues
+The issue tracker for LaTeX3 is currently located
+[on GitHub](https://github.com/latex3/latex3/issues).
Please report specific issues with LaTeX3 code there; more general
discussion should be directed to the [LaTeX-L list](#Discussion).
@@ -88,24 +87,24 @@ Development of LaTeX3 is carried out by
[The LaTeX3 Project](http://www.latex-project.org/latex3.html). Currently,
the team members are
- * Johannes Braams
- * David Carlisle
- * Robin Fairbairns
- * Morten Høgholm
- * Bruno Le Floch
- * Thomas Lotze
- * Frank Mittelbach
- * Will Robertson
- * Chris Rowley
- * Rainer Schöpf
- * Joseph Wright
+* Johannes Braams
+* David Carlisle
+* Robin Fairbairns
+* Morten Høgholm
+* Bruno Le Floch
+* Thomas Lotze
+* Frank Mittelbach
+* Will Robertson
+* Chris Rowley
+* Rainer Schöpf
+* Joseph Wright
Former members of The LaTeX3 Project team were
- * Michael Downes
- * Denys Duchier
- * Alan Jeffrey
- * Martin Schröder
+* Michael Downes
+* Denys Duchier
+* Alan Jeffrey
+* Martin Schröder
The development team can be contacted
by e-mail: <latex-team@latex-project.org>; for general LaTeX3 discussion
diff --git a/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf b/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf
index 808130a6ba5..5fbaf3c6a55 100644
--- a/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf
+++ b/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf b/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf
index ea4b18dba9d..e33e26e00c8 100644
--- a/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf
+++ b/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf b/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf
index 5ed995487ea..1e7301c134f 100644
--- a/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf
+++ b/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf b/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf
index 052658f844f..f3461b730a6 100644
--- a/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf
+++ b/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx
index f94bcdec5ba..a68f9d6330e 100644
--- a/Master/texmf-dist/source/latex/l3build/l3build.dtx
+++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx
@@ -39,8 +39,8 @@
\RequirePackage{expl3}
\def\ExplFileName{l3build}
\def\ExplFileDescription{L3 Regression test suite}
-\def\ExplFileDate{2015/09/14}
-\def\ExplFileVersion{6007}
+\def\ExplFileDate{2015/09/27}
+\def\ExplFileVersion{6111}
\documentclass[full]{l3doc}
\renewcommand\partname{Part}
\usepackage{multicol,needspace}
@@ -316,6 +316,7 @@
% \item \texttt{--halt-on-error} (\texttt{-H}) Specifies that checks
% should stop as soon as possible, rather than running all requested
% tests
+% \item \texttt{--quiet} (\texttt{-q}) Suppresses output from unpacking
% \end{itemize}
%
% \begin{buildcmd}{check}
@@ -401,7 +402,7 @@
% The files copied into the archive are controlled by a number of variables.
% The `root' of the TDS structure is defined by \var{tdsroot}, which is \luavar{tdsroot} by default. Plain users would redefine this to |"plain"| (or perhaps |"generic"|), for example.
% The build process for a |.tds.zip| file currently assumes a `standard'
-% structure in which all extracted files should be places inside the |tex|
+% structure in which all extracted files should be placed inside the |tex|
% tree in a single directory, as shown above. If the module includes any
% \BibTeX{} or MakeIndex styles these will be placed in the appropriate
% subtrees.
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx b/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx
index 9e60a5a0040..6710796c1ec 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx
@@ -37,8 +37,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{l3sort}{Support package l3kernel too old}
@@ -50,7 +50,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3sort.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3sort.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental sorting functions}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx
index 4192826a6c4..448c71792ef 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx
@@ -36,8 +36,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{l3flag}{Support package l3kernel too old}
@@ -49,7 +49,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3flag.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3flag.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental flags}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
index 5af1c4864ea..bc192a5e21a 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
@@ -36,8 +36,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{l3regex}{Support package l3kernel too old}
@@ -49,7 +49,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3regex.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3regex.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental regular expressions}
%</driver|package>
%<*driver>
@@ -753,7 +753,7 @@
%<*package>
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str, l3str-convert}
+\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str-convert}
%</package>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
index c964ec55822..df7047f93ed 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str-convert.dtx 5998 2015-09-11 19:51:00Z joseph $
+\GetIdInfo$Id: l3str-convert.dtx 6106 2015-09-26 08:54:30Z joseph $
{L3 Experimental string encoding conversions}
%</driver|package>
%<*driver>
@@ -296,7 +296,7 @@
% \begin{macrocode}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3str,l3tl-analysis,l3tl-build,l3flag}
+\RequirePackage{l3tl-analysis,l3tl-build,l3flag}
% \end{macrocode}
%
% \subsection{Helpers}
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx
deleted file mode 100644
index 95ef2a826ed..00000000000
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx
+++ /dev/null
@@ -1,984 +0,0 @@
-% \iffalse meta-comment
-%
-%% File: l3str.dtx Copyright (C) 2011-2015 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3experimental bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
-%
-%<*driver|package>
-% The version of expl3 required is tested as early as possible, as
-% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
-%<package> {}
-%<package> {%
-%<package> \PackageError{l3str}{Support package l3kernel too old}
-%<package> {%
-%<package> Please install an up to date version of l3kernel\MessageBreak
-%<package> using your TeX package manager or from CTAN.\MessageBreak
-%<package> \MessageBreak
-%<package> Loading l3str will abort!%
-%<package> }%
-%<package> \endinput
-%<package> }
-\GetIdInfo$Id: l3str-expl.dtx 6001 2015-09-11 21:50:23Z joseph $
- {L3 Experimental strings}
-\def\ExplFileName{l3str}
-%</driver|package>
-%<*driver>
-\documentclass[full]{l3doc}
-\usepackage{amsmath}
-\begin{document}
- \DocInput{\jobname.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-%
-% \title{^^A
-% The \textsf{l3str} package: manipulating strings of characters^^A
-% \thanks{This file describes v\ExplFileVersion,
-% last revised \ExplFileDate.}^^A
-% }
-%
-% \author{^^A
-% The \LaTeX3 Project\thanks
-% {^^A
-% E-mail:
-% \href{mailto:latex-team@latex-project.org}
-% {latex-team@latex-project.org}^^A
-% }^^A
-% }
-%
-% \date{Released \ExplFileDate}
-%
-% \maketitle
-%
-% \tableofcontents
-%
-% \begin{documentation}
-%
-% \LaTeX3 provides a set of functions to manipulate token lists
-% as strings of characters, ignoring the category codes of those
-% characters.
-%
-% String variables are simply specialised token lists, but by convention
-% should be named with the suffix \texttt{\ldots{}str}. Such variables
-% should contain characters with category code $12$ (other), except
-% spaces, which have category code $10$ (blank space). All the
-% functions in this module which accept a token list argument first
-% convert it to a string using \cs{tl_to_str:n} for internal processing,
-% and will not treat a token list or the corresponding string
-% representation differently.
-%
-% Most expandable functions in this module come in three flavours:
-% \begin{itemize}
-% \item \cs{str_...:N}, which expect a token list or string
-% variable as their argument;
-% \item \cs{str_...:n}, taking any token list (or string) as an
-% argument;
-% \item \cs{str_..._ignore_spaces:n}, which ignores any space
-% encountered during the operation: these functions are typically
-% faster than those which take care of escaping spaces
-% appropriately.
-% \end{itemize}
-%
-% \section{Building strings}
-%
-% \begin{variable}
-% {
-% \c_backslash_str,
-% \c_left_brace_str,
-% \c_right_brace_str,
-% \c_hash_str,
-% \c_tilde_str,
-% \c_percent_str
-% }
-% Constant strings, containing a single character token, with category
-% code $12$. Any character can be accessed as \cs{iow_char:N}
-% |\|\meta{character}.
-% \end{variable}
-%
-% \begin{function}{\str_new:N, \str_new:c}
-% \begin{syntax}
-% \cs{str_new:N} \meta{str~var}
-% \end{syntax}
-% Creates a new \meta{str~var} or raises an error if the name is
-% already taken. The declaration is global. The \meta{str~var} will
-% initially be empty.
-% \end{function}
-%
-% \begin{function}{\str_const:Nn, \str_const:Nx, \str_const:cn, \str_const:cx}
-% \begin{syntax}
-% \cs{str_const:Nn} \meta{str~var} \Arg{token list}
-% \end{syntax}
-% Creates a new constant \meta{str~var} or raises an error if the name
-% is already taken. The value of the \meta{str~var} will be set
-% globally to the \meta{token list}, converted to a string.
-% \end{function}
-%
-% \begin{function}
-% {
-% \str_set:Nn, \str_set:Nx, \str_set:cn, \str_set:cx,
-% \str_gset:Nn, \str_gset:Nx, \str_gset:cn, \str_gset:cx
-% }
-% \begin{syntax}
-% \cs{str_set:Nn} \meta{str var} \Arg{token list}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{string}, and stores the
-% result in \meta{str var}.
-% \end{function}
-%
-% \begin{function}
-% {
-% \str_put_left:Nn, \str_put_left:Nx,
-% \str_put_left:cn, \str_put_left:cx,
-% \str_gput_left:Nn, \str_gput_left:Nx,
-% \str_gput_left:cn, \str_gput_left:cx
-% }
-% \begin{syntax}
-% \cs{str_put_left:Nn} \meta{str var} \Arg{token list}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{string}, and prepends the
-% result to \meta{str var}. The current contents of the \meta{str
-% var} are not automatically converted to a string.
-% \end{function}
-%
-% \begin{function}
-% {
-% \str_put_right:Nn, \str_put_right:Nx,
-% \str_put_right:cn, \str_put_right:cx,
-% \str_gput_right:Nn, \str_gput_right:Nx,
-% \str_gput_right:cn, \str_gput_right:cx
-% }
-% \begin{syntax}
-% \cs{str_put_right:Nn} \meta{str var} \Arg{token list}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{string}, and appends the
-% result to \meta{str var}. The current contents of the \meta{str
-% var} are not automatically converted to a string.
-% \end{function}
-%
-% \section{Accessing the contents of a string}
-%
-% \begin{function}[EXP]
-% {\str_count:N, \str_count:n, \str_count_ignore_spaces:n}
-% \begin{syntax}
-% \cs{str_count:n} \Arg{token list}
-% \end{syntax}
-% Leaves in the input stream the number of characters in the string
-% representation of \meta{token list}, as an integer denotation. The
-% functions differ in their treatment of spaces. In the case of
-% \cs{str_count:N} and \cs{str_count:n}, all characters including
-% spaces are counted. The \cs{str_count_ignore_spaces:n} function
-% leaves the number of non-space characters in the input stream.
-% \end{function}
-%
-% \begin{function}[EXP]{\str_count_spaces:N, \str_count_spaces:n}
-% \begin{syntax}
-% \cs{str_count_spaces:n} \Arg{token list}
-% \end{syntax}
-% Leaves in the input stream the number of space characters in the
-% string representation of \meta{token list}, as an integer
-% denotation. Of course, this function has no \texttt{_ignore_spaces}
-% variant.
-% \end{function}
-%
-% \begin{function}[EXP]{\str_head:N, \str_head:n, \str_head_ignore_spaces:n}
-% \begin{syntax}
-% \cs{str_head:n} \Arg{token list}
-% \end{syntax}
-% Converts the \meta{token list} into a \meta{string}. The first
-% character in the \meta{string} is then left in the input stream,
-% with category code \enquote{other}. The functions differ if the
-% first character is a space: \cs{str_head:N} and \cs{str_head:n}
-% return a space token with category code~$10$ (blank space), while
-% the \cs{str_head_ignore_spaces:n} function ignores this space
-% character and leaves the first non-space character in the input
-% stream. If the \meta{string} is empty (or only contains spaces in
-% the case of the \texttt{_ignore_spaces} function), then nothing is
-% left on the input stream.
-% \end{function}
-%
-% \begin{function}[EXP]{\str_tail:N, \str_tail:n, \str_tail_ignore_spaces:n}
-% \begin{syntax}
-% \cs{str_tail:n} \Arg{token list}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{string}, removes the first
-% character, and leaves the remaining characters (if any) in the input
-% stream, with category codes $12$ and $10$ (for spaces). The
-% functions differ in the case where the first character is a space:
-% \cs{str_tail:N} and \cs{str_tail:n} will trim only that space, while
-% \cs{str_tail_ignore_spaces:n} removes the first non-space character
-% and any space before it. If the \meta{token list} is empty (or
-% blank in the case of the \texttt{_ignore_spaces} variant), then
-% nothing is left on the input stream.
-% \end{function}
-%
-% \begin{function}[EXP]{\str_item:Nn, \str_item:nn, \str_item_ignore_spaces:nn}
-% \begin{syntax}
-% \cs{str_item:nn} \Arg{token list} \Arg{integer expression}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{string}, and leaves in the
-% input stream the character in position \meta{integer expression} of
-% the \meta{string}, starting at $1$ for the first (left-most)
-% character. In the case of \cs{str_item:Nn} and \cs{str_item:nn},
-% all characters including spaces are taken into account. The
-% \cs{str_item_ignore_spaces:nn} function skips spaces when counting
-% characters. If the \meta{integer expression} is negative,
-% characters are counted from the end of the \meta{string}. Hence,
-% $-1$ is the right-most character, \emph{etc.}
-% \end{function}
-%
-% \begin{function}[EXP]
-% {\str_range:Nnn, \str_range:nnn, \str_range_ignore_spaces:nnn}
-% \begin{syntax}
-% \cs{str_range:nnn} \Arg{token list} \Arg{start index} \Arg{end index}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{string}, and leaves in the
-% input stream the characters from the \meta{start index} to the
-% \meta{end index} inclusive. Positive \meta{indices} are counted
-% from the start of the string, $1$~being the first character, and
-% negative \meta{indices} are counted from the end of the string,
-% $-1$~being the last character. If either of \meta{start index} or
-% \meta{end index} is~$0$, the result is empty. For instance,
-% \begin{verbatim}
-% \iow_term:x { \str_range:nnn { abcdef } { 2 } { 5 } }
-% \iow_term:x { \str_range:nnn { abcdef } { -4 } { -1 } }
-% \iow_term:x { \str_range:nnn { abcdef } { -2 } { -1 } }
-% \iow_term:x { \str_range:nnn { abcdef } { 0 } { -1 } }
-% \end{verbatim}
-% will print \texttt{bcd}, \texttt{cdef}, \texttt{ef}, and an empty
-% line to the terminal.
-% \end{function}
-%
-% \section{Viewing strings}
-%
-% \begin{function}{\str_show:N, \str_show:c, \str_show:n}
-% \begin{syntax}
-% \cs{str_show:N} \meta{tl~var}
-% \end{syntax}
-% Displays the content of the \meta{str~var} on the terminal.
-% \end{function}
-%
-% \section{Scratch strings}
-%
-% \begin{variable}{\l_tmpa_str, \l_tmpb_str}
-% Scratch strings for local assignment. These are never used by
-% the kernel code, and so are safe for use with any \LaTeX3-defined
-% function. However, they may be overwritten by other non-kernel
-% code and so should only be used for short-term storage.
-% \end{variable}
-%
-% \begin{variable}{\g_tmpa_str, \g_tmpb_str}
-% Scratch strings for global assignment. These are never used by
-% the kernel code, and so are safe for use with any \LaTeX3-defined
-% function. However, they may be overwritten by other non-kernel
-% code and so should only be used for short-term storage.
-% \end{variable}
-%
-% \section{Internal \pkg{l3str} functions}
-%
-% \begin{function}[EXP]{\__str_to_other:n}
-% \begin{syntax}
-% \cs{__str_to_other:n} \Arg{token list}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{other string}, where
-% spaces have category code \enquote{other}. This function can be
-% \texttt{f}-expanded without fear of losing a leading space, since
-% spaces do not have category code $10$ in its result. It takes a
-% time quadratic in the character count of the string, but there exist
-% non-expandable ways to reach linear time.
-% \end{function}
-%
-% \begin{function}[EXP]{\__str_count_unsafe:n}
-% \begin{syntax}
-% \cs{__str_count_unsafe:n} \Arg{other string}
-% \end{syntax}
-% This function expects an argument that is entirely made of
-% characters with category \enquote{other}, as produced by
-% \cs{__str_to_other:n}. It leaves in the input stream the number of
-% character tokens in the \meta{other string}, faster than the
-% analogous \cs{str_count:n} function.
-% \end{function}
-%
-% \begin{function}[EXP]{\__str_range_unsafe:nnn}
-% \begin{syntax}
-% \cs{__str_range_unsafe:nnn} \Arg{other string} \Arg{start index} \Arg{end index}
-% \end{syntax}
-% Identical to \cs{str_range:nnn} except that the first argument is
-% expected to be entirely made of characters with category
-% \enquote{other}, as produced by \cs{__str_to_other:n}, and the
-% result is also an \meta{other string}.
-% \end{function}
-%
-% \section{Possible additions to \pkg{l3str}}
-%
-% Semantically correct copies of some \texttt{tl} functions.
-% \begin{itemize}
-% \item \cs{c_space_str}
-% \item \cs{str_clear:N}, \cs{str_gclear:N}, \cs{str_clear_new:N},
-% \cs{str_gclear_new:N}.
-% \item \cs{str_concat:NNN}, \cs{str_gconcat:NNN}
-% \item \cs{str_set_eq:NN}, \cs{str_gset_eq:NN}
-% \item \cs{str_if_empty:NTF}, \cs{str_if_empty_p:N}
-% \item \cs{str_if_exist:NTF}, \cs{str_if_exist_p:N}
-% \item \cs{str_use:N}
-% \end{itemize}
-%
-% Some functions that are not copies of \texttt{tl} functions.
-% \begin{itemize}
-% \item \cs{str_if_blank:NTF}, \cs{str_if_blank_p:N}.
-% \item \cs{str_map_inline:Nn}, \cs{str_map_function:NN},
-% \cs{str_map_variable:NNn}, and \texttt{:n} analogs.
-% \item Expandable \cs{str_if_in:nnTF}?
-% \item \cs{str_if_head_eq:nNTF}, \cs{str_if_head_eq_p:nN}
-% \item \cs{str_if_numeric/decimal/integer:n}, perhaps in \pkg{l3fp}?
-% \end{itemize}
-%
-% \end{documentation}
-%
-% \begin{implementation}
-%
-% \section{\pkg{l3str} implementation}
-%
-% \begin{macrocode}
-%<*initex|package>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<@@=str>
-% \end{macrocode}
-%
-% \begin{macrocode}
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-% \end{macrocode}
-%
-% The following string-related functions are currently defined in
-% \pkg{l3kernel}.
-% \begin{itemize}
-% \item \cs{str_if_eq:nn}[pTF] and variants,
-% \item \cs{str_if_eq_x_return:on}, \cs{str_if_eq_x_return:nn}
-% \item \cs{tl_to_str:n}, \cs{tl_to_str:N}, \cs{tl_to_str:c},
-% \item \cs{token_to_str:N}, \cs{cs_to_str:N}
-% \item \cs{str_head:n}, \cs{__str_head:w}, (copied here)
-% \item \cs{str_tail:n}, \cs{__str_tail:w}, (copied here)
-% \item \cs{__str_count_ignore_spaces} (unchanged)
-% \item \cs{__str_count_loop:NNNNNNNNN} (unchanged)
-% \end{itemize}
-%
-% \subsection{String assignments}
-%
-% \begin{macro}{\str_new:N, \str_new:c}
-% A string is simply a token list.
-% \begin{macrocode}
-\cs_new_eq:NN \str_new:N \tl_new:N
-\cs_generate_variant:Nn \str_new:N { c }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}
-% {
-% \str_set:Nn, \str_set:Nx,
-% \str_set:cn, \str_set:cx,
-% \str_gset:Nn, \str_gset:Nx,
-% \str_gset:cn, \str_gset:cx,
-% \str_const:Nn, \str_const:Nx,
-% \str_const:cn, \str_const:cx,
-% \str_put_left:Nn, \str_put_left:Nx,
-% \str_put_left:cn, \str_put_left:cx,
-% \str_gput_left:Nn, \str_gput_left:Nx,
-% \str_gput_left:cn, \str_gput_left:cx,
-% \str_put_right:Nn, \str_put_right:Nx,
-% \str_put_right:cn, \str_put_right:cx,
-% \str_gput_right:Nn, \str_gput_right:Nx,
-% \str_gput_right:cn, \str_gput_right:cx,
-% }
-% Simply convert the token list inputs to \meta{strings}.
-% \begin{macrocode}
-\tl_map_inline:nn
- {
- { set }
- { gset }
- { const }
- { put_left }
- { gput_left }
- { put_right }
- { gput_right }
- }
- {
- \cs_new_protected:cpx { str_ #1 :Nn } ##1##2
- { \exp_not:c { tl_ #1 :Nx } ##1 { \exp_not:N \tl_to_str:n {##2} } }
- \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :Nn } { Nx , cn , cx }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{String variables and constants}
-%
-% \begin{variable}
-% {
-% \c_backslash_str,
-% \c_left_brace_str,
-% \c_right_brace_str,
-% \c_hash_str,
-% \c_tilde_str,
-% \c_percent_str
-% }
-% For all of those strings, use \cs{cs_to_str:N} to get characters with
-% the correct category code. The conditional for \cs{c_backslash_str}
-% is needed as while this code is experimental others may also
-% define the name (see \pkg{xpatch} for example).
-% \begin{macrocode}
-%<*package>
-\cs_if_exist:NF \c_backslash_str
- { \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } }
-%</package>
-%<*initex>
-\str_const:Nx \c_backslash_str { \cs_to_str:N \\ }
-%</initex>
-\str_const:Nx \c_left_brace_str { \cs_to_str:N \{ }
-\str_const:Nx \c_right_brace_str { \cs_to_str:N \} }
-\str_const:Nx \c_hash_str { \cs_to_str:N \# }
-\str_const:Nx \c_tilde_str { \cs_to_str:N \~ }
-\str_const:Nx \c_percent_str { \cs_to_str:N \% }
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_tmpa_str, \l_tmpb_str, \g_tmpa_str, \g_tmpb_str}
-% Scratch strings.
-% \begin{macrocode}
-\str_new:N \l_tmpa_str
-\str_new:N \l_tmpb_str
-\str_new:N \g_tmpa_str
-\str_new:N \g_tmpb_str
-% \end{macrocode}
-% \end{variable}
-%
-% \subsection{Counting characters}
-%
-% \begin{macro}[EXP]{\str_count_spaces:N, \str_count_spaces:n}
-% \begin{macro}[EXP, aux]{\@@_count_spaces_loop:wwwwwwwww}
-% To speed up this function, we grab and discard $9$ space-delimited
-% arguments in each iteration of the loop. The loop stops when the
-% last argument is one of the trailing |X|\meta{number}, and that
-% \meta{number} is added to the sum of $9$ that precedes, to adjust
-% the result.
-% \begin{macrocode}
-\cs_new_nopar:Npn \str_count_spaces:N
- { \exp_args:No \str_count_spaces:n }
-\cs_new:Npn \str_count_spaces:n #1
- {
- \int_eval:n
- {
- \exp_after:wN \@@_count_spaces_loop:wwwwwwwww
- \tl_to_str:n {#1} ~
- X 7 ~ X 6 ~ X 5 ~ X 4 ~ X 3 ~ X 2 ~ X 1 ~ X 0 ~ X -1 ~
- \q_stop
- }
- }
-\cs_new:Npn \@@_count_spaces_loop:wwwwwwwww #1~#2~#3~#4~#5~#6~#7~#8~#9~
- {
- \if_meaning:w X #9
- \use_i_delimit_by_q_stop:nw
- \fi:
- \c_nine + \@@_count_spaces_loop:wwwwwwwww
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\str_count:N, \str_count:n, \str_count_ignore_spaces:n}
-% \begin{macro}[EXP, int]{\@@_count_unsafe:n}
-% \begin{macro}[EXP, aux]{\@@_count:n, \@@_count_loop:NNNNNNNNN}
-% To count characters in a string we could first escape all spaces
-% using \cs{@@_to_other:n}, then pass the result to \cs{tl_count:n}.
-% However, the escaping step would be quadratic in the number of
-% characters in the string, and we can do better. Namely, sum the
-% number of spaces (\cs{str_count_spaces:n}) and the result of
-% \cs{tl_count:n}, which ignores spaces. Since strings tend to be
-% longer than token lists, we use specialized functions to count
-% characters ignoring spaces. Namely, loop, grabbing $9$ non-space
-% characters at each step, and end as soon as we reach one of the $9$
-% trailing items. The \texttt{_unsafe} variant expects a token list
-% already converted to category code $12$ characters, and is used by
-% \cs{str_item:nn} and \cs{str_range:nnn}.
-% \begin{macrocode}
-\cs_new_nopar:Npn \str_count:N { \exp_args:No \str_count:n }
-\cs_new:Npn \str_count:n #1
- {
- \@@_count:n
- {
- \str_count_spaces:n {#1}
- + \exp_after:wN \@@_count_loop:NNNNNNNNN \tl_to_str:n {#1}
- }
- }
-\cs_new:Npn \@@_count_unsafe:n #1
- {
- \@@_count:n
- { \@@_count_loop:NNNNNNNNN #1 }
- }
-\cs_new:Npn \str_count_ignore_spaces:n #1
- {
- \@@_count:n
- { \exp_after:wN \@@_count_loop:NNNNNNNNN \tl_to_str:n {#1} }
- }
-\cs_new:Npn \@@_count:n #1
- {
- \int_eval:n
- {
- #1
- { X \c_eight } { X \c_seven } { X \c_six }
- { X \c_five } { X \c_four } { X \c_three }
- { X \c_two } { X \c_one } { X \c_zero }
- \q_stop
- }
- }
-\cs_set:Npn \@@_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
- {
- \if_meaning:w X #9
- \exp_after:wN \use_none_delimit_by_q_stop:w
- \fi:
- \c_nine + \@@_count_loop:NNNNNNNNN
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Head and tail of a string}
-%
-% \begin{macro}[EXP]{\str_head:N, \str_head:n, \str_head_ignore_spaces:n}
-% \begin{macro}[EXP, aux]{\@@_head:w}
-% The \texttt{_ignore_spaces} variant is almost identical to
-% \cs{tl_head:n}. As usual, \cs{str_head:N} expands its argument and
-% hands it to \cs{str_head:n}. To circumvent the fact that \TeX{}
-% skips spaces when grabbing undelimited macro parameters,
-% \cs{@@_head:w} takes an argument delimited by a space. If |#1|
-% starts with a non-space character, \cs{use_i_delimit_by_q_stop:nw}
-% leaves that in the input stream. On the other hand, if |#1| starts
-% with a space, the \cs{@@_head:w} takes an empty argument, and the
-% single (initially braced) space in the definition of \cs{@@_head:w}
-% makes its way to the output. Finally, for an empty argument, the
-% (braced) empty brace group in the definition of \cs{str_head:n}
-% gives an empty result after passing through
-% \cs{use_i_delimit_by_q_stop:nw}.
-% \begin{macrocode}
-\cs_new_nopar:Npn \str_head:N { \exp_args:No \str_head:n }
-\cs_set:Npn \str_head:n #1
- {
- \exp_after:wN \@@_head:w
- \tl_to_str:n {#1}
- { { } } ~ \q_stop
- }
-\cs_set:Npn \@@_head:w #1 ~ %
- { \use_i_delimit_by_q_stop:nw #1 { ~ } }
-\cs_new:Npn \str_head_ignore_spaces:n #1
- {
- \exp_after:wN \use_i_delimit_by_q_stop:nw
- \tl_to_str:n {#1} { } \q_stop
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\str_tail:N, \str_tail:n, \str_tail_ignore_spaces:n}
-% \begin{macro}[EXP, aux]{\@@_tail_auxi:w, \@@_tail_auxii:w}
-% Getting the tail is a little bit more convoluted than the head of a
-% string. We hit the front of the string with \cs{reverse_if:N}
-% \cs{if_charcode:w} \cs{scan_stop:}. This removes the first
-% character, and necessarily makes the test true, since the character
-% cannot match \cs{scan_stop:}. The auxiliary function then inserts
-% the required \cs{fi:} to close the conditional, and leaves the tail
-% of the string in the input stream. The details are such that an
-% empty string has an empty tail (this requires in particular that the
-% end-marker |X| be unexpandable and not a control sequence). The
-% \texttt{_ignore_spaces} is rather simpler: after converting the
-% input to a string, \cs{@@_tail_auxii:w} removes one undelimited
-% argument and leaves everything else until an end-marker \cs{q_mark}.
-% One can check that an empty (or blank) string yields an empty
-% tail.
-% \begin{macrocode}
-\cs_new_nopar:Npn \str_tail:N { \exp_args:No \str_tail:n }
-\cs_set:Npn \str_tail:n #1
- {
- \exp_after:wN \@@_tail_auxi:w
- \reverse_if:N \if_charcode:w
- \scan_stop: \tl_to_str:n {#1} X X \q_stop
- }
-\cs_set:Npn \@@_tail_auxi:w #1 X #2 \q_stop { \fi: #1 }
-\cs_new:Npn \str_tail_ignore_spaces:n #1
- {
- \exp_after:wN \@@_tail_auxii:w
- \tl_to_str:n {#1} \q_mark \q_mark \q_stop
- }
-\cs_new:Npn \@@_tail_auxii:w #1 #2 \q_mark #3 \q_stop { #2 }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Accessing specific characters in a string}
-%
-% \begin{macro}[EXP, int]{\@@_to_other:n}
-% \begin{macro}[EXP, aux]{\@@_to_other_loop:w, \@@_to_other_end:w}
-% First apply \cs{tl_to_str:n}, then replace all spaces by
-% \enquote{other} spaces, $8$ at a time, storing the converted part of
-% the string between the \cs{q_mark} and \cs{q_stop} markers. The end
-% is detected when \cs{@@_to_other_loop:w} finds one of the trailing
-% |A|, distinguished from any contents of the initial token list by
-% their category. Then \cs{@@_to_other_end:w} is called, and finds
-% the result between \cs{q_mark} and the first |A| (well, there is
-% also the need to remove a space).
-% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\* } { `\ }
-\char_set_lccode:nn { `\A } { `\A }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new:Npn \@@_to_other:n #1
- {
- \exp_after:wN \@@_to_other_loop:w \tl_to_str:n {#1} ~ %
- A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_mark \q_stop
- }
- \cs_new:Npn \@@_to_other_loop:w
- #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 ~ #7 ~ #8 ~ #9 \q_stop
- {
- \if_meaning:w A #8
- \@@_to_other_end:w
- \fi:
- \@@_to_other_loop:w
- #9 #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * \q_stop
- }
- \cs_new:Npn \@@_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop
- { \fi: #2 }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP, aux]{\@@_skip_exp_end:w}
-% \begin{macro}[EXP, aux]
-% {\@@_skip_loop:wNNNNNNNN, \@@_skip_end:w, \@@_skip_end:NNNNNNNN}
-% Removes |max(#1,0)| characters from the input stream, and then
-% leaves \cs{exp_end:}. This should be expanded using
-% \cs{exp:w}. We remove characters $8$ at a time until
-% there are at most $8$ to remove. Then we do a dirty trick: the
-% \cs{if_case:w} construction leaves between $0$ and $8$ times the
-% \cs{or:} control sequence, and those \cs{or:} become arguments of
-% \cs{@@_skip_end:NNNNNNNN}. If the number of characters to remove
-% is $6$, say, then there are two \cs{or:} left, and the $8$ arguments
-% of \cs{@@_skip_end:NNNNNNNN} are the two \cs{or:}, and $6$
-% characters from the input stream, exactly what we wanted to
-% remove. Then close the \cs{if_case:w} conditional with \cs{fi:}, and
-% stop the initial expansion with \cs{exp_end:} (see places where
-% \cs{@@_skip_exp_end:w} is called).
-% \begin{macrocode}
-\cs_new:Npn \@@_skip_exp_end:w #1;
- {
- \if_int_compare:w #1 > \c_eight
- \exp_after:wN \@@_skip_loop:wNNNNNNNN
- \else:
- \exp_after:wN \@@_skip_end:w
- \int_use:N \__int_eval:w
- \fi:
- #1 ;
- }
-\cs_new:Npn \@@_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
- { \exp_after:wN \@@_skip_exp_end:w \int_use:N \__int_eval:w #1 - \c_eight ; }
-\cs_new:Npn \@@_skip_end:w #1 ;
- {
- \exp_after:wN \@@_skip_end:NNNNNNNN
- \if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or:
- }
-\cs_new:Npn \@@_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP, aux]{\@@_collect_delimit_by_q_stop:w}
-% \begin{macro}[EXP, aux]
-% {
-% \@@_collect_loop:wn, \@@_collect_loop:wnNNNNNNN,
-% \@@_collect_end:wn, \@@_collect_end:nnnnnnnnw
-% }
-% Collects |max(#1,0)| characters, and removes everything else until
-% \cs{q_stop}. This is somewhat similar to \cs{@@_skip_exp_end:w}, but
-% accepts integer expression arguments. This time we can only grab
-% $7$ characters at a time. At the end, we use an \cs{if_case:w}
-% trick again, so that the $8$ first arguments of
-% \cs{@@_collect_end:nnnnnnnnw} are some \cs{or:}, followed by an
-% \cs{fi:}, followed by |#1| characters from the input stream. Simply
-% leaving this in the input stream will close the conditional properly
-% and the \cs{or:} disappear.
-% \begin{macrocode}
-\cs_new:Npn \@@_collect_delimit_by_q_stop:w #1;
- { \@@_collect_loop:wn #1 ; { } }
-\cs_new:Npn \@@_collect_loop:wn #1 ;
- {
- \if_int_compare:w #1 > \c_seven
- \exp_after:wN \@@_collect_loop:wnNNNNNNN
- \else:
- \exp_after:wN \@@_collect_end:wn
- \fi:
- #1 ;
- }
-\cs_new:Npn \@@_collect_loop:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9
- {
- \exp_after:wN \@@_collect_loop:wn
- \int_use:N \__int_eval:w #1 - \c_seven ;
- { #2 #3#4#5#6#7#8#9 }
- }
-\cs_new:Npn \@@_collect_end:wn #1 ;
- {
- \exp_after:wN \@@_collect_end:nnnnnnnnw
- \if_case:w \if_int_compare:w #1 > \c_zero #1 \else: 0 \fi: \exp_stop_f:
- \or: \or: \or: \or: \or: \or: \fi:
- }
-\cs_new:Npn \@@_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop
- { #1#2#3#4#5#6#7#8 }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\str_item:Nn, \str_item:nn, \str_item_ignore_spaces:nn}
-% \begin{macro}[EXP, aux]{\@@_item_unsafe:nn, \@@_item:ww}
-% The \cs{str_item:nn} hands its argument with spaces escaped to
-% \cs{@@_item_unsafe:nn}, and makes sure to turn the result back into
-% a proper string (with category code~$10$ spaces) eventually. The
-% \cs{str_item_ignore_spaces:nn} function cheats a little bit in that
-% it doesn't hand to \cs{@@_item_unsafe:nn} an \enquote{other string}.
-% This is safe, as everything else is done with undelimited arguments.
-% Then evaluate the \meta{index} argument~|#2| and count characters in
-% the string, passing those two numbers to \cs{@@_item:ww} for further
-% analysis. If the \meta{index} is negative, shift by |#2|, and
-% remove that number of characters before returning the next item in
-% the input stream (and if |#1| is smaller than $-|#2|$, nothing is
-% returned). If the \meta{index} is positive, ignore that number
-% (minus one) of characters before returning the next one. The shift
-% by one is obtained by inserting an empty brace group before the
-% string in that case: that brace group also covers the case where the
-% \meta{index} is zero.
-% \begin{macrocode}
-\cs_new_nopar:Npn \str_item:Nn { \exp_args:No \str_item:nn }
-\cs_new:Npn \str_item:nn #1#2
- {
- \exp_args:Nf \tl_to_str:n
- {
- \exp_args:Nf \@@_item_unsafe:nn
- { \@@_to_other:n {#1} } {#2}
- }
- }
-\cs_new:Npn \str_item_ignore_spaces:nn #1
- { \exp_args:No \@@_item_unsafe:nn { \tl_to_str:n {#1} } }
-\cs_new:Npn \@@_item_unsafe:nn #1#2
- {
- \exp_after:wN \@@_item:ww
- \int_use:N \__int_eval:w #2 \exp_after:wN ;
- \__int_value:w \@@_count_unsafe:n {#1} ;
- #1 \q_stop
- }
-\cs_new:Npn \@@_item:ww #1; #2;
- {
- \int_compare:nNnTF {#1} < \c_zero
- {
- \int_compare:nNnTF {#1} < {-#2}
- { \use_none_delimit_by_q_stop:w }
- {
- \exp_after:wN \use_i_delimit_by_q_stop:nw
- \exp:w \exp_after:wN \@@_skip_exp_end:w
- \int_use:N \__int_eval:w #1 + #2 ;
- }
- }
- {
- \int_compare:nNnTF {#1} > {#2}
- { \use_none_delimit_by_q_stop:w }
- {
- \exp_after:wN \use_i_delimit_by_q_stop:nw
- \exp:w \@@_skip_exp_end:w #1 ; { }
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP, aux]{\@@_range_normalize:nn}
-% This function converts an \meta{index} argument into an explicit
-% position in the string (a result of $0$ denoting \enquote{out of
-% bounds}). Expects two explicit integer arguments: the
-% \meta{index} |#1| and the string count~|#2|. If |#1| is negative,
-% replace it by $|#1| + |#2| + 1$, then limit to the range $[0,
-% |#2|]$.
-% \begin{macrocode}
-\cs_new:Npn \@@_range_normalize:nn #1#2
- {
- \int_eval:n
- {
- \if_int_compare:w #1 < \c_zero
- \if_int_compare:w #1 < -#2 \exp_stop_f:
- \c_zero
- \else:
- #1 + #2 + \c_one
- \fi:
- \else:
- \if_int_compare:w #1 < #2 \exp_stop_f:
- #1
- \else:
- #2
- \fi:
- \fi:
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[EXP]
-% {\str_range:Nnn, \str_range:nnn, \str_range_ignore_spaces:nnn}
-% \begin{macro}[EXP, int]{\@@_range_unsafe:nnn}
-% \begin{macro}[EXP, aux]{\@@_range:www, \@@_range:nnw}
-% Sanitize the string. Then evaluate the arguments. At this stage we
-% also decrement the \meta{start index}, since our goal is to know how
-% many characters should be removed. Then limit the range to be
-% non-negative and at most the length of the string (this avoids
-% needing to check for the end of the string when grabbing
-% characters), shifting negative numbers by the appropriate amount.
-% Afterwards, skip characters, then keep some more, and finally drop
-% the end of the string.
-% \begin{macrocode}
-\cs_new_nopar:Npn \str_range:Nnn { \exp_args:No \str_range:nnn }
-\cs_new:Npn \str_range:nnn #1#2#3
- {
- \exp_args:Nf \tl_to_str:n
- {
- \exp_args:Nf \@@_range_unsafe:nnn
- { \@@_to_other:n {#1} } {#2} {#3}
- }
- }
-\cs_new:Npn \str_range_ignore_spaces:nnn #1
- { \exp_args:No \@@_range_unsafe:nnn { \tl_to_str:n {#1} } }
-\cs_new:Npn \@@_range_unsafe:nnn #1#2#3
- {
- \exp_after:wN \@@_range:www
- \__int_value:w \@@_count_unsafe:n {#1} \exp_after:wN ;
- \int_use:N \__int_eval:w #2 - \c_one \exp_after:wN ;
- \int_use:N \__int_eval:w #3 ;
- #1 \q_stop
- }
-\cs_new:Npn \@@_range:www #1; #2; #3;
- {
- \exp_args:Nf \@@_range:nnw
- { \@@_range_normalize:nn {#2} {#1} }
- { \@@_range_normalize:nn {#3} {#1} }
- }
-\cs_new:Npn \@@_range:nnw #1#2
- {
- \exp_after:wN \@@_collect_delimit_by_q_stop:w
- \int_use:N \__int_eval:w #2 - #1 \exp_after:wN ;
- \exp:w \@@_skip_exp_end:w #1 ;
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{String conditionals}
-%
-% \begin{macro}[EXP, pTF]{\str_if_eq:NN}
-% \begin{macro}[EXP, pTF]{\str_if_eq:nn, \str_if_eq_x:nn}
-% Note that \cs{str_if_eq:NN} is different from
-% \cs{tl_if_eq:NN} because it needs to ignore category codes.
-% \begin{macrocode}
-\prg_new_conditional:Npnn \str_if_eq:NN #1#2 { p , TF , T , F }
- {
- \if_int_compare:w \__str_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 }
- = \c_zero \prg_return_true: \else: \prg_return_false: \fi:
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP, TF]{\str_case:nn, \str_case:on, \str_case_x:nn}
-% Defined in \pkg{l3basics} at present.
-% \end{macro}
-%
-% \subsection{Viewing strings}
-%
-% \begin{macro}{\str_show:n, \str_show:N, \str_show:c}
-% Displays a string on the terminal.
-% \begin{macrocode}
-\cs_new_eq:NN \str_show:n \tl_show:n
-\cs_new_eq:NN \str_show:N \tl_show:N
-\cs_generate_variant:Nn \str_show:N { c }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Deprecated string functions}
-%
-% Deprecated 2013-01-20 for removal by 2013-04-30
-% \begin{macro}[EXP]
-% {\str_substr:Nnn, \str_substr:nnn, \str_substr_ignore_spaces:nnn}
-% \begin{macro}[EXP, aux]{\@@_substr:nnn}
-% These functions used to allow for an empty argument to denote the
-% start/end of the string. We reimplement them here by first checking
-% for an empty argument, then only calling the appropriate version of
-% the \cs{str_range:nnn} function.
-% \begin{macrocode}
-\cs_new:Npn \str_substr:Nnn #1 { \@@_substr:nnn { \str_range:Nnn #1 } }
-\cs_new:Npn \str_substr:nnn #1 { \@@_substr:nnn { \str_range:nnn {#1} } }
-\cs_new:Npn \str_substr_ignore_spaces:nnn #1
- { \@@_substr:nnn { \str_range_ignore_spaces:nnn {#1} } }
-\cs_new:Npn \@@_substr:nnn #1#2#3
- {
- \tl_if_empty:nTF {#2}
- { \tl_if_empty:nTF {#3} { #1 { 1} { -1 } } { #1 { 1} {#3} } }
- { \tl_if_empty:nTF {#3} { #1 {#2} { -1 } } { #1 {#2} {#3} } }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Deprecated 2013-01-20 for removal by 2013-04-30
-% \begin{variable}{\c_lbrace_str, \c_rbrace_str}
-% \begin{macrocode}
-\cs_new_eq:NN \c_lbrace_str \c_left_brace_str
-\cs_new_eq:NN \c_rbrace_str \c_right_brace_str
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macrocode}
-%</initex|package>
-% \end{macrocode}
-%
-% \end{implementation}
-%
-% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
index e1298f9ca9d..89e650c53ca 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str-format.dtx 5906 2015-09-02 13:17:05Z mittelba $
+\GetIdInfo$Id: l3str-format.dtx 6009 2015-09-18 08:09:21Z joseph $
{L3 Experimental string formatting}
%</driver|package>
%<*driver>
@@ -355,7 +355,7 @@
\use:nf { #2 #1 }
{
\prg_replicate:nn
- { \int_max:nn { #3 - \__str_count_unsafe:n { #2 #1 } } { 0 } }
+ { \int_max:nn { #3 - \__str_count:n { #2 #1 } } { 0 } }
{#4}
}
}
@@ -374,7 +374,7 @@
\cs_new:cpn { @@_align_>:nnnN } #1#2#3#4
{
\prg_replicate:nn
- { \int_max:nn { #3 - \__str_count_unsafe:n { #2 #1 } } { 0 } }
+ { \int_max:nn { #3 - \__str_count:n { #2 #1 } } { 0 } }
{#4}
#2 #1
}
@@ -399,7 +399,7 @@
\prg_replicate:nn
{
\int_max:nn \c_zero
- { #3 - \__str_count_unsafe:n { #2 #1 } - \c_one }
+ { #3 - \__str_count:n { #2 #1 } - \c_one }
/ \c_two
}
{#4}
@@ -409,7 +409,7 @@
\prg_replicate:nn
{
\int_max:nn \c_zero
- { #3 - \__str_count_unsafe:n { #2 #1 } }
+ { #3 - \__str_count:n { #2 #1 } }
/ \c_two
}
{#4}
@@ -433,7 +433,7 @@
\use:nf {#2}
{
\prg_replicate:nn
- { \int_max:nn { #3 - \__str_count_unsafe:n { #2 #1 } } { 0 } }
+ { \int_max:nn { #3 - \__str_count:n { #2 #1 } } { 0 } }
{#4}
}
#1
@@ -472,9 +472,9 @@
% a trailing \cs{s__stop} for later retrieval. Then check that there
% was no \meta{sign}. The width will be useful later, store it after
% \cs{s__stop}. Afterwards, store the precision, and the function
-% \cs{__str_range_unsafe:nnn} that will be used to extract the first
+% \cs{__str_range:nnn} that will be used to extract the first
% |#5| characters of the string.
-% There is a need to use the \enquote{unsafe} function, as otherwise
+% There is a need to use the internal function, as otherwise
% leading spaces would get stripped by |f|-expansion. Finally, check
% that the \meta{style} is |?| or |s|.
% \begin{macrocode}
@@ -498,8 +498,8 @@
}
\@@_put:nw { {#4} }
\tl_if_empty:nTF {#5}
- { \@@_put:nw { \__str_range_unsafe:nnn { {1} {-1} } } }
- { \@@_put:nw { \__str_range_unsafe:nnn { {1} {#5} } } }
+ { \@@_put:nw { \__str_range:nnn { {1} {-1} } } }
+ { \@@_put:nw { \__str_range:nnn { {1} {#5} } } }
\token_if_eq_charcode:NNF #6 s
{
\token_if_eq_charcode:NNF #6 ?
@@ -891,7 +891,7 @@
{
\use:nf
{ #1 . #2 }
- { \prg_replicate:nn { #4 - \__str_count_unsafe:n {#2} } {0} }
+ { \prg_replicate:nn { #4 - \__str_count:n {#2} } {0} }
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.ins b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.ins
index 0cb61fee4cc..e69aafec338 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.ins
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.ins
@@ -1,6 +1,6 @@
\iffalse meta-comment
-File l3str.ins Copyright (C) 2011, 2013 The LaTeX3 Project
+File l3str.ins Copyright (C) 2011, 2013, 2015 The LaTeX3 Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -36,7 +36,6 @@ Do not distribute a modified version of this file.
\keepsilent
\generate{\file{l3flag.sty} {\from{l3flag.dtx} {package}}}
-\generate{\file{l3str.sty} {\from{l3str-expl.dtx}{package}}}
\generate{\file{l3regex.sty} {\from{l3regex.dtx} {package}}}
\generate{\file{l3str-convert.sty} {\from{l3str-convert.dtx} {package}}}
\generate{\file{l3str-format.sty} {\from{l3str-format.dtx} {package}}}
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx
index e40e4fae79e..43b7308ca6e 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3tl-analysis.dtx 5899 2015-08-31 21:49:59Z joseph $
+\GetIdInfo$Id: l3tl-analysis.dtx 6106 2015-09-26 08:54:30Z joseph $
{L3 Experimental token lists analysis}
%</driver|package>
%<*driver>
@@ -190,7 +190,6 @@
% \begin{macrocode}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3str}
% \end{macrocode}
%
% \subsection{Variables and helper functions}
diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
index 305a91b629d..8f8ee755232 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
@@ -38,8 +38,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{l3galley}{Support package l3kernel too old}
@@ -51,7 +51,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3galley.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3galley.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental galley code}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index b0dbaa76993..753aeb0ec53 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -36,8 +36,8 @@
%<*driver|generic|package>
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 programming layer}
-\def\ExplFileDate{2015/09/11}
-\def\ExplFileVersion{6002}
+\def\ExplFileDate{2015/09/27}
+\def\ExplFileVersion{6111}
%</driver|generic|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -427,6 +427,10 @@
% \item[seq] sequence: a data-type used to implement lists (with
% access at both ends) and stacks;
% \item[skip] \enquote{rubber} lengths;
+% \item[str] \TeX{} strings: a special case of |tl| in which all
+% characters have category \enquote{other} (catcode~$12$),
+% other than spaces which are category \enquote{space}
+% (catcode~$10$);
% \item[tl] \enquote{token list variables}: placeholders for token lists.
% \end{description}
% When the \meta{type} and \meta{module} are identical (as often happens in
@@ -1286,7 +1290,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, TF]{\__expl_if_pdf:}
% \begin{variable}[int]{\l__expl_driver_tl}
% \begin{variable}[int]{\l__expl_native_drivers_bool}
% With the code now loaded, options can be handled using a real key--value
@@ -1302,21 +1305,6 @@
active~engine.~LaTeX3~will~use~the~'#2'~driver~instead.
}
\tl_new:N \l__expl_driver_tl
-\bool_if:nTF
- {
- \cs_if_exist_p:N \pdftex_pdfoutput:D
- && \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero
- }
- {
- \cs_new_eq:NN \__expl_if_pdf:T \use:n
- \cs_new_eq:NN \__expl_if_pdf:F \use_none:n
- \cs_new_eq:NN \__expl_if_pdf:TF \use_i:nn
- }
- {
- \cs_new_eq:NN \__expl_if_pdf:T \use_none:n
- \cs_new_eq:NN \__expl_if_pdf:F \use:n
- \cs_new_eq:NN \__expl_if_pdf:TF \use_ii:nn
- }
\keys_define:nn { expl }
{
driver .choice:,
@@ -1327,7 +1315,7 @@
\sys_if_engine_xetex:TF
{ xdvipdfmx }
{
- \__expl_if_pdf:TF
+ \sys_if_output_pdf:TF
{ pdfmode }
{
\bool_if:nTF
@@ -1351,7 +1339,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
}
{
- \__expl_if_pdf:T
+ \sys_if_output_pdf:T
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ dvipdfmx } { pdfmode }
@@ -1369,7 +1357,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
}
{
- \__expl_if_pdf:T
+ \sys_if_output_pdf:T
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ dvips } { pdfmode }
@@ -1389,7 +1377,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
}
{
- \__expl_if_pdf:F
+ \sys_if_output_pdf:F
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ pdfmode } { dvips }
@@ -1402,7 +1390,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
\sys_if_engine_xetex:F
{
- \__expl_if_pdf:TF
+ \sys_if_output_pdf:TF
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ xdvipdfmx } { pdfmode }
@@ -1433,7 +1421,6 @@
% \end{macrocode}
% \end{variable}
% \end{variable}
-% \end{macro}
%
% \begin{variable}[int]{\c__expl_def_ext_tl}
% Set up to load Unicode data for various string/text manipulations.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
index 2876e8968b6..20063fa76f7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins
@@ -119,6 +119,7 @@ Do not distribute a modified version of this file.
\generate{\file{l3quark.sty} {\from{l3oldmodules.dtx} {l3quark,oldmodules}}}
\generate{\file{l3seq.sty} {\from{l3oldmodules.dtx} {l3seq,oldmodules}}}
\generate{\file{l3skip.sty} {\from{l3oldmodules.dtx} {l3skip,oldmodules}}}
+\generate{\file{l3str.sty} {\from{l3oldmodules.dtx} {l3str,oldmodules}}}
\generate{\file{l3tl.sty} {\from{l3oldmodules.dtx} {l3tl,oldmodules}}}
\generate{\file{l3token.sty} {\from{l3oldmodules.dtx} {l3token,oldmodules}}}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 058c99aba53..7c371c86734 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3basics.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3basics.dtx 6033 2015-09-22 19:48:51Z bruno $
{L3 Basic definitions}
%</driver|package>
%<*driver>
@@ -1366,8 +1366,6 @@
% \end{macrocode}
% \end{macro}
%
-
-
% \begin{macro}[EXP]{\token_to_meaning:N, \cs_meaning:N}
% Examining a control sequence or token.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index f5ad9fc0a00..6c65d33db05 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -38,7 +38,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3candidates.dtx 6002 2015-09-11 22:13:30Z joseph $
+\GetIdInfo$Id: l3candidates.dtx 6039 2015-09-23 12:41:26Z joseph $
{L3 Experimental additions to l3kernel}
%</driver|package>
%<*driver>
@@ -783,28 +783,6 @@
% giving an \meta{integer denotation}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_expandable_uppercase:n, \tl_expandable_lowercase:n}
-% \begin{syntax}
-% \cs{tl_expandable_uppercase:n} \Arg{tokens}
-% \cs{tl_expandable_lowercase:n} \Arg{tokens}
-% \end{syntax}
-% The \cs{tl_expandable_uppercase:n} function works through all of
-% the \meta{tokens}, replacing characters in the range |a|--|z|
-% (with arbitrary category code) by the corresponding letter
-% in the range |A|--|Z|, with category code $11$ (letter). Similarly,
-% \cs{tl_expandable_lowercase:n} replaces characters in the range
-% |A|--|Z| by letters in the range |a|--|z|, and leaves other tokens
-% unchanged. This function requires two steps of expansion.
-% \begin{texnote}
-% Begin-group and end-group characters are normalized and become
-% |{| and |}|, respectively.
-% The result is returned within the \tn{unexpanded}
-% primitive (\cs{exp_not:n}), which means that the token
-% list will not expand further when appearing in an \texttt{x}-type
-% argument expansion.
-% \end{texnote}
-% \end{function}
-%
% \begin{function}[EXP, added = 2014-06-30, updated = 2015-05-07]^^A
% {
% \tl_lower_case:n, \tl_upper_case:n, \tl_mixed_case:n,
@@ -2825,84 +2803,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{variable}{\c_@@_act_uppercase_tl, \c_@@_act_lowercase_tl}
-% These constants contain the correspondence between lowercase
-% and uppercase letters, in the form |aAbBcC...| and |AaBbCc...|
-% respectively.
-% \begin{macrocode}
-\tl_const:Nn \c_@@_act_uppercase_tl
- {
- aA bB cC dD eE fF gG hH iI jJ kK lL mM
- nN oO pP qQ rR sS tT uU vV wW xX yY zZ
- }
-\tl_const:Nn \c_@@_act_lowercase_tl
- {
- Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm
- Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz
- }
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}[EXP]{\tl_expandable_uppercase:n, \tl_expandable_lowercase:n}
-% \begin{macro}[EXP,aux]{\@@_act_case_normal:nN,
-% \@@_act_case_group:nn, \@@_act_case_space:n}
-% The only difference between uppercasing and lowercasing is
-% the table of correspondence that is used. As for other
-% token list actions, we feed \cs{@@_act:NNNnn} three
-% functions, and this time, we use the \meta{parameters}
-% argument to carry which case-changing we are applying.
-% A space is simply output. A normal token is compared
-% to each letter in the alphabet using \cs{str_if_eq:nn}
-% tests, and converted if necessary to upper/lowercase,
-% before being output. For a group, we must perform the
-% conversion within the group (the \cs{exp_after:wN} trigger
-% \cs{exp:w}, which expands fully to give the
-% converted group), then output.
-% \begin{macrocode}
-\cs_new:Npn \tl_expandable_uppercase:n #1
- {
- \etex_unexpanded:D \exp_after:wN
- {
- \exp:w
- \@@_act_case_aux:nn { \c_@@_act_uppercase_tl } {#1}
- }
- }
-\cs_new:Npn \tl_expandable_lowercase:n #1
- {
- \etex_unexpanded:D \exp_after:wN
- {
- \exp:w
- \@@_act_case_aux:nn { \c_@@_act_lowercase_tl } {#1}
- }
- }
-\cs_new:Npn \@@_act_case_aux:nn
- {
- \@@_act:NNNnn
- \@@_act_case_normal:nN
- \@@_act_case_group:nn
- \@@_act_case_space:n
- }
-\cs_new:Npn \@@_act_case_space:n #1 { \@@_act_output:n {~} }
-\cs_new:Npn \@@_act_case_normal:nN #1 #2
- {
- \exp_args:Nf \@@_act_output:n
- {
- \exp_args:NNo \str_case:nnF #2 {#1}
- { \exp_stop_f: #2 }
- }
- }
-\cs_new:Npn \@@_act_case_group:nn #1 #2
- {
- \exp_after:wN \@@_act_output:n \exp_after:wN
- {
- \exp_after:wN
- { \exp:w \@@_act_case_aux:nn {#1} {#2} }
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}^^A
% {
% \tl_set_from_file:Nnn, \tl_set_from_file:cnn,
@@ -4598,12 +4498,7 @@
% \cs{@@_token_generic:NNTF} function.
% \begin{macrocode}
\group_begin:
- \char_set_catcode_other:N \O
- \char_set_catcode_other:N \U
- \char_set_catcode_other:N \T
- \char_set_catcode_other:N \E
- \char_set_catcode_other:N \R
- \tl_to_lowercase:n
+ \cs_set_protected:Npn \@@_tmp:w #1 \q_stop
{
\cs_new_protected_nopar:Npn \@@_execute_branches_N_type:
{
@@ -4615,16 +4510,17 @@
\exp_after:wN \@@_N_type:w
\token_to_meaning:N \l_peek_token
\q_mark \@@_N_type_aux:nnw
- OUTER \q_mark \use_none_delimit_by_q_stop:w
+ #1 \q_mark \use_none_delimit_by_q_stop:w
\q_stop
\exp_after:wN \@@_true:w
\else:
\exp_after:wN \@@_false:w
\fi:
}
- \cs_new_protected:Npn \@@_N_type:w #1 OUTER #2 \q_mark #3
- { #3 {#1} {#2} }
+ \cs_new_protected:Npn \@@_N_type:w ##1 #1 ##2 \q_mark ##3
+ { ##3 {##1} {##2} }
}
+ \exp_after:wN \@@_tmp:w \tl_to_str:n { outer } \q_stop
\group_end:
\cs_new_protected:Npn \@@_N_type_aux:nnw #1 #2 #3 \fi:
{
@@ -4643,24 +4539,6 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Deprecated candidates}
-%
-% \begin{macro}
-% {
-% \fp_set_from_dim:Nn, \fp_set_from_dim:cn,
-% \fp_gset_from_dim:Nn, \fp_gset_from_dim:cn
-% }
-% Deprecated 2014-07-17.
-% \begin{macrocode}
-\cs_new_protected:Npn \fp_set_from_dim:Nn #1#2
- { \fp_set:Nn #1 { \dim_to_fp:n {#2} } }
-\cs_new_protected:Npn \fp_gset_from_dim:Nn #1#2
- { \fp_gset:Nn #1 { \dim_to_fp:n {#2} } }
-\cs_generate_variant:Nn \fp_set_from_dim:Nn { c }
-\cs_generate_variant:Nn \fp_gset_from_dim:Nn { c }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index 502eb1a1e4a..ac09c7635d3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -75,7 +75,7 @@ Do not distribute a modified version of this file.
%
%<*driver|class>
\RequirePackage{expl3,xparse,calc}
-\GetIdInfo$Id: l3doc.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3doc.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Experimental documentation class}
%</driver|class>
%
@@ -2984,7 +2984,7 @@ Do not distribute a modified version of this file.
\char_set_lccode:nn { `\^^B } { `\\ }
\char_set_lccode:nn { `\^^L } { `\{ }
\char_set_lccode:nn { `\^^R } { `\} }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\cs_set_protected:Npn \xmacro@code
@@ -3043,7 +3043,7 @@ Do not distribute a modified version of this file.
{ \g_@@_typeset_implementation_bool && \g_@@_checkfunc_bool }
{
\iow_term:x { \c_@@_iow_separator_tl \iow_newline: }
- \iow_open:Nn \g_@@_func_iow { \c_job_name_tl .cmds }
+ \iow_open:Nn \g_@@_func_iow { \c_sys_jobname_str .cmds }
\tl_clear:N \l_@@_doc_def_tl
\tl_clear:N \l_@@_doc_undef_tl
@@ -3214,7 +3214,7 @@ Do not distribute a modified version of this file.
{
Generate~the~index~by~executing\\
\iow_indent:n
- { makeindex~-s~gind.ist~-o~\c_job_name_tl.ind~\c_job_name_tl.idx }
+ { makeindex~-s~gind.ist~-o~\c_sys_jobname_str.ind~\c_sys_jobname_str.idx }
}
\tl_gput_right:Nn \PrintIndex
{ \AtEndDocument { \msg_info:nn { l3doc } { print-index-howto } } }
@@ -3454,7 +3454,7 @@ Do not distribute a modified version of this file.
{
Generate~the~change~list~by~executing\\
\iow_indent:n
- { makeindex~-s~gglo.ist~-o~\c_job_name_tl.gls~\c_job_name_tl.glo }
+ { makeindex~-s~gglo.ist~-o~\c_sys_jobname_str.gls~\c_sys_jobname_str.glo }
}
\tl_gput_right:Nn \PrintChanges
{ \AtEndDocument { \msg_info:nn { l3doc } { print-changes-howto } } }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 4dfb03bd13c..777f595d34e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3file.dtx 5786 2015-08-05 16:18:39Z bruno $
+\GetIdInfo$Id: l3file.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 File and I/O operations}
%</driver|package>
%<*driver>
@@ -92,7 +92,7 @@
% \begin{variable}{\g_file_current_name_tl}
% Contains the name of the current \LaTeX{} file. This variable
% should not be modified: it is intended for information only. It
-% will be equal to \cs{c_job_name_tl} at the start of a \LaTeX{}
+% will be equal to \cs{c_sys_jobname_str} at the start of a \LaTeX{}
% run and will be modified each time a file is read using
% \cs{file_input:n}.
% \end{variable}
@@ -1548,7 +1548,7 @@
\group_begin:
\char_set_catcode_other:N \*
\char_set_lccode:nn {`\*} {`\ }
- \tl_to_lowercase:n { \tl_const:Nn \c_catcode_other_space_tl { * } }
+ \tex_lowercase:D { \tl_const:Nn \c_catcode_other_space_tl { * } }
\group_end:
% \end{macrocode}
% \end{macro}
@@ -1757,7 +1757,7 @@
\cs_new_protected_nopar:Npn \@@_wrap_word:
{
\int_set:Nn \l_@@_current_word_int
- { \__str_count_ignore_spaces:N \l_@@_current_word_tl }
+ { \exp_args:No \str_count_ignore_spaces:n \l_@@_current_word_tl }
\int_add:Nn \l_@@_current_line_int { \l_@@_current_word_int }
\int_compare:nNnTF \l_@@_current_line_int < \l_@@_target_count_int
{ \@@_wrap_word_fits: }
@@ -1858,37 +1858,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\__str_count_ignore_spaces:N}
-% \begin{macro}[aux]{\__str_count_ignore_spaces:n}
-% \begin{macro}[aux]{\__str_count_loop:NNNNNNNNN}
-% The wrapping code requires to measure the number of character
-% in each word. This could be done with \cs{tl_count:n}, but
-% it is ten times faster (literally) to use the code below.
-% \begin{macrocode}
-\cs_new_nopar:Npn \__str_count_ignore_spaces:N
- { \exp_args:No \__str_count_ignore_spaces:n }
-\cs_new:Npn \__str_count_ignore_spaces:n #1
- {
- \__int_value:w \__int_eval:w
- \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1}
- { X8 } { X7 } { X6 } { X5 } { X4 } { X3 } { X2 } { X1 } { X0 }
- \q_stop
- \__int_eval_end:
- }
-\cs_new:Npn \__str_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
- {
- \if_catcode:w X #9
- \exp_after:wN \use_none_delimit_by_q_stop:w
- \else:
- 9 +
- \exp_after:wN \__str_count_loop:NNNNNNNNN
- \fi:
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \subsection{Messages}
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 2cd25ed4616..42921f9a9da 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-parse.dtx 5893 2015-08-26 16:16:52Z mittelba $
+\GetIdInfo$Id: l3fp-parse.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Floating-point expression parsing}
\begin{document}
\DocInput{\jobname.dtx}
@@ -626,20 +626,17 @@
% the first |s__fp|. If the \meta{token} does not contain that
% string, the result is |_?|.
% \begin{macrocode}
-\group_begin:
-\char_set_catcode_other:N \S
-\char_set_catcode_other:N \F
-\char_set_catcode_other:N \P
-\char_set_lccode:nn { `\- } { `\_ }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new:Npn \@@_type_from_scan:N #1
- {
- \exp_after:wN \@@_type_from_scan:w
- \token_to_str:N #1 \q_mark S--FP-? \q_mark \q_stop
- }
- \cs_new:Npn \@@_type_from_scan:w #1 S--FP #2 \q_mark #3 \q_stop {#2}
+\cs_new:Npx \@@_type_from_scan:N #1
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \@@_type_from_scan:w
+ \exp_not:N \token_to_str:N #1 \exp_not:N \q_mark
+ \tl_to_str:n { s__fp _? } \exp_not:N \q_mark \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \@@_type_from_scan:w
+ ##1 \tl_to_str:n { s__fp } ##2 \exp_not:N \q_mark ##3 \exp_not:N \q_stop
+ {##2}
}
% \end{macrocode}
% \end{macro}
@@ -843,28 +840,27 @@
\exp_after:wN \@@_parse_exponent:N
\exp:w \@@_parse_expand:w
}
-\group_begin:
-\char_set_catcode_other:N \P
-\char_set_catcode_other:N \T
-\char_set_catcode_other:N \M
-\char_set_catcode_other:N \U
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new:Npn \@@_parse_one_register_aux:Nw #1
+\cs_new:Npx \@@_parse_one_register_aux:Nw #1
+ {
+ \exp_not:n
{
\exp_after:wN \use:nn
\exp_after:wN \@@_parse_one_register_auxii:wwwNw
- \exp_after:wN { \tex_the:D #1 }
- ; \@@_parse_one_register_dim:ww
- PT ; \@@_parse_one_register_mu:www
- . PT ; \@@_parse_one_register_int:www
- \q_stop
}
- \cs_new:Npn \@@_parse_one_register_auxii:wwwNw
- #1 . #2 PT #3 ; #4#5 \q_stop { #4 #1.#2; }
- \cs_new:Npn \@@_parse_one_register_mu:www #1 MU; #2;
- { \@@_parse_one_register_dim:ww #1; }
+ \exp_not:N \exp_after:wN { \exp_not:N \tex_the:D #1 }
+ ; \exp_not:N \@@_parse_one_register_dim:ww
+ \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_mu:www
+ . \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_int:www
+ \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \@@_parse_one_register_auxii:wwwNw
+ ##1 . ##2 \tl_to_str:n { pt } ##3 ; ##4##5 \exp_not:N \q_stop
+ { ##4 ##1.##2; }
+ \cs_new:Npn \exp_not:N \@@_parse_one_register_mu:www
+ ##1 \tl_to_str:n { mu } ; ##2 ;
+ { \exp_not:N \@@_parse_one_register_dim:ww ##1 ; }
}
\cs_new:Npn \@@_parse_one_register_int:www #1; #2.; #3;
{ \@@_parse:n { #1 e #3 } }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index cbed3f682f9..93af5dd409b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3int.dtx 5987 2015-09-11 05:44:48Z joseph $
+\GetIdInfo$Id: l3int.dtx 6089 2015-09-25 13:29:50Z mittelba $
{L3 Integers}
%</driver|package>
%<*driver>
@@ -1195,8 +1195,7 @@
\cs_if_exist:NT \luatex_luatexversion:D { 1 }
\cs_if_exist:NT \uptex_disablecjktoken:D
{ \if_int_compare:w \ptex_jis:D "2121 = "3000 ~ 1 \fi: }
- \cs_if_exist:NT \xetex_XeTeXversion:D { 1 }
- ~
+ \cs_if_exist:NT \xetex_XeTeXversion:D { 1 } ~
\cs_if_exist:NTF \uptex_disablecjktoken:D
{ \cs_new_eq:NN \@@_constdef:Nw \uptex_kchardef:D }
{ \cs_new_eq:NN \@@_constdef:Nw \tex_chardef:D }
@@ -1348,7 +1347,11 @@
% Here is how counters are accessed:
% \begin{macrocode}
\cs_new_eq:NN \int_use:N \tex_the:D
-\cs_new:Npn \int_use:c #1 { \int_use:N \cs:w #1 \cs_end: }
+% \end{macrocode}
+% We hand-code this for some speed gain:
+% \begin{macrocode}
+%\cs_generate_variant:Nn \int_use:N { c }
+\cs_new:Npn \int_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index 6f781667d1e..1f9f6b537a4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3keys.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3keys.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Key-value interfaces}
%</driver|package>
%<*driver>
@@ -912,24 +912,24 @@
\group_begin:
\char_set_catcode_active:n { `\= }
\char_set_catcode_active:n { `\, }
- \char_set_lccode:nn { `\8 } { `\= }
- \char_set_lccode:nn { `\9 } { `\, }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new_protected:Npn \@@_parse:n #1
- {
- \group_begin:
- \tl_set:Nn \l_@@_sanitise_tl {#1}
- \tl_replace_all:Nnn \l_@@_sanitise_tl { = } { 8 }
- \tl_replace_all:Nnn \l_@@_sanitise_tl { , } { 9 }
- \tl_clear:N \l_@@_parse_tl
- \exp_after:wN \@@_parse_elt:w \exp_after:wN
- \q_nil \l_@@_sanitise_tl 9 \q_recursion_tail 9 \q_recursion_stop
- \exp_after:wN \group_end:
- \l_@@_parse_tl
- }
- }
+ \cs_new_protected:Npx \@@_parse:n #1
+ {
+ \group_begin:
+ \tl_set:Nn \exp_not:N \l_@@_sanitise_tl {#1}
+ \tl_replace_all:Nnn \exp_not:N \l_@@_sanitise_tl
+ { \exp_not:N = } { \token_to_str:N = }
+ \tl_replace_all:Nnn \exp_not:N \l_@@_sanitise_tl
+ { \exp_not:N , } { \token_to_str:N , }
+ \tl_clear:N \exp_not:N \l_@@_parse_tl
+ \exp_not:N \exp_after:wN
+ \exp_not:N \@@_parse_elt:w \exp_not:N \exp_after:wN
+ \exp_not:N \q_nil \exp_not:N \l_@@_sanitise_tl
+ \token_to_str:N , \exp_not:N \q_recursion_tail
+ \token_to_str:N , \exp_not:N \q_recursion_stop
+ \exp_not:N \exp_after:wN \group_end:
+ \exp_not:N \l_@@_parse_tl
+ }
+\group_end:
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index c2591f5a964..7ff417961b5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3msg.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3msg.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Messages}
%</driver|package>
%<*driver>
@@ -1060,7 +1060,7 @@
\char_set_lccode:nn {`\}} {`\ }
\char_set_lccode:nn {`\&} {`\!}
\char_set_catcode_active:N \&
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\group_end:
\cs_new_protected:Npn \@@_interrupt_text:n #1
@@ -2013,7 +2013,7 @@
\char_set_lccode:nn { `L } { `L }
\char_set_lccode:nn { `T } { `T }
\char_set_lccode:nn { `X } { `X }
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\cs_new:Npx \@@_expandable_error:n #1
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index d9335665249..6b3dafbc2b3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3names.dtx 5939 2015-09-07 21:15:55Z joseph $
+\GetIdInfo$Id: l3names.dtx 6108 2015-09-27 08:58:42Z joseph $
{L3 Namespace for primitives}
%</driver|package>
%<*driver>
@@ -697,8 +697,9 @@
% into the \enquote{base} name. A few cross-compatibility names which lack
% the |pdf| of the original are handled later.
% \begin{macrocode}
+ \__kernel_primitive:NN \suppressfontnotfounderror \xetex_suppressfontnotfounderror:D
\__kernel_primitive:NN \XeTeXcharclass \xetex_charclass:D
- \__kernel_primitive:NN \XeTeXcharglyph \xetex_charcglyph:D
+ \__kernel_primitive:NN \XeTeXcharglyph \xetex_charglyph:D
\__kernel_primitive:NN \XeTeXcountfeatures \xetex_countfeatures:D
\__kernel_primitive:NN \XeTeXcountglyphs \xetex_countglyphs:D
\__kernel_primitive:NN \XeTeXcountselectors \xetex_countselectors:D
@@ -726,7 +727,7 @@
\__kernel_primitive:NN \XeTeXlinebreakskip \xetex_linebreakskip:D
\__kernel_primitive:NN \XeTeXlinebreaklocale \xetex_linebreaklocale:D
\__kernel_primitive:NN \XeTeXlinebreakpenalty \xetex_linebreakpenalty:D
- \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcounfeatures:D
+ \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcountfeatures:D
\__kernel_primitive:NN \XeTeXOTcountlanguages \xetex_OTcountlanguages:D
\__kernel_primitive:NN \XeTeXOTcountscripts \xetex_OTcountscripts:D
\__kernel_primitive:NN \XeTeXOTfeaturetag \xetex_OTfeaturetag:D
@@ -791,7 +792,6 @@
\__kernel_primitive:NN \prehyphenchar \luatex_prehyphenchar:D
\__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D
\__kernel_primitive:NN \scantextokens \luatex_scantextokens:D
- \__kernel_primitive:NN \suppressfontnotfounderror \luatex_suppressfontnotfounderror:D
\__kernel_primitive:NN \suppressifcsnameerror \luatex_suppressifcsnameerror:D
\__kernel_primitive:NN \suppresslongerror \luatex_suppresslongerror:D
\__kernel_primitive:NN \suppressmathparerror \luatex_suppressmathparerror:D
@@ -1068,12 +1068,12 @@
\tex_let:D \luatex_prehyphenchar:D \luatexprehyphenchar
\tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
\tex_let:D \luatex_scantextokens:D \luatexscantextokens
- \tex_let:D \luatex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror
\tex_let:D \luatex_suppressifcsnameerror:D \luatexsuppressifcsnameerror
\tex_let:D \luatex_suppresslongerror:D \luatexsuppresslongerror
\tex_let:D \luatex_suppressmathparerror:D \luatexsuppressmathparerror
\tex_let:D \luatex_suppressoutererror:D \luatexsuppressoutererror
\tex_let:D \utex_char:D \luatexUchar
+ \tex_let:D \xetex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror
% \end{macrocode}
% Which also covers those slightly odd ones.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
index 98272b0f9e7..1dd7223c214 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
@@ -119,6 +119,7 @@
%<l3quark>{l3quark}
%<l3seq>{l3seq}
%<l3skip>{l3skip}
+%<l3str>{l3str}
%<l3tl>{l3tl}
%<l3token>{l3token}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index 4dd4749c814..30cd341ec53 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -38,7 +38,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3skip.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3skip.dtx 6089 2015-09-25 13:29:50Z mittelba $
{L3 Dimensions and skips}
%</driver|package>
%<*driver>
@@ -1409,7 +1409,11 @@
% Accessing a \meta{dim}.
% \begin{macrocode}
\cs_new_eq:NN \dim_use:N \tex_the:D
-\cs_generate_variant:Nn \dim_use:N { c }
+% \end{macrocode}
+% We hand-code this for some speed gain:
+% \begin{macrocode}
+%\cs_generate_variant:Nn \dim_use:N { c }
+\cs_new:Npn \dim_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
% \end{macrocode}
% \end{macro}
%
@@ -1700,7 +1704,8 @@
% Accessing a \meta{skip}.
% \begin{macrocode}
\cs_new_eq:NN \skip_use:N \tex_the:D
-\cs_generate_variant:Nn \skip_use:N { c }
+%\cs_generate_variant:Nn \skip_use:N { c }
+\cs_new:Npn \skip_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index 63129bb4fcb..34d57cf2ff7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3str.dtx Copyright (C) 2014-2015 The LaTeX3 Project
+%% File: l3str.dtx Copyright (C) 2011-2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3str.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3str.dtx 6021 2015-09-20 15:10:27Z joseph $
{L3 Strings}
%</driver|package>
%<*driver>
@@ -79,33 +79,163 @@
% space characters which have category code $10$ (\enquote{space}). Thus
% at a technical level, a \TeX{} string is a token list with the appropriate
% category codes. In this documentation, these will simply be referred to as
-% strings: note that they can be stored in token lists as normal.
+% strings.
%
-% The functions documented here take literal token lists,
-% convert to strings and then carry out manipulations. Thus they may
-% informally be described as \enquote{ignoring} category code. Note that
-% the functions \cs{cs_to_str:N}, \cs{tl_to_str:n}, \cs{tl_to_str:N} and
+% String variables are simply specialised token lists, but by convention
+% should be named with the suffix \texttt{\ldots{}str}. Such variables
+% should contain characters with category code $12$ (other), except
+% spaces, which have category code $10$ (blank space). All the
+% functions in this module which accept a token list argument first
+% convert it to a string using \cs{tl_to_str:n} for internal processing,
+% and will not treat a token list or the corresponding string
+% representation differently.
+%
+% Note that as string variables are a special case of token list variables
+% the coverage of \cs{str_\ldots{}:N} functions is somewhat smaller than
+% \cs{tl_\ldots{}:N}.
+%
+% The functions \cs{cs_to_str:N}, \cs{tl_to_str:n}, \cs{tl_to_str:N} and
% \cs{token_to_str:N} (and variants) will generate strings from the appropriate
% input: these are documented in \pkg{l3basics}, \pkg{l3tl} and \pkg{l3token},
% respectively.
%
-% \section{The first character from a string}
+% Most expandable functions in this module come in three flavours:
+% \begin{itemize}
+% \item \cs{str_...:N}, which expect a token list or string
+% variable as their argument;
+% \item \cs{str_...:n}, taking any token list (or string) as an
+% argument;
+% \item \cs{str_..._ignore_spaces:n}, which ignores any space
+% encountered during the operation: these functions are typically
+% faster than those which take care of escaping spaces
+% appropriately.
+% \end{itemize}
+%
+% \section{Building strings}
%
-% \begin{function}[added = 2011-08-10, EXP]{\str_head:n, \str_tail:n}
+% \begin{function}[added = 2015-09-18]{\str_new:N, \str_new:c}
% \begin{syntax}
-% \cs{str_head:n} \Arg{token list}
-% \cs{str_tail:n} \Arg{token list}
+% \cs{str_new:N} \meta{str~var}
+% \end{syntax}
+% Creates a new \meta{str~var} or raises an error if the name is
+% already taken. The declaration is global. The \meta{str~var} will
+% initially be empty.
+% \end{function}
+%
+% \begin{function}[added = 2015-09-18]
+% {\str_const:Nn, \str_const:Nx, \str_const:cn, \str_const:cx}
+% \begin{syntax}
+% \cs{str_const:Nn} \meta{str~var} \Arg{token list}
+% \end{syntax}
+% Creates a new constant \meta{str~var} or raises an error if the name
+% is already taken. The value of the \meta{str~var} will be set
+% globally to the \meta{token list}, converted to a string.
+% \end{function}
+%
+% \begin{function}[added = 2015-09-18]
+% {\str_clear:N, \str_clear:c, \str_gclear:N, \str_gclear:c}
+% \begin{syntax}
+% \cs{str_clear:N} \meta{str~var}
+% \end{syntax}
+% Clears the content of the \meta{str~var}.
+% \end{function}
+%
+% \begin{function}[added = 2015-09-18]{\str_clear_new:N, \str_clear_new:c}
+% \begin{syntax}
+% \cs{str_clear_new:N} \meta{str~var}
+% \end{syntax}
+% Ensures that the \meta{str~var} exists globally by applying
+% \cs{str_new:N} if necessary, then applies \cs{str_(g)clear:N} to leave
+% the \meta{str~var} empty.
+% \end{function}
+%
+% \begin{function}[added = 2015-09-18]
+% {
+% \str_set_eq:NN, \str_set_eq:cN, \str_set_eq:Nc, \str_set_eq:cc,
+% \str_gset_eq:NN, \str_gset_eq:cN, \str_gset_eq:Nc, \str_gset_eq:cc
+% }
+% \begin{syntax}
+% \cs{str_set_eq:NN} \meta{str~var_1} \meta{str~var_2}
% \end{syntax}
-% Converts the \meta{token list} into a string, as described for
-% \cs{tl_to_str:n}. The \cs{str_head:n} function then leaves
-% the first character of this string in the input stream.
-% The \cs{str_tail:n} function leaves all characters except
-% the first in the input stream. The first character may be
-% a space. If the \meta{token list} argument is entirely empty,
-% nothing is left in the input stream.
+% Sets the content of \meta{str~var_1} equal to that of
+% \meta{str~var_2}.
% \end{function}
%
-% \subsection{Tests on strings}
+% \section{Adding data to string variables}
+%
+% \begin{function}[added = 2015-09-18]
+% {
+% \str_set:Nn, \str_set:Nx, \str_set:cn, \str_set:cx,
+% \str_gset:Nn, \str_gset:Nx, \str_gset:cn, \str_gset:cx
+% }
+% \begin{syntax}
+% \cs{str_set:Nn} \meta{str var} \Arg{token list}
+% \end{syntax}
+% Converts the \meta{token list} to a \meta{string}, and stores the
+% result in \meta{str var}.
+% \end{function}
+%
+% \begin{function}[added = 2015-09-18]
+% {
+% \str_put_left:Nn, \str_put_left:Nx,
+% \str_put_left:cn, \str_put_left:cx,
+% \str_gput_left:Nn, \str_gput_left:Nx,
+% \str_gput_left:cn, \str_gput_left:cx
+% }
+% \begin{syntax}
+% \cs{str_put_left:Nn} \meta{str var} \Arg{token list}
+% \end{syntax}
+% Converts the \meta{token list} to a \meta{string}, and prepends the
+% result to \meta{str var}. The current contents of the \meta{str
+% var} are not automatically converted to a string.
+% \end{function}
+%
+% \begin{function}[added = 2015-09-18]
+% {
+% \str_put_right:Nn, \str_put_right:Nx,
+% \str_put_right:cn, \str_put_right:cx,
+% \str_gput_right:Nn, \str_gput_right:Nx,
+% \str_gput_right:cn, \str_gput_right:cx
+% }
+% \begin{syntax}
+% \cs{str_put_right:Nn} \meta{str var} \Arg{token list}
+% \end{syntax}
+% Converts the \meta{token list} to a \meta{string}, and appends the
+% result to \meta{str var}. The current contents of the \meta{str
+% var} are not automatically converted to a string.
+% \end{function}
+%
+% \subsection{String conditionals}
+%
+% \begin{function}[EXP, pTF, added = 2015-09-18]
+% {\str_if_exist:N, \str_if_exist:c}
+% \begin{syntax}
+% \cs{str_if_exist_p:N} \meta{str~var}
+% \cs{str_if_exist:NTF} \meta{str~var} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests whether the \meta{str~var} is currently defined. This does not
+% check that the \meta{str~var} really is a string.
+% \end{function}
+%
+% \begin{function}[EXP,pTF, added = 2015-09-18]
+% {\str_if_empty:N, \str_if_empty:c}
+% \begin{syntax}
+% \cs{sr_if_empty_p:N} \meta{str~var}
+% \cs{str_if_empty:NTF} \meta{str~var} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests if the \meta{string variable} is entirely empty
+% (\emph{i.e.}~contains no characters at all).
+% \end{function}
+%
+% \begin{function}[EXP,pTF, added = 2015-09-18]
+% {\str_if_eq:NN, \str_if_eq:Nc, \str_if_eq:cN, \str_if_eq:cc}
+% \begin{syntax}
+% \cs{str_if_eq_p:NN} \meta{str~var_1} \meta{str~var_2}
+% \cs{str_if_eq:NNTF} \meta{str~var_1} \meta{str~var_2} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Compares the content of two \meta{str variables} and
+% is logically \texttt{true} if the two contain the same characters.
+% \end{function}
%
% \begin{function}[EXP,pTF]
% {
@@ -189,6 +319,116 @@
% not be used within this string.
% \end{function}
%
+% \section{Working with the content of strings}
+%
+% \begin{function}[EXP, added = 2015-09-18]{\str_use:N, \str_use:c}
+% \begin{syntax}
+% \cs{str_use:N} \meta{str~var}
+% \end{syntax}
+% Recovers the content of a \meta{str~var} and places it
+% directly in the input stream. An error will be raised if the variable
+% does not exist or if it is invalid. Note that it is possible to use
+% a \meta{str} directly without an accessor function.
+% \end{function}
+%
+% \begin{function}[EXP, added = 2015-09-18]
+% {\str_count:N, \str_count:c, \str_count:n, \str_count_ignore_spaces:n}
+% \begin{syntax}
+% \cs{str_count:n} \Arg{token list}
+% \end{syntax}
+% Leaves in the input stream the number of characters in the string
+% representation of \meta{token list}, as an integer denotation. The
+% functions differ in their treatment of spaces. In the case of
+% \cs{str_count:N} and \cs{str_count:n}, all characters including
+% spaces are counted. The \cs{str_count_ignore_spaces:n} function
+% leaves the number of non-space characters in the input stream.
+% \end{function}
+%
+% \begin{function}[EXP, added = 2015-09-18]
+% {\str_count_spaces:N, \str_count_spaces:c, \str_count_spaces:n}
+% \begin{syntax}
+% \cs{str_count_spaces:n} \Arg{token list}
+% \end{syntax}
+% Leaves in the input stream the number of space characters in the
+% string representation of \meta{token list}, as an integer
+% denotation. Of course, this function has no \texttt{_ignore_spaces}
+% variant.
+% \end{function}
+%
+% \begin{function}[EXP, added = 2015-09-18]
+% {\str_head:N, \str_head:c, \str_head:n, \str_head_ignore_spaces:n}
+% \begin{syntax}
+% \cs{str_head:n} \Arg{token list}
+% \end{syntax}
+% Converts the \meta{token list} into a \meta{string}. The first
+% character in the \meta{string} is then left in the input stream,
+% with category code \enquote{other}. The functions differ if the
+% first character is a space: \cs{str_head:N} and \cs{str_head:n}
+% return a space token with category code~$10$ (blank space), while
+% the \cs{str_head_ignore_spaces:n} function ignores this space
+% character and leaves the first non-space character in the input
+% stream. If the \meta{string} is empty (or only contains spaces in
+% the case of the \texttt{_ignore_spaces} function), then nothing is
+% left on the input stream.
+% \end{function}
+%
+% \begin{function}[EXP, added = 2015-09-18]
+% {\str_tail:N, \str_tail:c, \str_tail:n, \str_tail_ignore_spaces:n}
+% \begin{syntax}
+% \cs{str_tail:n} \Arg{token list}
+% \end{syntax}
+% Converts the \meta{token list} to a \meta{string}, removes the first
+% character, and leaves the remaining characters (if any) in the input
+% stream, with category codes $12$ and $10$ (for spaces). The
+% functions differ in the case where the first character is a space:
+% \cs{str_tail:N} and \cs{str_tail:n} will trim only that space, while
+% \cs{str_tail_ignore_spaces:n} removes the first non-space character
+% and any space before it. If the \meta{token list} is empty (or
+% blank in the case of the \texttt{_ignore_spaces} variant), then
+% nothing is left on the input stream.
+% \end{function}
+%
+% \begin{function}[EXP, added = 2015-09-18]
+% {\str_item:Nn, \str_item:nn, \str_item_ignore_spaces:nn}
+% \begin{syntax}
+% \cs{str_item:nn} \Arg{token list} \Arg{integer expression}
+% \end{syntax}
+% Converts the \meta{token list} to a \meta{string}, and leaves in the
+% input stream the character in position \meta{integer expression} of
+% the \meta{string}, starting at $1$ for the first (left-most)
+% character. In the case of \cs{str_item:Nn} and \cs{str_item:nn},
+% all characters including spaces are taken into account. The
+% \cs{str_item_ignore_spaces:nn} function skips spaces when counting
+% characters. If the \meta{integer expression} is negative,
+% characters are counted from the end of the \meta{string}. Hence,
+% $-1$ is the right-most character, \emph{etc.}
+% \end{function}
+%
+% \begin{function}[EXP, added = 2015-09-18]
+% {
+% \str_range:Nnn, \str_range:cnn, \str_range:nnn,
+% \str_range_ignore_spaces:nnn
+% }
+% \begin{syntax}
+% \cs{str_range:nnn} \Arg{token list} \Arg{start index} \Arg{end index}
+% \end{syntax}
+% Converts the \meta{token list} to a \meta{string}, and leaves in the
+% input stream the characters from the \meta{start index} to the
+% \meta{end index} inclusive. Positive \meta{indices} are counted
+% from the start of the string, $1$~being the first character, and
+% negative \meta{indices} are counted from the end of the string,
+% $-1$~being the last character. If either of \meta{start index} or
+% \meta{end index} is~$0$, the result is empty. For instance,
+% \begin{verbatim}
+% \iow_term:x { \str_range:nnn { abcdef } { 2 } { 5 } }
+% \iow_term:x { \str_range:nnn { abcdef } { -4 } { -1 } }
+% \iow_term:x { \str_range:nnn { abcdef } { -2 } { -1 } }
+% \iow_term:x { \str_range:nnn { abcdef } { 0 } { -1 } }
+% \end{verbatim}
+% will print \texttt{bcd}, \texttt{cdef}, \texttt{ef}, and an empty
+% line to the terminal.
+% \end{function}
+%
% \section{String manipulation}
%
% \begin{function}[rEXP, added = 2015-03-01]
@@ -294,6 +534,53 @@
% \end{texnote}
% \end{function}
%
+% \section{Viewing strings}
+%
+% \begin{function}[added = 2015-09-18]
+% {\str_show:N, \str_show:c, \str_show:n}
+% \begin{syntax}
+% \cs{str_show:N} \meta{str~var}
+% \end{syntax}
+% Displays the content of the \meta{str~var} on the terminal.
+% \end{function}
+%
+% \section{Constant token lists}
+%
+% \begin{variable}[added = 2016-09-19]
+% {
+% \c_ampersand_str,
+% \c_atsign_str,
+% \c_backslash_str,
+% \c_left_brace_str,
+% \c_right_brace_str,
+% \c_circumflex_str,
+% \c_colon_str,
+% \c_dollar_str,
+% \c_hash_str,
+% \c_percent_str,
+% \c_tilde_str,
+% \c_underscore_str
+% }
+% Constant strings, containing a single character token, with category
+% code $12$.
+% \end{variable}
+%
+% \section{Scratch strings}
+%
+% \begin{variable}{\l_tmpa_str, \l_tmpb_str}
+% Scratch strings for local assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
+% \begin{variable}{\g_tmpa_str, \g_tmpb_str}
+% Scratch strings for global assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
% \subsection{Internal string functions}
%
% \begin{function}[EXP]{\__str_if_eq_x:nn}
@@ -317,6 +604,38 @@
% of \cs{str_if_eq_x:nn(TF)} coded for speed.
% \end{function}
%
+% \begin{function}[EXP]{\__str_to_other:n}
+% \begin{syntax}
+% \cs{__str_to_other:n} \Arg{token list}
+% \end{syntax}
+% Converts the \meta{token list} to a \meta{other string}, where
+% spaces have category code \enquote{other}. This function can be
+% \texttt{f}-expanded without fear of losing a leading space, since
+% spaces do not have category code $10$ in its result. It takes a
+% time quadratic in the character count of the string.
+% \end{function}
+%
+% \begin{function}[EXP]{\__str_count:n}
+% \begin{syntax}
+% \cs{__str_count:n} \Arg{other string}
+% \end{syntax}
+% This function expects an argument that is entirely made of
+% characters with category \enquote{other}, as produced by
+% \cs{__str_to_other:n}. It leaves in the input stream the number of
+% character tokens in the \meta{other string}, faster than the
+% analogous \cs{str_count:n} function.
+% \end{function}
+%
+% \begin{function}[EXP]{\__str_range:nnn}
+% \begin{syntax}
+% \cs{__str_range:nnn} \Arg{other string} \Arg{start index} \Arg{end index}
+% \end{syntax}
+% Identical to \cs{str_range:nnn} except that the first argument is
+% expected to be entirely made of characters with category
+% \enquote{other}, as produced by \cs{__str_to_other:n}, and the
+% result is also an \meta{other string}.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -331,54 +650,113 @@
%<@@=str>
% \end{macrocode}
%
-% \begin{macro}{\str_head:n, \str_tail:n}
-% \begin{macro}[aux]{\__str_head:w}
-% \begin{macro}[aux]{\__str_tail:w}
-% After \cs{tl_to_str:n}, we have a list of character tokens,
-% all with category code 12, except the space, which has category
-% code 10. Directly using \cs{tl_head:w} would thus lose leading spaces.
-% Instead, we take an argument delimited by an explicit space, and
-% then only use \cs{tl_head:w}. If the string started with a
-% space, then the argument of \cs{__str_head:w} is empty, and
-% the function correctly returns a space character. Otherwise,
-% it returns the first token of |#1|, which is the first token
-% of the string. If the string is empty, we return an empty result.
-%
-% To remove the first character of \cs{tl_to_str:n} |{#1}|,
-% we test it using \cs{if_charcode:w} \cs{scan_stop:},
-% always \texttt{false} for characters. If the argument was non-empty,
-% then \cs{__str_tail:w} returns everything until the first
-% \texttt{X} (with category code letter, no risk of confusing
-% with the user input). If the argument was empty, the first
-% \texttt{X} is taken by \cs{if_charcode:w}, and nothing
-% is returned. We use \texttt{X} as a \meta{marker}, rather than
-% a quark because the test \cs{if_charcode:w} \cs{scan_stop:}
-% \meta{marker} has to be \texttt{false}.
+% \subsection{Creating and setting string variables}
+%
+% \begin{macro}
+% {
+% \str_new:N, \str_new:c,
+% \str_use:N, \str_use:c,
+% \str_clear:N, \str_clear:c,
+% \str_gclear:N,\str_gclear:c,
+% \str_clear_new:N, \str_clear_new:c,
+% \str_gclear_new:N, \str_gclear_new:c
+% }
+% \begin{macro}
+% {
+% \str_set_eq:NN, \str_set_eq:cN, \str_set_eq:Nc, \str_set_eq:cc,
+% \str_gset_eq:NN, \str_gset_eq:cN, \str_gset_eq:Nc, \str_gset_eq:cc
+% }
+% A string is simply a token list. The full mapping system isn't set up
+% yet so do things by hand.
% \begin{macrocode}
-\cs_new:Npn \str_head:n #1
- {
- \exp_after:wN \__str_head:w
- \tl_to_str:n {#1}
- { { } } ~ \q_stop
- }
-\cs_new:Npn \__str_head:w #1 ~ %
- { \tl_head:w #1 { ~ } }
-\cs_new:Npn \str_tail:n #1
- {
- \exp_after:wN \__str_tail:w
- \reverse_if:N \if_charcode:w
- \scan_stop: \tl_to_str:n {#1} X X \q_stop
- }
-\cs_new:Npn \__str_tail:w #1 X #2 \q_stop { \fi: #1 }
+\group_begin:
+ \cs_set_protected:Npn \@@_tmp:n #1
+ {
+ \tl_if_blank:nF {#1}
+ {
+ \cs_new_eq:cc { str_ #1 :N } { tl_ #1 :N }
+ \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :N } { c }
+ \@@_tmp:n
+ }
+ }
+ \@@_tmp:n
+ { new }
+ { use }
+ { clear }
+ { gclear }
+ { clear_new }
+ { gclear_new }
+ { }
+\group_end:
+\cs_new_eq:NN \str_set_eq:NN \tl_set_eq:NN
+\cs_new_eq:NN \str_gset_eq:NN \tl_gset_eq:NN
+\cs_generate_variant:Nn \str_set_eq:NN { c , Nc , cc }
+\cs_generate_variant:Nn \str_gset_eq:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}
+% {
+% \str_set:Nn, \str_set:Nx,
+% \str_set:cn, \str_set:cx,
+% \str_gset:Nn, \str_gset:Nx,
+% \str_gset:cn, \str_gset:cx,
+% \str_const:Nn, \str_const:Nx,
+% \str_const:cn, \str_const:cx,
+% \str_put_left:Nn, \str_put_left:Nx,
+% \str_put_left:cn, \str_put_left:cx,
+% \str_gput_left:Nn, \str_gput_left:Nx,
+% \str_gput_left:cn, \str_gput_left:cx,
+% \str_put_right:Nn, \str_put_right:Nx,
+% \str_put_right:cn, \str_put_right:cx,
+% \str_gput_right:Nn, \str_gput_right:Nx,
+% \str_gput_right:cn, \str_gput_right:cx,
+% }
+% Simply convert the token list inputs to \meta{strings}.
+% \begin{macrocode}
+\group_begin:
+ \cs_set_protected:Npn \@@_tmp:n #1
+ {
+ \tl_if_blank:nF {#1}
+ {
+ \cs_new_protected:cpx { str_ #1 :Nn } ##1##2
+ { \exp_not:c { tl_ #1 :Nx } ##1 { \exp_not:N \tl_to_str:n {##2} } }
+ \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :Nn } { Nx , cn , cx }
+ \@@_tmp:n
+ }
+ }
+ \@@_tmp:n
+ { set }
+ { gset }
+ { const }
+ { put_left }
+ { gput_left }
+ { put_right }
+ { gput_right }
+ { }
+\group_end:
+% \end{macrocode}
% \end{macro}
%
% \subsection{String comparisons}
%
-% \begin{macro}[int, EXP]{\__str_if_eq_x:nn}
-% \begin{macro}[aux, EXP]{\__str_escape_x:n}
+% \begin{macro}[pTF, EXP]
+% {
+% \str_if_empty:N, \str_if_empty:c,
+% \str_if_exist:N, \str_if_exist:c
+% }
+% More copy-paste!
+% \begin{macrocode}
+\prg_new_eq_conditional:NNn \str_if_exist:N \tl_if_exist:N { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_exist:c \tl_if_exist:c { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_empty:N \tl_if_empty:N { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_empty:c \tl_if_empty:c { p , T , F , TF }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int, EXP]{\@@_if_eq_x:nn}
+% \begin{macro}[aux, EXP]{\@@_escape_x:n}
% String comparisons rely on the primitive \cs{(pdf)strcmp} if available:
% \LuaTeX{} does not have it, so emulation is required. As the net result
% is that we do not \emph{always} use the primitive, the correct approach
@@ -392,21 +770,21 @@
% otherwise will fail as \cs{luatex_luaescapestring:D} does not double
% such tokens.
% \begin{macrocode}
-\cs_new:Npn \__str_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} }
+\cs_new:Npn \@@_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} }
\cs_if_exist:NT \luatex_luatexversion:D
{
- \cs_set:Npn \__str_if_eq_x:nn #1#2
+ \cs_set:Npn \@@_if_eq_x:nn #1#2
{
\luatex_directlua:D
{
l3kernel.strcmp
(
- " \__str_escape_x:n {#1} " ,
- " \__str_escape_x:n {#2} "
+ " \@@_escape_x:n {#1} " ,
+ " \@@_escape_x:n {#2} "
)
}
}
- \cs_new:Npn \__str_escape_x:n #1
+ \cs_new:Npn \@@_escape_x:n #1
{
\luatex_luaescapestring:D
{
@@ -418,16 +796,16 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\__str_if_eq_x_return:nn}
+% \begin{macro}[int, EXP]{\@@_if_eq_x_return:nn}
% It turns out that we often need to compare a token list
% with the result of applying some function to it, and
% return with \cs{prg_return_true/false:}. This test is
% similar to \cs{str_if_eq:nnTF} (see \pkg{l3str}),
% but is hard-coded for speed.
% \begin{macrocode}
-\cs_new:Npn \__str_if_eq_x_return:nn #1 #2
+\cs_new:Npn \@@_if_eq_x_return:nn #1 #2
{
- \if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero
+ \if_int_compare:w \@@_if_eq_x:nn {#1} {#2} = \c_zero
\prg_return_true:
\else:
\prg_return_false:
@@ -450,7 +828,7 @@
\prg_new_conditional:Npnn \str_if_eq:nn #1#2 { p , T , F , TF }
{
\if_int_compare:w
- \__str_if_eq_x:nn { \exp_not:n {#1} } { \exp_not:n {#2} }
+ \@@_if_eq_x:nn { \exp_not:n {#1} } { \exp_not:n {#2} }
= \c_zero
\prg_return_true: \else: \prg_return_false: \fi:
}
@@ -464,13 +842,27 @@
\cs_generate_variant:Nn \str_if_eq:nnTF { nV , no , VV }
\prg_new_conditional:Npnn \str_if_eq_x:nn #1#2 { p , T , F , TF }
{
- \if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero
+ \if_int_compare:w \@@_if_eq_x:nn {#1} {#2} = \c_zero
\prg_return_true: \else: \prg_return_false: \fi:
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_if_eq_x_return:nn}
+% \begin{macro}[EXP, pTF]
+% {\str_if_eq:NN, \str_if_eq:Nc, \str_if_eq:cN, \str_if_eq:cc}
+% Note that \cs{str_if_eq:NN} is different from
+% \cs{tl_if_eq:NN} because it needs to ignore category codes.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \str_if_eq:NN #1#2 { p , TF , T , F }
+ {
+ \if_int_compare:w \@@_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 }
+ = \c_zero \prg_return_true: \else: \prg_return_false: \fi:
+ }
+\cs_generate_variant:Nn \str_if_eq:NNT { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq:NNF { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq:NNTF { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq_p:NN { c , Nc , cc }
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}[EXP]
@@ -550,6 +942,444 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Accessing specific characters in a string}
+%
+% \begin{macro}[EXP, int]{\@@_to_other:n}
+% \begin{macro}[EXP, aux]{\@@_to_other_loop:w, \@@_to_other_end:w}
+% First apply \cs{tl_to_str:n}, then replace all spaces by
+% \enquote{other} spaces, $8$ at a time, storing the converted part of
+% the string between the \cs{q_mark} and \cs{q_stop} markers. The end
+% is detected when \cs{@@_to_other_loop:w} finds one of the trailing
+% |A|, distinguished from any contents of the initial token list by
+% their category. Then \cs{@@_to_other_end:w} is called, and finds
+% the result between \cs{q_mark} and the first |A| (well, there is
+% also the need to remove a space).
+% \begin{macrocode}
+\cs_new:Npn \@@_to_other:n #1
+ {
+ \exp_after:wN \@@_to_other_loop:w
+ \tl_to_str:n {#1} ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_mark \q_stop
+ }
+\group_begin:
+\tex_lccode:D `\* = `\ %
+\tex_lccode:D `\A = `\A
+\tex_lowercase:D
+ {
+ \group_end:
+ \cs_new:Npn \@@_to_other_loop:w
+ #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 ~ #7 ~ #8 ~ #9 \q_stop
+ {
+ \if_meaning:w A #8
+ \@@_to_other_end:w
+ \fi:
+ \@@_to_other_loop:w
+ #9 #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * \q_stop
+ }
+ \cs_new:Npn \@@_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop
+ { \fi: #2 }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]
+% {\str_item:Nn, \str_item:cn, \str_item:nn, \str_item_ignore_spaces:nn}
+% \begin{macro}[EXP, aux]{\@@_item:nn, \@@_item:w}
+% The \cs{str_item:nn} hands its argument with spaces escaped to
+% \cs{@@_item:nn}, and makes sure to turn the result back into
+% a proper string (with category code~$10$ spaces) eventually. The
+% \cs{str_item_ignore_spaces:nn} function does not escape spaces,
+% which are thus ignored by \cs{@@_item:nn} since
+% everything else is done with undelimited arguments.
+% Evaluate the \meta{index} argument~|#2| and count characters in
+% the string, passing those two numbers to \cs{@@_item:w} for
+% further analysis. If the \meta{index} is negative, shift it by
+% the \meta{count} to know the how many character to discard, and if
+% that is still negative give an empty result. If the \meta{index}
+% is larger than the \meta{count}, give an empty result, and
+% otherwise discard $\meta{index}-1$ characters before returning the
+% following one. The shift by $-1$ is obtained by inserting an empty
+% brace group before the string in that case: that brace group also
+% covers the case where the \meta{index} is zero.
+% \begin{macrocode}
+\cs_new_nopar:Npn \str_item:Nn { \exp_args:No \str_item:nn }
+\cs_generate_variant:Nn \str_item:Nn { c }
+\cs_new:Npn \str_item:nn #1#2
+ {
+ \exp_args:Nf \tl_to_str:n
+ {
+ \exp_args:Nf \@@_item:nn
+ { \@@_to_other:n {#1} } {#2}
+ }
+ }
+\cs_new:Npn \str_item_ignore_spaces:nn #1
+ { \exp_args:No \@@_item:nn { \tl_to_str:n {#1} } }
+\cs_new:Npn \@@_item:nn #1#2
+ {
+ \exp_after:wN \@@_item:w
+ \int_use:N \__int_eval:w #2 \exp_after:wN ;
+ \__int_value:w \@@_count:n {#1} ;
+ #1 \q_stop
+ }
+\cs_new:Npn \@@_item:w #1; #2;
+ {
+ \int_compare:nNnTF {#1} < \c_zero
+ {
+ \int_compare:nNnTF {#1} < {-#2}
+ { \use_none_delimit_by_q_stop:w }
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \exp:w \exp_after:wN \@@_skip_exp_end:w
+ \int_use:N \__int_eval:w #1 + #2 ;
+ }
+ }
+ {
+ \int_compare:nNnTF {#1} > {#2}
+ { \use_none_delimit_by_q_stop:w }
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \exp:w \@@_skip_exp_end:w #1 ; { }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP, aux]{\@@_skip_exp_end:w}
+% \begin{macro}[EXP, aux]
+% {\@@_skip_loop:wNNNNNNNN, \@@_skip_end:w, \@@_skip_end:NNNNNNNN}
+% Removes |max(#1,0)| characters from the input stream, and then
+% leaves \cs{exp_end:}. This should be expanded using
+% \cs{exp:w}. We remove characters $8$ at a time until
+% there are at most $8$ to remove. Then we do a dirty trick: the
+% \cs{if_case:w} construction leaves between $0$ and $8$ times the
+% \cs{or:} control sequence, and those \cs{or:} become arguments of
+% \cs{@@_skip_end:NNNNNNNN}. If the number of characters to remove
+% is $6$, say, then there are two \cs{or:} left, and the $8$ arguments
+% of \cs{@@_skip_end:NNNNNNNN} are the two \cs{or:}, and $6$
+% characters from the input stream, exactly what we wanted to
+% remove. Then close the \cs{if_case:w} conditional with \cs{fi:}, and
+% stop the initial expansion with \cs{exp_end:} (see places where
+% \cs{@@_skip_exp_end:w} is called).
+% \begin{macrocode}
+\cs_new:Npn \@@_skip_exp_end:w #1;
+ {
+ \if_int_compare:w #1 > \c_eight
+ \exp_after:wN \@@_skip_loop:wNNNNNNNN
+ \else:
+ \exp_after:wN \@@_skip_end:w
+ \int_use:N \__int_eval:w
+ \fi:
+ #1 ;
+ }
+\cs_new:Npn \@@_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
+ { \exp_after:wN \@@_skip_exp_end:w \int_use:N \__int_eval:w #1 - \c_eight ; }
+\cs_new:Npn \@@_skip_end:w #1 ;
+ {
+ \exp_after:wN \@@_skip_end:NNNNNNNN
+ \if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or:
+ }
+\cs_new:Npn \@@_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]
+% {\str_range:Nnn, \str_range:nnn, \str_range_ignore_spaces:nnn}
+% \begin{macro}[EXP, int]{\@@_range:nnn}
+% \begin{macro}[EXP, aux]{\@@_range:w, \@@_range:nnw}
+% Sanitize the string. Then evaluate the arguments. At this stage we
+% also decrement the \meta{start index}, since our goal is to know how
+% many characters should be removed. Then limit the range to be
+% non-negative and at most the length of the string (this avoids
+% needing to check for the end of the string when grabbing
+% characters), shifting negative numbers by the appropriate amount.
+% Afterwards, skip characters, then keep some more, and finally drop
+% the end of the string.
+% \begin{macrocode}
+\cs_new_nopar:Npn \str_range:Nnn { \exp_args:No \str_range:nnn }
+\cs_generate_variant:Nn \str_range:Nnn { c }
+\cs_new:Npn \str_range:nnn #1#2#3
+ {
+ \exp_args:Nf \tl_to_str:n
+ {
+ \exp_args:Nf \@@_range:nnn
+ { \@@_to_other:n {#1} } {#2} {#3}
+ }
+ }
+\cs_new:Npn \str_range_ignore_spaces:nnn #1
+ { \exp_args:No \@@_range:nnn { \tl_to_str:n {#1} } }
+\cs_new:Npn \@@_range:nnn #1#2#3
+ {
+ \exp_after:wN \@@_range:w
+ \__int_value:w \@@_count:n {#1} \exp_after:wN ;
+ \int_use:N \__int_eval:w #2 - \c_one \exp_after:wN ;
+ \int_use:N \__int_eval:w #3 ;
+ #1 \q_stop
+ }
+\cs_new:Npn \@@_range:w #1; #2; #3;
+ {
+ \exp_args:Nf \@@_range:nnw
+ { \@@_range_normalize:nn {#2} {#1} }
+ { \@@_range_normalize:nn {#3} {#1} }
+ }
+\cs_new:Npn \@@_range:nnw #1#2
+ {
+ \exp_after:wN \@@_collect_delimit_by_q_stop:w
+ \int_use:N \__int_eval:w #2 - #1 \exp_after:wN ;
+ \exp:w \@@_skip_exp_end:w #1 ;
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}[EXP, aux]{\@@_range_normalize:nn}
+% This function converts an \meta{index} argument into an explicit
+% position in the string (a result of $0$ denoting \enquote{out of
+% bounds}). Expects two explicit integer arguments: the
+% \meta{index} |#1| and the string count~|#2|. If |#1| is negative,
+% replace it by $|#1| + |#2| + 1$, then limit to the range $[0,
+% |#2|]$.
+% \begin{macrocode}
+\cs_new:Npn \@@_range_normalize:nn #1#2
+ {
+ \int_eval:n
+ {
+ \if_int_compare:w #1 < \c_zero
+ \if_int_compare:w #1 < -#2 \exp_stop_f:
+ \c_zero
+ \else:
+ #1 + #2 + \c_one
+ \fi:
+ \else:
+ \if_int_compare:w #1 < #2 \exp_stop_f:
+ #1
+ \else:
+ #2
+ \fi:
+ \fi:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[EXP, aux]{\@@_collect_delimit_by_q_stop:w}
+% \begin{macro}[EXP, aux]
+% {
+% \@@_collect_loop:wn, \@@_collect_loop:wnNNNNNNN,
+% \@@_collect_end:wn, \@@_collect_end:nnnnnnnnw
+% }
+% Collects |max(#1,0)| characters, and removes everything else until
+% \cs{q_stop}. This is somewhat similar to \cs{@@_skip_exp_end:w}, but
+% accepts integer expression arguments. This time we can only grab
+% $7$ characters at a time. At the end, we use an \cs{if_case:w}
+% trick again, so that the $8$ first arguments of
+% \cs{@@_collect_end:nnnnnnnnw} are some \cs{or:}, followed by an
+% \cs{fi:}, followed by |#1| characters from the input stream. Simply
+% leaving this in the input stream will close the conditional properly
+% and the \cs{or:} disappear.
+% \begin{macrocode}
+\cs_new:Npn \@@_collect_delimit_by_q_stop:w #1;
+ { \@@_collect_loop:wn #1 ; { } }
+\cs_new:Npn \@@_collect_loop:wn #1 ;
+ {
+ \if_int_compare:w #1 > \c_seven
+ \exp_after:wN \@@_collect_loop:wnNNNNNNN
+ \else:
+ \exp_after:wN \@@_collect_end:wn
+ \fi:
+ #1 ;
+ }
+\cs_new:Npn \@@_collect_loop:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9
+ {
+ \exp_after:wN \@@_collect_loop:wn
+ \int_use:N \__int_eval:w #1 - \c_seven ;
+ { #2 #3#4#5#6#7#8#9 }
+ }
+\cs_new:Npn \@@_collect_end:wn #1 ;
+ {
+ \exp_after:wN \@@_collect_end:nnnnnnnnw
+ \if_case:w \if_int_compare:w #1 > \c_zero #1 \else: 0 \fi: \exp_stop_f:
+ \or: \or: \or: \or: \or: \or: \fi:
+ }
+\cs_new:Npn \@@_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop
+ { #1#2#3#4#5#6#7#8 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Counting characters}
+%
+% \begin{macro}[EXP]
+% {\str_count_spaces:N, \str_count_spaces:c, \str_count_spaces:n}
+% \begin{macro}[EXP, aux]{\@@_count_spaces_loop:w}
+% To speed up this function, we grab and discard $9$ space-delimited
+% arguments in each iteration of the loop. The loop stops when the
+% last argument is one of the trailing |X|\meta{number}, and that
+% \meta{number} is added to the sum of $9$ that precedes, to adjust
+% the result.
+% \begin{macrocode}
+\cs_new_nopar:Npn \str_count_spaces:N
+ { \exp_args:No \str_count_spaces:n }
+\cs_generate_variant:Nn \str_count_spaces:N { c }
+\cs_new:Npn \str_count_spaces:n #1
+ {
+ \int_eval:n
+ {
+ \exp_after:wN \@@_count_spaces_loop:w
+ \tl_to_str:n {#1} ~
+ X 7 ~ X 6 ~ X 5 ~ X 4 ~ X 3 ~ X 2 ~ X 1 ~ X 0 ~ X -1 ~
+ \q_stop
+ }
+ }
+\cs_new:Npn \@@_count_spaces_loop:w #1~#2~#3~#4~#5~#6~#7~#8~#9~
+ {
+ \if_meaning:w X #9
+ \use_i_delimit_by_q_stop:nw
+ \fi:
+ \c_nine + \@@_count_spaces_loop:w
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]
+% {\str_count:N, \str_count:c, \str_count:n, \str_count_ignore_spaces:n}
+% \begin{macro}[EXP, int]{\@@_count:n}
+% \begin{macro}[EXP, aux]{\@@_count_aux:n, \@@_count_loop:NNNNNNNNN}
+% To count characters in a string we could first escape all spaces
+% using \cs{@@_to_other:n}, then pass the result to \cs{tl_count:n}.
+% However, the escaping step would be quadratic in the number of
+% characters in the string, and we can do better. Namely, sum the
+% number of spaces (\cs{str_count_spaces:n}) and the result of
+% \cs{tl_count:n}, which ignores spaces. Since strings tend to be
+% longer than token lists, we use specialized functions to count
+% characters ignoring spaces. Namely, loop, grabbing $9$ non-space
+% characters at each step, and end as soon as we reach one of the $9$
+% trailing items. The internal function \cs{@@_count:n}, used in
+% \cs{str_item:nn} and \cs{str_range:nnn}, is similar to
+% \cs{str_count_ignore_spaces:n} but expects its argument to already
+% be a string or a string with spaces escaped.
+% \begin{macrocode}
+\cs_new_nopar:Npn \str_count:N { \exp_args:No \str_count:n }
+\cs_generate_variant:Nn \str_count:N { c }
+\cs_new:Npn \str_count:n #1
+ {
+ \@@_count_aux:n
+ {
+ \str_count_spaces:n {#1}
+ + \exp_after:wN \@@_count_loop:NNNNNNNNN \tl_to_str:n {#1}
+ }
+ }
+\cs_new:Npn \@@_count:n #1
+ {
+ \@@_count_aux:n
+ { \@@_count_loop:NNNNNNNNN #1 }
+ }
+\cs_new:Npn \str_count_ignore_spaces:n #1
+ {
+ \@@_count_aux:n
+ { \exp_after:wN \@@_count_loop:NNNNNNNNN \tl_to_str:n {#1} }
+ }
+\cs_new:Npn \@@_count_aux:n #1
+ {
+ \int_eval:n
+ {
+ #1
+ { X \c_eight } { X \c_seven } { X \c_six }
+ { X \c_five } { X \c_four } { X \c_three }
+ { X \c_two } { X \c_one } { X \c_zero }
+ \q_stop
+ }
+ }
+\cs_new:Npn \@@_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
+ {
+ \if_meaning:w X #9
+ \exp_after:wN \use_none_delimit_by_q_stop:w
+ \fi:
+ \c_nine + \@@_count_loop:NNNNNNNNN
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{The first character in a string}
+%
+% \begin{macro}[EXP]
+% {\str_head:N, \str_head:c, \str_head:n, \str_head_ignore_spaces:n}
+% \begin{macro}[EXP, aux]{\@@_head:w}
+% The \texttt{_ignore_spaces} variant applies \cs{tl_to_str:n} then
+% grabs the first item, thus skipping spaces.
+% As usual, \cs{str_head:N} expands its argument and
+% hands it to \cs{str_head:n}. To circumvent the fact that \TeX{}
+% skips spaces when grabbing undelimited macro parameters,
+% \cs{@@_head:w} takes an argument delimited by a space. If |#1|
+% starts with a non-space character, \cs{use_i_delimit_by_q_stop:nw}
+% leaves that in the input stream. On the other hand, if |#1| starts
+% with a space, the \cs{@@_head:w} takes an empty argument, and the
+% single (initially braced) space in the definition of \cs{@@_head:w}
+% makes its way to the output. Finally, for an empty argument, the
+% (braced) empty brace group in the definition of \cs{str_head:n}
+% gives an empty result after passing through
+% \cs{use_i_delimit_by_q_stop:nw}.
+% \begin{macrocode}
+\cs_new_nopar:Npn \str_head:N { \exp_args:No \str_head:n }
+\cs_generate_variant:Nn \str_head:N { c }
+\cs_set:Npn \str_head:n #1
+ {
+ \exp_after:wN \@@_head:w
+ \tl_to_str:n {#1}
+ { { } } ~ \q_stop
+ }
+\cs_set:Npn \@@_head:w #1 ~ %
+ { \use_i_delimit_by_q_stop:nw #1 { ~ } }
+\cs_new:Npn \str_head_ignore_spaces:n #1
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \tl_to_str:n {#1} { } \q_stop
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]
+% {\str_tail:N, \str_tail:c, \str_tail:n, \str_tail_ignore_spaces:n}
+% \begin{macro}[EXP, aux]{\@@_tail_auxi:w, \@@_tail_auxii:w}
+% Getting the tail is a little bit more convoluted than the head of a
+% string. We hit the front of the string with \cs{reverse_if:N}
+% \cs{if_charcode:w} \cs{scan_stop:}. This removes the first
+% character, and necessarily makes the test true, since the character
+% cannot match \cs{scan_stop:}. The auxiliary function then inserts
+% the required \cs{fi:} to close the conditional, and leaves the tail
+% of the string in the input stream. The details are such that an
+% empty string has an empty tail (this requires in particular that the
+% end-marker |X| be unexpandable and not a control sequence). The
+% \texttt{_ignore_spaces} is rather simpler: after converting the
+% input to a string, \cs{@@_tail_auxii:w} removes one undelimited
+% argument and leaves everything else until an end-marker \cs{q_mark}.
+% One can check that an empty (or blank) string yields an empty
+% tail.
+% \begin{macrocode}
+\cs_new_nopar:Npn \str_tail:N { \exp_args:No \str_tail:n }
+\cs_generate_variant:Nn \str_tail:N { c }
+\cs_set:Npn \str_tail:n #1
+ {
+ \exp_after:wN \@@_tail_auxi:w
+ \reverse_if:N \if_charcode:w
+ \scan_stop: \tl_to_str:n {#1} X X \q_stop
+ }
+\cs_set:Npn \@@_tail_auxi:w #1 X #2 \q_stop { \fi: #1 }
+\cs_new:Npn \str_tail_ignore_spaces:n #1
+ {
+ \exp_after:wN \@@_tail_auxii:w
+ \tl_to_str:n {#1} \q_mark \q_mark \q_stop
+ }
+\cs_new:Npn \@@_tail_auxii:w #1 #2 \q_mark #3 \q_stop { #2 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{String manipulation}
%
% \begin{macro}[EXP]
@@ -558,12 +1388,12 @@
% \str_lower_case:n, \str_lower_case:f,
% \str_upper_case:n, \str_upper_case:f
% }
-% \begin{macro}[aux, EXP]{\__str_change_case:nn}
-% \begin{macro}[aux, EXP]{\__str_change_case_aux:nn}
-% \begin{macro}[aux, EXP]{\__str_change_case_loop:nw}
-% \begin{macro}[aux, EXP]{\__str_change_case_space:n}
-% \begin{macro}[aux, EXP]{\__str_change_case_char:nN}
-% \begin{macro}[aux, EXP]{\__str_change_case_char:NNNNNNNNn}
+% \begin{macro}[aux, EXP]{\@@_change_case:nn}
+% \begin{macro}[aux, EXP]{\@@_change_case_aux:nn}
+% \begin{macro}[aux, EXP]{\@@_change_case_loop:nw}
+% \begin{macro}[aux, EXP]{\@@_change_case_space:n}
+% \begin{macro}[aux, EXP]{\@@_change_case_char:nN}
+% \begin{macro}[aux, EXP]{\@@_change_case_char:NNNNNNNNn}
% Case changing for programmatic reasons is done by first detokenizing
% input then doing a simple loop that only has to worry about spaces
% and everything else. The output is detokenized to allow data sharing
@@ -571,45 +1401,45 @@
% data files based on the character code of the current character is
% shared with the text case changer too.
% \begin{macrocode}
-\cs_new:Npn \str_fold_case:n #1 { \__str_change_case:nn {#1} { fold } }
-\cs_new:Npn \str_lower_case:n #1 { \__str_change_case:nn {#1} { lower } }
-\cs_new:Npn \str_upper_case:n #1 { \__str_change_case:nn {#1} { upper } }
+\cs_new:Npn \str_fold_case:n #1 { \@@_change_case:nn {#1} { fold } }
+\cs_new:Npn \str_lower_case:n #1 { \@@_change_case:nn {#1} { lower } }
+\cs_new:Npn \str_upper_case:n #1 { \@@_change_case:nn {#1} { upper } }
\cs_generate_variant:Nn \str_fold_case:n { V }
\cs_generate_variant:Nn \str_lower_case:n { f }
\cs_generate_variant:Nn \str_upper_case:n { f }
-\cs_new:Npn \__str_change_case:nn #1
+\cs_new:Npn \@@_change_case:nn #1
{
- \exp_after:wN \__str_change_case_aux:nn \exp_after:wN
+ \exp_after:wN \@@_change_case_aux:nn \exp_after:wN
{ \tl_to_str:n {#1} }
}
-\cs_new:Npn \__str_change_case_aux:nn #1#2
+\cs_new:Npn \@@_change_case_aux:nn #1#2
{
- \__str_change_case_loop:nw {#2} #1 \q_recursion_tail \q_recursion_stop
+ \@@_change_case_loop:nw {#2} #1 \q_recursion_tail \q_recursion_stop
}
-\cs_new:Npn \__str_change_case_loop:nw #1#2 \q_recursion_stop
+\cs_new:Npn \@@_change_case_loop:nw #1#2 \q_recursion_stop
{
\tl_if_head_is_space:nTF {#2}
- { \__str_change_case_space:n }
- { \__str_change_case_char:nN }
+ { \@@_change_case_space:n }
+ { \@@_change_case_char:nN }
{#1} #2 \q_recursion_stop
}
\use:x
- { \cs_new:Npn \exp_not:N \__str_change_case_space:n ##1 \c_space_tl }
+ { \cs_new:Npn \exp_not:N \@@_change_case_space:n ##1 \c_space_tl }
{
\c_space_tl
- \__str_change_case_loop:nw {#1}
+ \@@_change_case_loop:nw {#1}
}
-\cs_new:Npn \__str_change_case_char:nN #1#2
+\cs_new:Npn \@@_change_case_char:nN #1#2
{
\quark_if_recursion_tail_stop:N #2
\exp_args:Nf \tl_to_str:n
{
- \exp_after:wN \__str_change_case_char:NNNNNNNNn
+ \exp_after:wN \@@_change_case_char:NNNNNNNNn
\int_use:N \__int_eval:w 1000000 + `#2 \__int_eval_end: #2 {#1}
}
- \__str_change_case_loop:nw {#1}
+ \@@_change_case_loop:nw {#1}
}
-\cs_new:Npn \__str_change_case_char:NNNNNNNNn #1#2#3#4#5#6#7#8#9
+\cs_new:Npn \@@_change_case_char:NNNNNNNNn #1#2#3#4#5#6#7#8#9
{
\str_case:nvF #8
{ c__unicode_ #9 _ #6 _X_ #7 _tl }
@@ -624,10 +1454,64 @@
% \end{macro}
% \end{macro}
%
+% \begin{variable}
+% {
+% \c_ampersand_str,
+% \c_atsign_str,
+% \c_backslash_str,
+% \c_left_brace_str,
+% \c_right_brace_str,
+% \c_circumflex_str,
+% \c_colon_str,
+% \c_dollar_str,
+% \c_hash_str,
+% \c_percent_str,
+% \c_tilde_str,
+% \c_underscore_str
+% }
+% For all of those strings, use \cs{cs_to_str:N} to get characters with
+% the correct category code without worries
+% \begin{macrocode}
+\str_const:Nx \c_ampersand_str { \cs_to_str:N \& }
+\str_const:Nx \c_atsign_str { \cs_to_str:N \@ }
+\str_const:Nx \c_backslash_str { \cs_to_str:N \\ }
+\str_const:Nx \c_left_brace_str { \cs_to_str:N \{ }
+\str_const:Nx \c_right_brace_str { \cs_to_str:N \} }
+\str_const:Nx \c_circumflex_str { \cs_to_str:N \^ }
+\str_const:Nx \c_colon_str { \cs_to_str:N \: }
+\str_const:Nx \c_dollar_str { \cs_to_str:N \$ }
+\str_const:Nx \c_hash_str { \cs_to_str:N \# }
+\str_const:Nx \c_percent_str { \cs_to_str:N \% }
+\str_const:Nx \c_tilde_str { \cs_to_str:N \~ }
+\str_const:Nx \c_underscore_str { \cs_to_str:N \_ }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_tmpa_str, \l_tmpb_str, \g_tmpa_str, \g_tmpb_str}
+% Scratch strings.
+% \begin{macrocode}
+\str_new:N \l_tmpa_str
+\str_new:N \l_tmpb_str
+\str_new:N \g_tmpa_str
+\str_new:N \g_tmpb_str
+% \end{macrocode}
+% \end{variable}
+%
+% \subsection{Viewing strings}
+%
+% \begin{macro}{\str_show:n, \str_show:N, \str_show:c}
+% Displays a string on the terminal.
+% \begin{macrocode}
+\cs_new_eq:NN \str_show:n \tl_show:n
+\cs_new_eq:NN \str_show:N \tl_show:N
+\cs_generate_variant:Nn \str_show:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
%
% \end{implementation}
%
-% \PrintIndex
+% \PrintIndex \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
index baf4bfc8756..6d2e81b4b03 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id$
+\GetIdInfo$Id: l3sys.dtx 6087 2015-09-25 10:29:53Z joseph $
{L3 Experimental system/runtime functions}
%</driver|package>
%<*driver>
@@ -68,10 +68,39 @@
%
% \begin{documentation}
%
-% \subsection{Engine-specific conditionals}
+% \section{The name of the job}
%
-% \begin{function}[added = 2015-09-07, EXP, pTF]^^A
-% {^^A
+% \begin{variable}[added = 2015-09-19]{\c_sys_jobname_str}
+% Constant that gets the \enquote{job name} assigned when \TeX{} starts.
+% \begin{texnote}
+% This copies the contents of the primitive \tn{jobname}. It is a constant
+% that is set by \TeX{} and should not be overwritten by the package.
+% \end{texnote}
+% \end{variable}
+%
+% \section{Date and time}
+%
+% \begin{variable}[added = 2015-09-22]
+% {
+% \c_sys_minute_int,
+% \c_sys_hour_int,
+% \c_sys_day_int,
+% \c_sys_month_int,
+% \c_sys_year_int,
+% }
+% The date and time at which the current job was started: these are
+% all reported as integers.
+% \begin{texnote}
+% Whilst the underlying primitives can be altered by the user, this
+% interface to the time and date is intended to be the \enquote{real}
+% values.
+% \end{texnote}
+% \end{variable}
+%
+% \subsection{Engine}
+%
+% \begin{function}[added = 2015-09-07, EXP, pTF]
+% {
% \sys_if_engine_luatex:,
% \sys_if_engine_pdftex:,
% \sys_if_engine_ptex: ,
@@ -89,6 +118,33 @@
% |\sys_if_engine_ptex_p:| is true for \epTeX{} but false for \eupTeX{}.
% \end{function}
%
+% \begin{variable}[added = 2015-09-19]{\c_sys_engine_str}
+% The current engine given as a lower case string: will be one of
+% |luatex|, |pdftex|, |ptex|, |uptex| or |xetex|.
+% \end{variable}
+%
+% \subsection{Output format}
+%
+% \begin{function}[added = 2015-09-19, EXP, pTF]
+% {
+% \sys_if_output_dvi:,
+% \sys_if_output_pdf:
+% }
+% \begin{syntax}
+% \cs{sys_if_output_dvi:TF} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Conditionals which give the current output mode the \TeX{} run is
+% operating in. This will always be one of two outcomes, DVI mode or
+% PDF mode. The two sets of conditionals are thus complementary and
+% are both provided to allow the programmer to emphasise the most
+% appropriate case.
+% \end{function}
+%
+% \begin{variable}[added = 2015-09-19]{\c_sys_output_str}
+% The current output mode given as a lower case string: will be one of
+% |dvi| or |pdf|.
+% \end{variable}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -99,16 +155,59 @@
%<*initex|package>
% \end{macrocode}
%
-% \subsubsection{Detecting the engine}
+% \subsection{The name of the job}
+%
+% \begin{variable}{\c_sys_jobname_str}
+% Inherited from the \LaTeX3 name for the primitive: this needs to
+% actually contain the text of the job name rather than the name of
+% the primitive, of course.
+% \begin{macrocode}
+%<*initex>
+\tex_everyjob:D \exp_after:wN
+ {
+ \tex_the:D \tex_everyjob:D
+ \str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
+ }
+%</initex>
+%<*package>
+\str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
+%</package>
+% \end{macrocode}
+% \end{variable}
+%
+% \subsection{Time and date}
%
-% \begin{macro}[pTF, EXP]^^A
-% {^^A
+% \begin{variable}
+% {
+% \c_sys_minute_int,
+% \c_sys_hour_int,
+% \c_sys_day_int,
+% \c_sys_month_int,
+% \c_sys_year_int,
+% }
+% Copies of the information provided by \TeX{}
+% \begin{macrocode}
+\int_const:Nn \c_sys_minute_int
+ { \int_mod:nn { \tex_time:D } { 60 } }
+\int_const:Nn \c_sys_hour_int
+ { \int_div_truncate:nn { \tex_time:D } { 60 } }
+\int_const:Nn \c_sys_day_int { \tex_day:D }
+\int_const:Nn \c_sys_month_int { \tex_month:D }
+\int_const:Nn \c_sys_year_int { \tex_year:D }
+% \end{macrocode}
+% \end{variable}
+%
+% \subsection{Detecting the engine}
+%
+% \begin{macro}[pTF, EXP]
+% {
% \sys_if_engine_luatex:,
% \sys_if_engine_pdftex:,
% \sys_if_engine_ptex:,
% \sys_if_engine_uptex:,
% \sys_if_engine_xetex:
% }
+% \begin{variable}{\c_sys_engine_str}
% Set up the engine tests on the basis exactly one test should be true.
% Mainly a case of looking for the appropriate marker primitive. For
% \upTeX{}, there is a complexity in that setting |-kanji-internal=sjis|
@@ -128,6 +227,7 @@
\cs_gset_eq:NN \sys_if_engine_luatex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_luatex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_luatex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { luatex }
}
\cs_if_exist:NT \pdftex_pdftexversion:D
{
@@ -135,6 +235,7 @@
\cs_gset_eq:NN \sys_if_engine_pdftex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_pdftex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_pdftex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { pdftex }
}
\cs_if_exist:NT \ptex_kanjiskip:D
{
@@ -148,12 +249,14 @@
\cs_gset_eq:NN \sys_if_engine_uptex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_uptex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_uptex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { uptex }
}
{
\cs_gset_eq:NN \sys_if_engine_ptex:T \use:n
\cs_gset_eq:NN \sys_if_engine_ptex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_ptex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_ptex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { ptex }
}
}
\cs_if_exist:NT \xetex_XeTeXversion:D
@@ -162,8 +265,51 @@
\cs_gset_eq:NN \sys_if_engine_xetex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_xetex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_xetex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { xetex }
}
% \end{macrocode}
+% \end{variable}
+% \end{macro}
+%
+% \subsection{Detecting the output}
+%
+% \begin{macro}[pTF, EXP]
+% {
+% \sys_if_output_dvi:,
+% \sys_if_output_pdf:
+% }
+% \begin{variable}{\c_sys_output_str}
+% This is a simple enough concept: the two views here are complementary.
+% \begin{macrocode}
+\bool_if:nTF
+ {
+ \cs_if_exist_p:N \pdftex_pdfoutput:D
+ && \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero
+ }
+ {
+ \cs_new_eq:NN \sys_if_output_dvi:T \use_none:n
+ \cs_new_eq:NN \sys_if_output_dvi:F \use:n
+ \cs_new_eq:NN \sys_if_output_dvi:TF \use_ii:nn
+ \cs_new_eq:NN \sys_if_output_dvi_p: \c_false_bool
+ \cs_new_eq:NN \sys_if_output_pdf:T \use:n
+ \cs_new_eq:NN \sys_if_output_pdf:F \use_none:n
+ \cs_new_eq:NN \sys_if_output_pdf:TF \use_i:nn
+ \cs_new_eq:NN \sys_if_output_pdf_p: \c_true_bool
+ \str_const:Nn \c_sys_output_str { pdf }
+ }
+ {
+ \cs_new_eq:NN \sys_if_output_dvi:T \use:n
+ \cs_new_eq:NN \sys_if_output_dvi:F \use_none:n
+ \cs_new_eq:NN \sys_if_output_dvi:TF \use_i:nn
+ \cs_new_eq:NN \sys_if_output_dvi_p: \c_true_bool
+ \cs_new_eq:NN \sys_if_output_pdf:T \use_none:n
+ \cs_new_eq:NN \sys_if_output_pdf:F \use:n
+ \cs_new_eq:NN \sys_if_output_pdf:TF \use_ii:nn
+ \cs_new_eq:NN \sys_if_output_pdf_p: \c_false_bool
+ \str_const:Nn \c_sys_output_str { dvi }
+ }
+% \end{macrocode}
+% \end{variable}
% \end{macro}
%
% \subsection{Deprecated functions}
@@ -194,6 +340,11 @@
}
% \end{macrocode}
%
+% Deprecated 2015-09-19 for removal after 2016-12-31.
+% \begin{macrocode}
+\cs_set_eq:NN \c_job_name_tl \c_sys_jobname_str
+% \end{macrocode}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 77673fbd8ef..5ffb9ffdf33 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3tl.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3tl.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Token lists}
%</driver|package>
%<*driver>
@@ -1065,14 +1065,6 @@
% Constant that is always empty.
% \end{variable}
%
-% \begin{variable}[updated = 2011-08-18]{\c_job_name_tl}
-% Constant that gets the \enquote{job name} assigned when \TeX{} starts.
-% \begin{texnote}
-% This copies the contents of the primitive \tn{jobname}. It is a constant
-% that is set by \TeX{} and should not be overwritten by the package.
-% \end{texnote}
-% \end{variable}
-%
% \begin{variable}{\c_space_tl}
% An explicit space character contained in a token list (compare this with
% \cs{c_space_token}). For use where an explicit space is required.
@@ -1238,24 +1230,6 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_job_name_tl}
-% Inherited from the \LaTeX3 name for the primitive: this needs to
-% actually contain the text of the job name rather than the name of
-% the primitive, of course.
-% \begin{macrocode}
-%<*initex>
-\tex_everyjob:D \exp_after:wN
- {
- \tex_the:D \tex_everyjob:D
- \tl_const:Nx \c_job_name_tl { \tex_jobname:D }
- }
-%</initex>
-%<*package>
-\tl_const:Nx \c_job_name_tl { \tex_jobname:D }
-%</package>
-% \end{macrocode}
-% \end{variable}
-%
% \begin{variable}{\c_space_tl}
% A space as a token list (as opposed to as a character).
% \begin{macrocode}
@@ -1638,7 +1612,7 @@
{ \use_ii:nn }
{
\char_set_lccode:nn { 0 } { \tex_newlinechar:D }
- \tl_to_lowercase:n { \@@_set_rescan:NnTF ^^@ } {#1}
+ \tex_lowercase:D { \@@_set_rescan:NnTF ^^@ } {#1}
}
{ \@@_set_rescan_multi:n }
{ \@@_set_rescan_single:nn { ' } }
@@ -1655,7 +1629,7 @@
\int_compare:nNnTF { `#1 } < { `\~ }
{
\char_set_lccode:nn { 0 } { `#1 + 1 }
- \tl_to_lowercase:n { \@@_set_rescan_single:nn { ^^@ } }
+ \tex_lowercase:D { \@@_set_rescan_single:nn { ^^@ } }
}
{ \@@_set_rescan_single_aux:nn { } }
}
@@ -2232,7 +2206,7 @@
% \texttt{true} code is mopped up by |#3|).
% \begin{macrocode}
\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
- { \c_zero #1 #4 }
+ { \exp_end: #1 #4 }
\cs_new_eq:NN \@@_case_end:nw \__prg_case_end:nw
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 586097d48a8..9699b2492eb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -37,7 +37,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3token.dtx 5893 2015-08-26 16:16:52Z mittelba $
+\GetIdInfo$Id: l3token.dtx 6040 2015-09-23 12:41:32Z joseph $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
@@ -1049,7 +1049,7 @@
{
\group_begin:
\char_set_lccode:nn { 0 } {#1}
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \@@_set_catcode:Nn ^^@ } {#2}
}
\tex_catcode:D \c_zero = \c_thirteen
@@ -1068,7 +1068,7 @@
{
\group_begin:
\char_set_lccode:nn { 0 } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\seq_if_in:NnF \l_char_active_seq { ^^@ }
@@ -1605,25 +1605,22 @@
% cannot contain |ma|, regardless of the escape character, even if
% the escape character is |m|\ldots{}
%
-% Both |ma| and |:| must be of category code $12$ (other), and we
-% achieve using the standard lowercasing technique.
+% Both |ma| and |:| must be of category code $12$ (other), so are
+% detokenized.
%
% \begin{macrocode}
-\group_begin:
-\char_set_catcode_other:N \M
-\char_set_catcode_other:N \A
-\char_set_lccode:nn { `\; } { `\: }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\F } { `\F }
-\tl_to_lowercase:n
+\use:x
{
- \group_end:
- \prg_new_conditional:Npnn \token_if_macro:N #1 { p , T , F , TF }
+ \prg_new_conditional:Npnn \exp_not:N \token_if_macro:N ##1
+ { p , T , F , TF }
{
- \exp_after:wN \@@_if_macro_p:w
- \token_to_meaning:N #1 MA; \q_stop
+ \exp_not:N \exp_after:wN \exp_not:N \@@_if_macro_p:w
+ \exp_not:N \token_to_meaning:N ##1 \tl_to_str:n { ma : }
+ \exp_not:N \q_stop
}
- \cs_new:Npn \@@_if_macro_p:w #1 MA #2 ; #3 \q_stop
+ \cs_new:Npn \exp_not:N \@@_if_macro_p:w
+ ##1 \tl_to_str:n { ma } ##2 \c_colon_str ##3 \exp_not:N \q_stop
+ }
{
\if_int_compare:w \__str_if_eq_x:nn { #2 } { cro } = \c_zero
\prg_return_true:
@@ -1631,7 +1628,6 @@
\prg_return_false:
\fi:
}
- }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1710,7 +1706,7 @@
% We convert the token list to lower case and restore the catcode and
% lowercase code changes.
% \begin{macrocode}
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\group_end:
% \end{macrocode}
@@ -1900,7 +1896,7 @@
}
\cs_new:Npn \@@_if_long_macro:w #1 LOXG~MACRO #2 \q_stop { #1 ~ }
% \end{macrocode}
-% Finally the \cs{tl_to_lowercase:n} ends!
+% Finally the \cs{tex_lowercase:D} ends!
% \begin{macrocode}
}
% \end{macrocode}
@@ -1959,30 +1955,32 @@
% is not a primitive.
%
% \begin{macrocode}
-\tex_chardef:D \c_token_A_int = `A ~ %
-\group_begin:
-\char_set_catcode_other:N \;
-\char_set_lccode:nn { `\; } { `\: }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\F } { `\F }
-\tl_to_lowercase:n {
- \group_end:
- \prg_new_conditional:Npnn \token_if_primitive:N #1 { p , T , F , TF }
- {
- \token_if_macro:NTF #1
- \prg_return_false:
- {
- \exp_after:wN \@@_if_primitive:NNw
- \token_to_meaning:N #1 ; ; ; \q_stop #1
- }
- }
- \cs_new:Npn \@@_if_primitive:NNw #1#2 #3 ; #4 \q_stop
- {
- \tl_if_empty:oTF { \@@_if_primitive_space:w #3 ~ }
- { \@@_if_primitive_loop:N #3 ; \q_stop }
- { \@@_if_primitive_nullfont:N }
- }
-}
+\tex_chardef:D \c_@@_A_int = `A ~ %
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \token_if_primitive:N ##1
+ { p , T , F , TF }
+ {
+ \exp_not:N \token_if_macro:NTF ##1
+ \exp_not:N \prg_return_false:
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \@@_if_primitive:NNw
+ \exp_not:N \token_to_meaning:N ##1
+ \tl_to_str:n { : : : } \exp_not:N \q_stop ##1
+ }
+ }
+ \cs_new:Npn \exp_not:N \@@_if_primitive:NNw
+ ##1##2 ##3 \c_colon_str ##4 \exp_not:N \q_stop
+ {
+ \exp_not:N \tl_if_empty:oTF
+ { \exp_not:N \@@_if_primitive_space:w ##3 ~ }
+ {
+ \exp_not:N \@@_if_primitive_loop:N ##3
+ \c_colon_str \exp_not:N \q_stop
+ }
+ { \exp_not:N \@@_if_primitive_nullfont:N }
+ }
+ }
\cs_new:Npn \@@_if_primitive_space:w #1 ~ { }
\cs_new:Npn \@@_if_primitive_nullfont:N #1
{
@@ -1994,7 +1992,7 @@
}
\cs_new:Npn \@@_if_primitive_loop:N #1
{
- \if_int_compare:w `#1 < \c_token_A_int %
+ \if_int_compare:w `#1 < \c_@@_A_int %
\exp_after:wN \@@_if_primitive:Nw
\exp_after:wN #1
\else:
diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
index b1c5171456a..dfca5c3513f 100644
--- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
@@ -37,8 +37,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{l3keys2e}{Support package l3kernel too old}
@@ -50,7 +50,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3keys2e.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3keys2e.dtx 6111 2015-09-27 16:06:17Z joseph $
{LaTeX2e option processing using LaTeX3 keys}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
index d204fd20a94..d2c106fc0d3 100644
--- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
@@ -41,8 +41,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{xparse}{Support package l3kernel too old}
@@ -54,7 +54,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: xparse.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: xparse.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental document command parser}
%</driver|package>
%<*driver>
@@ -717,15 +717,8 @@
% different category codes. This is used as the marker for nothing being
% returned when no optional argument is given.
% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \tl_const:Nn \c_@@_no_value_tl { QNoValue- }
- }
+\tl_const:Nx \c_@@_no_value_tl
+ { \char_generate:nn { `\- } { 11 } NoValue- }
% \end{macrocode}
% \end{variable}
%
@@ -1919,7 +1912,7 @@
}
}
% \end{macrocode}
-% This section needs a little explanation. In order to avoid loosing any
+% This section needs a little explanation. In order to avoid losing any
% braces, a token needs to be inserted before the argument to be grabbed.
% If the argument runs away because the closing token is missing then this
% inserted token shows up in the terminal. Ideally, |#1| would therefore be
@@ -1932,24 +1925,20 @@
% with different category codes, but that really should not happen in any
% sensible document-level syntax.)
% \begin{macrocode}
- \group_begin:
- \token_if_eq_catcode:NNTF #1 ^
- {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \group_begin:
\char_set_lccode:nn { `A } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\l_@@_fn_tl A
}
- }
- {
- \char_set_lccode:nn { `^ } { `#1 }
- \tl_to_lowercase:n
- {
- \group_end:
- \l_@@_fn_tl ^
- }
- }
+ }
+ {
+ \exp_after:wN \l_@@_fn_tl
+ \token_to_str:N #1
+ }
}
}
% \end{macrocode}
@@ -2536,7 +2525,7 @@
\@@_add_arg:o \c_@@_no_value_tl
\group_begin:
\char_set_lccode:nn { `\# } { \tex_endlinechar:D }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \peek_meaning_remove:NTF ## }
{
\__msg_kernel_error:nnxxx { xparse } { verbatim-newline }
@@ -2960,12 +2949,12 @@
\tl_set:Nn \l_@@_split_list_tl {#2}
\group_begin:
\char_set_lccode:nn { `\@ } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
- \group_end:
- \tl_replace_all:Nnn \l_@@_split_list_tl { @ } {#1}
- }
- \@@_split_list_multi:nV {#1} \l_@@_split_list_tl
+ \group_end:
+ \tl_replace_all:Nnn \l_@@_split_list_tl { @ }
+ } {#1}
+ \@@_split_list_multi:nV {#1} \l_@@_split_list_tl
}
\group_end:
% \end{macrocode}
@@ -3112,24 +3101,22 @@
% up to be expandable. The question mark prevents the auxiliary from
% losing braces.
% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\F } { `\F }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \prg_new_conditional:Npnn \@@_if_no_value:n #1 { T , F , TF }
- {
- \str_if_eq:onTF
- { \@@_if_value_aux:w ? #1 { } QNoValue- }
- { ? { } QNoValue- }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- \cs_new:Npn \@@_if_value_aux:w #1 QNoValue- { #1 }
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \@@_if_no_value:n ##1
+ { T , F , TF }
+ {
+ \exp_not:N \str_if_eq:onTF
+ {
+ \exp_not:N \@@_if_value_aux:w ? ##1 { }
+ \c_@@_no_value_tl
+ }
+ { ? { } \c_@@_no_value_tl }
+ { \exp_not:N \prg_return_true: }
+ { \exp_not:N \prg_return_false: }
+ }
+ \cs_new:Npn \exp_not:N \@@_if_value_aux:w ##1 \c_@@_no_value_tl
+ { ##1 }
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
index 40bc1122621..31cc098fd97 100644
--- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
@@ -41,8 +41,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{xtemplate}{Support package l3kernel too old}
@@ -54,7 +54,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: xtemplate.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental prototype document functions}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/tex/latex/l3build/l3build.lua b/Master/texmf-dist/tex/latex/l3build/l3build.lua
index e8fffc16c43..489819a709c 100644
--- a/Master/texmf-dist/tex/latex/l3build/l3build.lua
+++ b/Master/texmf-dist/tex/latex/l3build/l3build.lua
@@ -17,8 +17,8 @@
--]]
-- Version information: should be identical to that in l3build.dtx
-release_date = "2015/09/14"
-release_ver = "6007"
+release_date = "2015/09/24"
+release_ver = "6068"
-- "module" is a deprecated function in Lua 5.2: as we want the name
-- for other purposes, and it should eventually be 'free', simply
@@ -35,14 +35,14 @@ bundle = bundle or ""
if module == "" and bundle == "" then
if string.match(arg[0], ".*l3build%.lua$") then
print(
- "\n" ..
- "Error: Call l3build using a configuration file, not directly.\n"
- )
+ "\n"
+ .. "Error: Call l3build using a configuration file, not directly.\n"
+ )
else
print(
- "\n" ..
- "Error: Specify either bundle or module in configuration script.\n"
- )
+ "\n"
+ .. "Error: Specify either bundle or module in configuration script.\n"
+ )
end
os.exit(1)
end
@@ -170,19 +170,22 @@ function argparse()
engine = "engine",
["halt-on-error"] = "halt" ,
["halt-on-failure"] = "halt" ,
- help = "help"
+ help = "help" ,
+ quiet = "quiet"
}
local short_options =
{
e = "engine",
h = "help" ,
- H = "halt"
+ H = "halt" ,
+ q = "quiet"
}
local option_args =
{
engine = true ,
halt = false,
- help = false
+ help = false,
+ quiet = false
}
-- arg[1] is a special case: must be a command or "-h"/"--help"
-- Deal with this by assuming help and storing only apparently-valid
@@ -290,6 +293,7 @@ userargs = argparse()
optengines = userargs["engine"]
opthalt = userargs["halt"]
opthelp = userargs["help"]
+optquiet = userargs["quiet"]
-- Convert a file glob into a pattern for use by e.g. string.gub
-- Based on https://github.com/davidm/lua-glob-pattern
@@ -405,23 +409,31 @@ lfs = require("lfs")
-- For cleaning out a directory, which also ensures that it exists
function cleandir(dir)
- mkdir(dir)
- rm(dir, "*")
+ local errorlevel = mkdir(dir)
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
+ return rm(dir, "*")
end
-- Copy files 'quietly'
function cp(glob, source, dest)
+ local errorlevel
for _,i in ipairs(filelist(source, glob)) do
local source = source .. "/" .. i
if os_windows then
- os.execute(
- "copy /y " .. unix_to_win(source) .. " "
- .. unix_to_win(dest) .. " > nul"
- )
+ errorlevel = os.execute(
+ "copy /y " .. unix_to_win(source) .. " "
+ .. unix_to_win(dest) .. " > nul"
+ )
else
- os.execute("cp -f " .. source .. " " .. dest)
+ errorlevel = os.execute("cp -f " .. source .. " " .. dest)
+ end
+ if errorlevel ~=0 then
+ return errorlevel
end
end
+ return 0
end
-- OS-dependent test for a directory
@@ -479,9 +491,11 @@ function mkdir(dir)
-- Windows (with the extensions) will automatically make directory trees
-- but issues a warning if the dir already exists: avoid by including a test
local dir = unix_to_win(dir)
- os.execute("if not exist " .. dir .. "\\nul " .. "mkdir " .. dir)
+ return os.execute(
+ "if not exist " .. dir .. "\\nul " .. "mkdir " .. dir
+ )
else
- os.execute("mkdir -p " .. dir)
+ return os.execute("mkdir -p " .. dir)
end
end
@@ -512,9 +526,9 @@ end
function ren(dir, source, dest)
local dir = dir .. "/"
if os_windows then
- os.execute("ren " .. unix_to_win(dir) .. source .. " " .. dest)
+ return os.execute("ren " .. unix_to_win(dir) .. source .. " " .. dest)
else
- os.execute("mv " .. dir .. source .. " " .. dir .. dest)
+ return os.execute("mv " .. dir .. source .. " " .. dir .. dest)
end
end
@@ -523,6 +537,8 @@ function rm(source, glob)
for _,i in ipairs(filelist(source, glob)) do
os.remove(source .. "/" .. i)
end
+ -- os.remove doesn't give a sensible errorlevel
+ return 0
end
-- Remove a directory tree
@@ -530,9 +546,9 @@ function rmdir(dir)
-- First, make sure it exists to avoid any errors
mkdir(dir)
if os_windows then
- os.execute("rmdir /s /q " .. unix_to_win(dir) )
+ return os.execute("rmdir /s /q " .. unix_to_win(dir) )
else
- os.execute("rm -r " .. dir)
+ return os.execute("rm -r " .. dir)
end
end
@@ -553,18 +569,19 @@ end
-- Do some subtarget for all modules in a bundle
function allmodules(target)
- local errorlevel
for _,i in ipairs(modules) do
print(
- "Running script " .. scriptname .. " with target \"" .. target .. "\" for module "
- .. i
- )
+ "Running script " .. scriptname .. " with target \"" .. target
+ .. "\" for module "
+ .. i
+ )
local engines = ""
if optengines then
engines = " --engine=" .. table.concat(optengines, ",")
end
- errorlevel = run(
- i, "texlua " .. scriptname .. " " .. target
+ local errorlevel = run(
+ i,
+ "texlua " .. scriptname .. " " .. target
.. (opthalt and " -H" or "")
.. engines
)
@@ -672,10 +689,15 @@ end
-- Unpack files needed to support testing/typesetting/unpacking
function depinstall(deps)
+ local errorlevel
for _,i in ipairs(deps) do
print("Installing dependency: " .. i)
- run(i, "texlua " .. scriptname .. " unpack")
+ errorlevel = run(i, "texlua " .. scriptname .. " unpack -q")
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
end
+ return 0
end
-- Convert the raw log file into one for comparison/storage: keeps only
@@ -690,8 +712,8 @@ function formatlog(logfile, newfile, engine)
-- As Lua doesn't allow "(in|out)", a slightly complex approach:
-- do a substitution to check the line is exactly what is required!
string.match(
- string.gsub(line, "^\\openin", "\\openout"), "^\\openout%d%d? = "
- ) then
+ string.gsub(line, "^\\openin", "\\openout"), "^\\openout%d%d? = "
+ ) then
return true
end
return false
@@ -722,7 +744,7 @@ function formatlog(logfile, newfile, engine)
line = string.gsub(line, "%(%.%/", "(")
-- Zap paths if places other than 'here' are accessible
if checksearch then
- line = string.gsub(line, "%(.*/([%w-]+%.[%w-]+)%s*$", "(../%1")
+ line = string.gsub(line, "%(.*/([%w-]+%.[%w-]+)%)?%s*$", "(../%1")
end
-- Zap map loading of map
line = string.gsub(line, "%{%w?:?[%w/%-]*/pdftex%.map%}", "")
@@ -733,12 +755,15 @@ function formatlog(logfile, newfile, engine)
end
-- TeX90/XeTeX knows only the smaller set of dimension units
line = string.gsub(
- line, "cm, mm, dd, cc, bp, or sp", "cm, mm, dd, cc, nd, nc, bp, or sp"
- )
+ line,
+ "cm, mm, dd, cc, bp, or sp", "cm, mm, dd, cc, nd, nc, bp, or sp"
+ )
-- Normalise a case where fixing a TeX bug changes the message text
line = string.gsub(line, "\\csname\\endcsname ", "\\csname\\endcsname")
-- Zap "on line <num>" and replace with "on line ..."
+ -- Two similar cases, Lua patterns mean we need to do them separately
line = string.gsub(line, "on line %d*", "on line ...")
+ line = string.gsub(line, "on input line %d*", "on input line ...")
-- Tidy up to ^^ notation
for i = 0, 31 do
line = string.gsub(line, string.char(i), "^^" .. string.char(64 + i))
@@ -747,8 +772,10 @@ function formatlog(logfile, newfile, engine)
-- Two stages as line wrapping alters some of them and restore the break
line = string.gsub(line, "^l%.%d+ ", "l. ...")
line = string.gsub(
- line, "%.%.%.l%.%d+ ( *)%}$", "..." .. os_newline .. "l. ...%1}"
- )
+ line,
+ "%.%.%.l%.%d+ ( *)%}$",
+ "..." .. os_newline .. "l. ...%1}"
+ )
-- Remove spaces at the start of lines: deals with the fact that LuaTeX
-- uses a different number to the other engines
line = string.gsub(line, "^%s+", "")
@@ -825,9 +852,9 @@ function formatlualog(logfile, newfile)
m .. " (%-?)%d+%.%d+",
m .. " %1"
.. string.format(
- "%.3f",
- string.match(line, m .. " %-?(%d+%.%d+)") or 0
- )
+ "%.3f",
+ string.match(line, m .. " %-?(%d+%.%d+)") or 0
+ )
)
end
if string.match(line, "glue set %-?%d+%.%d+") then
@@ -841,7 +868,7 @@ function formatlualog(logfile, newfile)
line = round_digits(line, "plus")
line = round_digits(line, "minus")
end
- -- LuaTeX writes ^^M as a new line, which we loose
+ -- LuaTeX writes ^^M as a new line, which we lose
line = string.gsub(line, "%^%^M", "")
-- Remove U+ notation in the "Missing character" message
line = string.gsub(
@@ -917,7 +944,7 @@ function formatlualog(logfile, newfile)
elseif (string.len(lastline) == maxprintline) then
if string.match(line, "\\ETC%.%}$") then
-- If the line wrapped at \ETC we might have lost a space
- return lastline
+ return lastline
.. ((string.match(line, "^\\ETC%.%}$") and " ") or "")
.. line, ""
elseif string.match(line, "^%}%}%}$") then
@@ -998,7 +1025,7 @@ function runcheck(name, hide)
if not locate({unpackdir, testfiledir}, {name .. lveext}) then
print(
"Error: failed to find " .. tlgext .. " or "
- .. lveext .. " file for " .. name .. "!"
+ .. lveext .. " file for " .. name .. "!"
)
os.exit(1)
end
@@ -1072,6 +1099,11 @@ function runtest(name, engine, hide, ext)
string.match(engine, "^u?ptex$") then
realengine = "e" .. engine
end
+ -- Special casing for XeTeX engine
+ local checkopts = checkopts
+ if string.match(engine, "xetex") then
+ checkopts = checkopts .. " -no-pdf"
+ end
local logfile = testdir .. "/" .. name .. logext
local newfile = testdir .. "/" .. name .. "." .. engine .. logext
local asciiopt = ""
@@ -1083,18 +1115,18 @@ function runtest(name, engine, hide, ext)
end
for i = 1, checkruns do
run(
- testdir,
- -- No use of localdir here as the files get copied to testdir:
- -- avoids any paths in the logs
- os_setenv .. " TEXINPUTS=." .. (checksearch and os_pathsep or "")
- .. os_concat ..
- -- Avoid spurious output from (u)pTeX
- os_setenv .. " GUESS_INPUT_KANJI_ENCODING=0"
- .. os_concat ..
- realengine .. format .. " "
- .. checkopts .. " " .. asciiopt .. lvtfile
- .. (hide and (" > " .. os_null) or "")
- )
+ testdir,
+ -- No use of localdir here as the files get copied to testdir:
+ -- avoids any paths in the logs
+ os_setenv .. " TEXINPUTS=." .. (checksearch and os_pathsep or "")
+ .. os_concat ..
+ -- Avoid spurious output from (u)pTeX
+ os_setenv .. " GUESS_INPUT_KANJI_ENCODING=0"
+ .. os_concat ..
+ realengine .. format .. " "
+ .. checkopts .. " " .. asciiopt .. lvtfile
+ .. (hide and (" > " .. os_null) or "")
+ )
end
formatlog(logfile, newfile, engine)
-- Store secondary files for this engine
@@ -1337,24 +1369,29 @@ function clean()
-- To make sure that distribdir never contains any stray subdirs,
-- it is entirely removed then recreated rather than simply deleting
-- all of the files
- rmdir(distribdir)
- mkdir(distribdir)
- cleandir(localdir)
- cleandir(testdir)
- cleandir(typesetdir)
- cleandir(unpackdir)
+ local errorlevel =
+ rmdir(distribdir) +
+ mkdir(distribdir) +
+ cleandir(localdir) +
+ cleandir(testdir) +
+ cleandir(typesetdir) +
+ cleandir(unpackdir)
for _,i in ipairs(cleanfiles) do
- rm(".", i)
+ errorlevel = rm(".", i) + errorlevel
end
+ return errorlevel
end
function bundleclean()
- allmodules("clean")
+ local errorlevel = allmodules("clean")
for _,i in ipairs(cleanfiles) do
- rm(".", i)
+ errorlevel = rm(".", i) + errorlevel
end
- rmdir(ctandir)
- rmdir(tdsdir)
+ return (
+ errorlevel +
+ rmdir(ctandir) +
+ rmdir(tdsdir)
+ )
end
-- Check commands are defined
@@ -1404,19 +1441,19 @@ function ctan(standalone)
local exclude = tab_to_str(excludefiles)
-- First, zip up all of the text files
run(
- dir,
- zipexe .. " " .. zipopts .. " -ll ".. zipname .. " " .. "."
- .. (
- (binfiles or exclude) and (" -x" .. binfiles .. " " .. exclude)
- or ""
- )
- )
+ dir,
+ zipexe .. " " .. zipopts .. " -ll ".. zipname .. " " .. "."
+ .. (
+ (binfiles or exclude) and (" -x" .. binfiles .. " " .. exclude)
+ or ""
+ )
+ )
-- Then add the binary ones
run(
- dir,
- zipexe .. " " .. zipopts .. " -g ".. zipname .. " " .. ". -i" ..
- binfiles .. (exclude and (" -x" .. exclude) or "")
- )
+ dir,
+ zipexe .. " " .. zipopts .. " -g ".. zipname .. " " .. ". -i" ..
+ binfiles .. (exclude and (" -x" .. exclude) or "")
+ )
end
local errorlevel
if standalone then
@@ -1543,14 +1580,24 @@ end
-- Locally install files: only deals with those extracted, not docs etc.
function install()
- unpack()
+ local errorlevel = unpack()
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
kpse.set_program_name("latex")
local texmfhome = kpse.var_value("TEXMFHOME")
local installdir = texmfhome .. "/tex/" .. moduledir
- cleandir(installdir)
+ errorlevel = cleandir(installdir)
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
for _,i in ipairs(installfiles) do
- cp(i, unpackdir, installdir)
+ errorlevel = cp(i, unpackdir, installdir)
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
end
+ return 0
end
function save(names)
@@ -1583,7 +1630,7 @@ function save(names)
print(
"Test input \"" .. testfiledir .. "/" .. name .. lvtext
.. "\" not found"
- )
+ )
end
end
end
@@ -1592,25 +1639,47 @@ end
-- Unpack the package files using an 'isolated' system: this requires
-- a copy of the 'basic' DocStrip program, which is used then removed
function unpack()
- depinstall(unpackdeps)
- bundleunpack()
+ local errorlevel = depinstall(unpackdeps)
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
+ errorlevel = bundleunpack()
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
for _,i in ipairs(installfiles) do
- cp(i, unpackdir, localdir)
+ errorlevel = cp(i, unpackdir, localdir)
+ if errorlevel ~= 0 then
+ return errorlevel
+ end
end
+ return 0
end
-- Split off from the main unpack so it can be used on a bundle and not
-- leave only one modules files
bundleunpack = bundleunpack or function(sourcedir)
- mkdir(localdir)
- cleandir(unpackdir)
+ local errorlevel = mkdir(localdir)
+ if errorlevel ~=0 then
+ return errorlevel
+ end
+ errorlevel = cleandir(unpackdir)
+ if errorlevel ~=0 then
+ return errorlevel
+ end
for _,i in ipairs(sourcedir or {"."}) do
for _,j in ipairs(sourcefiles) do
- cp(j, i, unpackdir)
+ errorlevel = cp(j, i, unpackdir)
+ if errorlevel ~=0 then
+ return errorlevel
+ end
end
end
for _,i in ipairs(unpacksuppfiles) do
- cp(i, supportdir, localdir)
+ errorlevel = cp(i, supportdir, localdir)
+ if errorlevel ~=0 then
+ return errorlevel
+ end
end
for _,i in ipairs(unpackfiles) do
for _,j in ipairs(filelist(unpackdir, i)) do
@@ -1621,22 +1690,28 @@ bundleunpack = bundleunpack or function(sourcedir)
-- stops, which confuses Lua)
os.execute(os_yes .. ">>" .. localdir .. "/yes")
local localdir = relpath(localdir, unpackdir)
- run(
+ errorlevel = run(
unpackdir,
os_setenv .. " TEXINPUTS=." .. os_pathsep
.. localdir .. (unpacksearch and os_pathsep or "") ..
os_concat ..
unpackexe .. " " .. unpackopts .. " " .. j .. " < "
.. localdir .. "/yes"
+ .. (optquiet and (" > " .. os_null) or "")
)
+ if errorlevel ~=0 then
+ return errorlevel
+ end
end
end
+ return 0
end
function version()
print(
- "\nl3build Release " .. string.gsub(release_date, "/", "-") ..
- " (SVN r" .. release_ver .. ")\n"
+ "\n"
+ .. "l3build Release " .. string.gsub(release_date, "/", "-")
+ .. " (SVN r" .. release_ver .. ")\n"
)
end
@@ -1700,14 +1775,18 @@ function stdmain(target, files)
help()
end
elseif target == "unpack" then
- unpack()
+ errorlevel = unpack()
elseif target == "version" then
version()
else
help()
end
end
- os.exit(errorlevel)
+ if errorlevel ~= 0 then
+ os.exit(1)
+ else
+ os.exit(0)
+ end
end
-- Allow main function to be disabled 'higher up'
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
index 18dea9646a4..8ac2f9772c1 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3sort/l3sort.sty
@@ -46,8 +46,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{l3sort}{Support package l3kernel too old}
@@ -59,7 +59,7 @@
}%
\endinput
}
-\GetIdInfo$Id: l3sort.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3sort.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental sorting functions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3flag.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3flag.sty
index ae812d5afb1..d861dc4236e 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3flag.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3flag.sty
@@ -45,8 +45,8 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{l3flag}{Support package l3kernel too old}
@@ -58,7 +58,7 @@
}%
\endinput
}
-\GetIdInfo$Id: l3flag.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3flag.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental flags}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty
index da16502dece..d03d173ca60 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex-trace.sty
@@ -45,8 +45,8 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{l3regex}{Support package l3kernel too old}
@@ -58,11 +58,11 @@
}%
\endinput
}
-\GetIdInfo$Id: l3regex.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3regex.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental regular expressions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str, l3str-convert}
+\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str-convert}
\cs_generate_variant:Nn \tl_to_str:n { V }
\cs_new:Npn \__regex_tmp:w { }
\tl_new:N \l__regex_internal_a_tl
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
index 199e2dd9d2b..7d20125136d 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3regex.sty
@@ -45,8 +45,8 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{l3regex}{Support package l3kernel too old}
@@ -58,11 +58,11 @@
}%
\endinput
}
-\GetIdInfo$Id: l3regex.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3regex.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental regular expressions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str, l3str-convert}
+\RequirePackage{l3tl-build, l3tl-analysis, l3flag, l3str-convert}
\cs_generate_variant:Nn \tl_to_str:n { V }
\cs_new:Npn \__regex_tmp:w { }
\tl_new:N \l__regex_internal_a_tl
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty
index e811c9e00a9..eec15a9d29d 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty
@@ -46,11 +46,11 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str-convert.dtx 5998 2015-09-11 19:51:00Z joseph $
+\GetIdInfo$Id: l3str-convert.dtx 6106 2015-09-26 08:54:30Z joseph $
{L3 Experimental string encoding conversions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3str,l3tl-analysis,l3tl-build,l3flag}
+\RequirePackage{l3tl-analysis,l3tl-build,l3flag}
\cs_if_exist:NF \use_ii_i:nn
{ \cs_new:Npn \use_ii_i:nn #1#2 { #2 #1 } }
\int_const:Nn \c_max_char_int
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
index 3449f5b7cac..ab454bf1ad2 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str-format.dtx 5906 2015-09-02 13:17:05Z mittelba $
+\GetIdInfo$Id: l3str-format.dtx 6009 2015-09-18 08:09:21Z joseph $
{L3 Experimental string formatting}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -138,14 +138,14 @@
\use:nf { #2 #1 }
{
\prg_replicate:nn
- { \int_max:nn { #3 - \__str_count_unsafe:n { #2 #1 } } { 0 } }
+ { \int_max:nn { #3 - \__str_count:n { #2 #1 } } { 0 } }
{#4}
}
}
\cs_new:cpn { __str_format_align_>:nnnN } #1#2#3#4
{
\prg_replicate:nn
- { \int_max:nn { #3 - \__str_count_unsafe:n { #2 #1 } } { 0 } }
+ { \int_max:nn { #3 - \__str_count:n { #2 #1 } } { 0 } }
{#4}
#2 #1
}
@@ -156,7 +156,7 @@
\prg_replicate:nn
{
\int_max:nn \c_zero
- { #3 - \__str_count_unsafe:n { #2 #1 } - \c_one }
+ { #3 - \__str_count:n { #2 #1 } - \c_one }
/ \c_two
}
{#4}
@@ -166,7 +166,7 @@
\prg_replicate:nn
{
\int_max:nn \c_zero
- { #3 - \__str_count_unsafe:n { #2 #1 } }
+ { #3 - \__str_count:n { #2 #1 } }
/ \c_two
}
{#4}
@@ -177,7 +177,7 @@
\use:nf {#2}
{
\prg_replicate:nn
- { \int_max:nn { #3 - \__str_count_unsafe:n { #2 #1 } } { 0 } }
+ { \int_max:nn { #3 - \__str_count:n { #2 #1 } } { 0 } }
{#4}
}
#1
@@ -213,8 +213,8 @@
}
\__str_format_put:nw { {#4} }
\tl_if_empty:nTF {#5}
- { \__str_format_put:nw { \__str_range_unsafe:nnn { {1} {-1} } } }
- { \__str_format_put:nw { \__str_range_unsafe:nnn { {1} {#5} } } }
+ { \__str_format_put:nw { \__str_range:nnn { {1} {-1} } } }
+ { \__str_format_put:nw { \__str_range:nnn { {1} {#5} } } }
\token_if_eq_charcode:NNF #6 s
{
\token_if_eq_charcode:NNF #6 ?
@@ -428,7 +428,7 @@
{
\use:nf
{ #1 . #2 }
- { \prg_replicate:nn { #4 - \__str_count_unsafe:n {#2} } {0} }
+ { \prg_replicate:nn { #4 - \__str_count:n {#2} } {0} }
}
\cs_new:Npn \__str_format_fp_g:wn \s__fp \__fp_chk:w #1#2 ; #3
{
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty
deleted file mode 100644
index db0c177ea56..00000000000
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty
+++ /dev/null
@@ -1,355 +0,0 @@
-%%
-%% This is file `l3str.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% l3str-expl.dtx (with options: `package')
-%%
-%% EXPERIMENTAL CODE
-%%
-%% Do not distribute this file without also distributing the
-%% source files specified above.
-%%
-%% Do not distribute a modified version of this file.
-%%
-%% File: l3str.dtx Copyright (C) 2011-2015 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3experimental bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
- {}
- {%
- \PackageError{l3str}{Support package l3kernel too old}
- {%
- Please install an up to date version of l3kernel\MessageBreak
- using your TeX package manager or from CTAN.\MessageBreak
- \MessageBreak
- Loading l3str will abort!%
- }%
- \endinput
- }
-\GetIdInfo$Id: l3str-expl.dtx 6001 2015-09-11 21:50:23Z joseph $
- {L3 Experimental strings}
-\def\ExplFileName{l3str}
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\cs_new_eq:NN \str_new:N \tl_new:N
-\cs_generate_variant:Nn \str_new:N { c }
-\tl_map_inline:nn
- {
- { set }
- { gset }
- { const }
- { put_left }
- { gput_left }
- { put_right }
- { gput_right }
- }
- {
- \cs_new_protected:cpx { str_ #1 :Nn } ##1##2
- { \exp_not:c { tl_ #1 :Nx } ##1 { \exp_not:N \tl_to_str:n {##2} } }
- \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :Nn } { Nx , cn , cx }
- }
-\cs_if_exist:NF \c_backslash_str
- { \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } }
-\str_const:Nx \c_left_brace_str { \cs_to_str:N \{ }
-\str_const:Nx \c_right_brace_str { \cs_to_str:N \} }
-\str_const:Nx \c_hash_str { \cs_to_str:N \# }
-\str_const:Nx \c_tilde_str { \cs_to_str:N \~ }
-\str_const:Nx \c_percent_str { \cs_to_str:N \% }
-\str_new:N \l_tmpa_str
-\str_new:N \l_tmpb_str
-\str_new:N \g_tmpa_str
-\str_new:N \g_tmpb_str
-\cs_new_nopar:Npn \str_count_spaces:N
- { \exp_args:No \str_count_spaces:n }
-\cs_new:Npn \str_count_spaces:n #1
- {
- \int_eval:n
- {
- \exp_after:wN \__str_count_spaces_loop:wwwwwwwww
- \tl_to_str:n {#1} ~
- X 7 ~ X 6 ~ X 5 ~ X 4 ~ X 3 ~ X 2 ~ X 1 ~ X 0 ~ X -1 ~
- \q_stop
- }
- }
-\cs_new:Npn \__str_count_spaces_loop:wwwwwwwww #1~#2~#3~#4~#5~#6~#7~#8~#9~
- {
- \if_meaning:w X #9
- \use_i_delimit_by_q_stop:nw
- \fi:
- \c_nine + \__str_count_spaces_loop:wwwwwwwww
- }
-\cs_new_nopar:Npn \str_count:N { \exp_args:No \str_count:n }
-\cs_new:Npn \str_count:n #1
- {
- \__str_count:n
- {
- \str_count_spaces:n {#1}
- + \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1}
- }
- }
-\cs_new:Npn \__str_count_unsafe:n #1
- {
- \__str_count:n
- { \__str_count_loop:NNNNNNNNN #1 }
- }
-\cs_new:Npn \str_count_ignore_spaces:n #1
- {
- \__str_count:n
- { \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1} }
- }
-\cs_new:Npn \__str_count:n #1
- {
- \int_eval:n
- {
- #1
- { X \c_eight } { X \c_seven } { X \c_six }
- { X \c_five } { X \c_four } { X \c_three }
- { X \c_two } { X \c_one } { X \c_zero }
- \q_stop
- }
- }
-\cs_set:Npn \__str_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
- {
- \if_meaning:w X #9
- \exp_after:wN \use_none_delimit_by_q_stop:w
- \fi:
- \c_nine + \__str_count_loop:NNNNNNNNN
- }
-\cs_new_nopar:Npn \str_head:N { \exp_args:No \str_head:n }
-\cs_set:Npn \str_head:n #1
- {
- \exp_after:wN \__str_head:w
- \tl_to_str:n {#1}
- { { } } ~ \q_stop
- }
-\cs_set:Npn \__str_head:w #1 ~ %
- { \use_i_delimit_by_q_stop:nw #1 { ~ } }
-\cs_new:Npn \str_head_ignore_spaces:n #1
- {
- \exp_after:wN \use_i_delimit_by_q_stop:nw
- \tl_to_str:n {#1} { } \q_stop
- }
-\cs_new_nopar:Npn \str_tail:N { \exp_args:No \str_tail:n }
-\cs_set:Npn \str_tail:n #1
- {
- \exp_after:wN \__str_tail_auxi:w
- \reverse_if:N \if_charcode:w
- \scan_stop: \tl_to_str:n {#1} X X \q_stop
- }
-\cs_set:Npn \__str_tail_auxi:w #1 X #2 \q_stop { \fi: #1 }
-\cs_new:Npn \str_tail_ignore_spaces:n #1
- {
- \exp_after:wN \__str_tail_auxii:w
- \tl_to_str:n {#1} \q_mark \q_mark \q_stop
- }
-\cs_new:Npn \__str_tail_auxii:w #1 #2 \q_mark #3 \q_stop { #2 }
-\group_begin:
-\char_set_lccode:nn { `\* } { `\ }
-\char_set_lccode:nn { `\A } { `\A }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new:Npn \__str_to_other:n #1
- {
- \exp_after:wN \__str_to_other_loop:w \tl_to_str:n {#1} ~ %
- A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_mark \q_stop
- }
- \cs_new:Npn \__str_to_other_loop:w
- #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 ~ #7 ~ #8 ~ #9 \q_stop
- {
- \if_meaning:w A #8
- \__str_to_other_end:w
- \fi:
- \__str_to_other_loop:w
- #9 #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * \q_stop
- }
- \cs_new:Npn \__str_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop
- { \fi: #2 }
- }
-\cs_new:Npn \__str_skip_exp_end:w #1;
- {
- \if_int_compare:w #1 > \c_eight
- \exp_after:wN \__str_skip_loop:wNNNNNNNN
- \else:
- \exp_after:wN \__str_skip_end:w
- \int_use:N \__int_eval:w
- \fi:
- #1 ;
- }
-\cs_new:Npn \__str_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
- { \exp_after:wN \__str_skip_exp_end:w \int_use:N \__int_eval:w #1 - \c_eight ; }
-\cs_new:Npn \__str_skip_end:w #1 ;
- {
- \exp_after:wN \__str_skip_end:NNNNNNNN
- \if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or:
- }
-\cs_new:Npn \__str_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: }
-\cs_new:Npn \__str_collect_delimit_by_q_stop:w #1;
- { \__str_collect_loop:wn #1 ; { } }
-\cs_new:Npn \__str_collect_loop:wn #1 ;
- {
- \if_int_compare:w #1 > \c_seven
- \exp_after:wN \__str_collect_loop:wnNNNNNNN
- \else:
- \exp_after:wN \__str_collect_end:wn
- \fi:
- #1 ;
- }
-\cs_new:Npn \__str_collect_loop:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9
- {
- \exp_after:wN \__str_collect_loop:wn
- \int_use:N \__int_eval:w #1 - \c_seven ;
- { #2 #3#4#5#6#7#8#9 }
- }
-\cs_new:Npn \__str_collect_end:wn #1 ;
- {
- \exp_after:wN \__str_collect_end:nnnnnnnnw
- \if_case:w \if_int_compare:w #1 > \c_zero #1 \else: 0 \fi: \exp_stop_f:
- \or: \or: \or: \or: \or: \or: \fi:
- }
-\cs_new:Npn \__str_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop
- { #1#2#3#4#5#6#7#8 }
-\cs_new_nopar:Npn \str_item:Nn { \exp_args:No \str_item:nn }
-\cs_new:Npn \str_item:nn #1#2
- {
- \exp_args:Nf \tl_to_str:n
- {
- \exp_args:Nf \__str_item_unsafe:nn
- { \__str_to_other:n {#1} } {#2}
- }
- }
-\cs_new:Npn \str_item_ignore_spaces:nn #1
- { \exp_args:No \__str_item_unsafe:nn { \tl_to_str:n {#1} } }
-\cs_new:Npn \__str_item_unsafe:nn #1#2
- {
- \exp_after:wN \__str_item:ww
- \int_use:N \__int_eval:w #2 \exp_after:wN ;
- \__int_value:w \__str_count_unsafe:n {#1} ;
- #1 \q_stop
- }
-\cs_new:Npn \__str_item:ww #1; #2;
- {
- \int_compare:nNnTF {#1} < \c_zero
- {
- \int_compare:nNnTF {#1} < {-#2}
- { \use_none_delimit_by_q_stop:w }
- {
- \exp_after:wN \use_i_delimit_by_q_stop:nw
- \exp:w \exp_after:wN \__str_skip_exp_end:w
- \int_use:N \__int_eval:w #1 + #2 ;
- }
- }
- {
- \int_compare:nNnTF {#1} > {#2}
- { \use_none_delimit_by_q_stop:w }
- {
- \exp_after:wN \use_i_delimit_by_q_stop:nw
- \exp:w \__str_skip_exp_end:w #1 ; { }
- }
- }
- }
-\cs_new:Npn \__str_range_normalize:nn #1#2
- {
- \int_eval:n
- {
- \if_int_compare:w #1 < \c_zero
- \if_int_compare:w #1 < -#2 \exp_stop_f:
- \c_zero
- \else:
- #1 + #2 + \c_one
- \fi:
- \else:
- \if_int_compare:w #1 < #2 \exp_stop_f:
- #1
- \else:
- #2
- \fi:
- \fi:
- }
- }
-\cs_new_nopar:Npn \str_range:Nnn { \exp_args:No \str_range:nnn }
-\cs_new:Npn \str_range:nnn #1#2#3
- {
- \exp_args:Nf \tl_to_str:n
- {
- \exp_args:Nf \__str_range_unsafe:nnn
- { \__str_to_other:n {#1} } {#2} {#3}
- }
- }
-\cs_new:Npn \str_range_ignore_spaces:nnn #1
- { \exp_args:No \__str_range_unsafe:nnn { \tl_to_str:n {#1} } }
-\cs_new:Npn \__str_range_unsafe:nnn #1#2#3
- {
- \exp_after:wN \__str_range:www
- \__int_value:w \__str_count_unsafe:n {#1} \exp_after:wN ;
- \int_use:N \__int_eval:w #2 - \c_one \exp_after:wN ;
- \int_use:N \__int_eval:w #3 ;
- #1 \q_stop
- }
-\cs_new:Npn \__str_range:www #1; #2; #3;
- {
- \exp_args:Nf \__str_range:nnw
- { \__str_range_normalize:nn {#2} {#1} }
- { \__str_range_normalize:nn {#3} {#1} }
- }
-\cs_new:Npn \__str_range:nnw #1#2
- {
- \exp_after:wN \__str_collect_delimit_by_q_stop:w
- \int_use:N \__int_eval:w #2 - #1 \exp_after:wN ;
- \exp:w \__str_skip_exp_end:w #1 ;
- }
-\prg_new_conditional:Npnn \str_if_eq:NN #1#2 { p , TF , T , F }
- {
- \if_int_compare:w \__str_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 }
- = \c_zero \prg_return_true: \else: \prg_return_false: \fi:
- }
-\cs_new_eq:NN \str_show:n \tl_show:n
-\cs_new_eq:NN \str_show:N \tl_show:N
-\cs_generate_variant:Nn \str_show:N { c }
-\cs_new:Npn \str_substr:Nnn #1 { \__str_substr:nnn { \str_range:Nnn #1 } }
-\cs_new:Npn \str_substr:nnn #1 { \__str_substr:nnn { \str_range:nnn {#1} } }
-\cs_new:Npn \str_substr_ignore_spaces:nnn #1
- { \__str_substr:nnn { \str_range_ignore_spaces:nnn {#1} } }
-\cs_new:Npn \__str_substr:nnn #1#2#3
- {
- \tl_if_empty:nTF {#2}
- { \tl_if_empty:nTF {#3} { #1 { 1} { -1 } } { #1 { 1} {#3} } }
- { \tl_if_empty:nTF {#3} { #1 {#2} { -1 } } { #1 {#2} {#3} } }
- }
-\cs_new_eq:NN \c_lbrace_str \c_left_brace_str
-\cs_new_eq:NN \c_rbrace_str \c_right_brace_str
-%%
-%%
-%% End of file `l3str.sty'.
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
index 61a25616ef7..bfa6d3c04d9 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
@@ -46,11 +46,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{expl3}
-\GetIdInfo$Id: l3tl-analysis.dtx 5899 2015-08-31 21:49:59Z joseph $
+\GetIdInfo$Id: l3tl-analysis.dtx 6106 2015-09-26 08:54:30Z joseph $
{L3 Experimental token lists analysis}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{l3str}
\__scan_new:N \s__tl
\tl_new:N \l__tl_analysis_internal_tl
\cs_new_eq:NN \l__tl_analysis_token ?
diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
index 32b6f0565ee..7048acfca86 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty
@@ -47,8 +47,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{l3galley}{Support package l3kernel too old}
@@ -60,7 +60,7 @@
}%
\endinput
}
-\GetIdInfo$Id: l3galley.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3galley.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental galley code}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
index 0c0e211dda4..6a392563581 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex
@@ -82,8 +82,8 @@
%% -----------------------------------------------------------------------
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 programming layer}
-\def\ExplFileDate{2015/09/11}
-\def\ExplFileVersion{6002}
+\def\ExplFileDate{2015/09/27}
+\def\ExplFileVersion{6111}
\begingroup
\def\next{\endgroup}
\expandafter\ifx\csname PackageError\endcsname\relax
@@ -489,7 +489,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3names.dtx 5939 2015-09-07 21:15:55Z joseph $
+\GetIdInfo$Id: l3names.dtx 6108 2015-09-27 08:58:42Z joseph $
{L3 Namespace for primitives}
\let \tex_global:D \global
\let \tex_let:D \let
@@ -1000,8 +1000,9 @@
\__kernel_primitive:NN \rpcode \pdftex_rpcode:D
\__kernel_primitive:NN \synctex \pdftex_synctex:D
\__kernel_primitive:NN \tagcode \pdftex_tagcode:D
+ \__kernel_primitive:NN \suppressfontnotfounderror \xetex_suppressfontnotfounderror:D
\__kernel_primitive:NN \XeTeXcharclass \xetex_charclass:D
- \__kernel_primitive:NN \XeTeXcharglyph \xetex_charcglyph:D
+ \__kernel_primitive:NN \XeTeXcharglyph \xetex_charglyph:D
\__kernel_primitive:NN \XeTeXcountfeatures \xetex_countfeatures:D
\__kernel_primitive:NN \XeTeXcountglyphs \xetex_countglyphs:D
\__kernel_primitive:NN \XeTeXcountselectors \xetex_countselectors:D
@@ -1029,7 +1030,7 @@
\__kernel_primitive:NN \XeTeXlinebreakskip \xetex_linebreakskip:D
\__kernel_primitive:NN \XeTeXlinebreaklocale \xetex_linebreaklocale:D
\__kernel_primitive:NN \XeTeXlinebreakpenalty \xetex_linebreakpenalty:D
- \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcounfeatures:D
+ \__kernel_primitive:NN \XeTeXOTcountfeatures \xetex_OTcountfeatures:D
\__kernel_primitive:NN \XeTeXOTcountlanguages \xetex_OTcountlanguages:D
\__kernel_primitive:NN \XeTeXOTcountscripts \xetex_OTcountscripts:D
\__kernel_primitive:NN \XeTeXOTfeaturetag \xetex_OTfeaturetag:D
@@ -1084,7 +1085,6 @@
\__kernel_primitive:NN \prehyphenchar \luatex_prehyphenchar:D
\__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D
\__kernel_primitive:NN \scantextokens \luatex_scantextokens:D
- \__kernel_primitive:NN \suppressfontnotfounderror \luatex_suppressfontnotfounderror:D
\__kernel_primitive:NN \suppressifcsnameerror \luatex_suppressifcsnameerror:D
\__kernel_primitive:NN \suppresslongerror \luatex_suppresslongerror:D
\__kernel_primitive:NN \suppressmathparerror \luatex_suppressmathparerror:D
@@ -1320,12 +1320,12 @@
\tex_let:D \luatex_prehyphenchar:D \luatexprehyphenchar
\tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
\tex_let:D \luatex_scantextokens:D \luatexscantextokens
- \tex_let:D \luatex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror
\tex_let:D \luatex_suppressifcsnameerror:D \luatexsuppressifcsnameerror
\tex_let:D \luatex_suppresslongerror:D \luatexsuppresslongerror
\tex_let:D \luatex_suppressmathparerror:D \luatexsuppressmathparerror
\tex_let:D \luatex_suppressoutererror:D \luatexsuppressoutererror
\tex_let:D \utex_char:D \luatexUchar
+ \tex_let:D \xetex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror
\tex_let:D \luatex_bodydir:D \luatexbodydir
\tex_let:D \luatex_boxdir:D \luatexboxdir
\tex_let:D \luatex_chardp:D \luatexchardp
@@ -1436,7 +1436,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3basics.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3basics.dtx 6033 2015-09-22 19:48:51Z bruno $
{L3 Basic definitions}
\tex_let:D \if_true: \tex_iftrue:D
\tex_let:D \if_false: \tex_iffalse:D
@@ -1461,7 +1461,6 @@
\tex_let:D \exp_not:n \etex_unexpanded:D
\tex_let:D \exp:w \tex_romannumeral:D
\tex_chardef:D \exp_end: = 0 ~
-
\tex_let:D \token_to_meaning:N \tex_meaning:D
\tex_let:D \cs_meaning:N \tex_meaning:D
\tex_let:D \tl_to_str:n \etex_detokenize:D
@@ -2680,7 +2679,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3tl.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3tl.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Token lists}
\cs_new_protected:Npn \tl_new:N #1
{
@@ -2729,7 +2728,6 @@
\prg_new_eq_conditional:NNn \tl_if_exist:N \cs_if_exist:N { TF , T , F , p }
\prg_new_eq_conditional:NNn \tl_if_exist:c \cs_if_exist:c { TF , T , F , p }
\tl_const:Nn \c_empty_tl { }
-\tl_const:Nx \c_job_name_tl { \tex_jobname:D }
\tl_const:Nn \c_space_tl { ~ }
\cs_new_protected:Npn \tl_set:Nn #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:n {#2} } }
@@ -2905,7 +2903,7 @@
{ \use_ii:nn }
{
\char_set_lccode:nn { 0 } { \tex_newlinechar:D }
- \tl_to_lowercase:n { \__tl_set_rescan:NnTF ^^@ } {#1}
+ \tex_lowercase:D { \__tl_set_rescan:NnTF ^^@ } {#1}
}
{ \__tl_set_rescan_multi:n }
{ \__tl_set_rescan_single:nn { ' } }
@@ -2922,7 +2920,7 @@
\int_compare:nNnTF { `#1 } < { `\~ }
{
\char_set_lccode:nn { 0 } { `#1 + 1 }
- \tl_to_lowercase:n { \__tl_set_rescan_single:nn { ^^@ } }
+ \tex_lowercase:D { \__tl_set_rescan_single:nn { ^^@ } }
}
{ \__tl_set_rescan_single_aux:nn { } }
}
@@ -3176,7 +3174,7 @@
\cs_generate_variant:Nn \tl_case:NnF { c }
\cs_generate_variant:Nn \tl_case:NnTF { c }
\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
- { \c_zero #1 #4 }
+ { \exp_end: #1 #4 }
\cs_new_eq:NN \__tl_case_end:nw \__prg_case_end:nw
\cs_new:Npn \tl_map_function:nN #1#2
{
@@ -3564,7 +3562,7 @@
\tl_new:N \g_tmpb_tl
\tl_new:N \l_tmpa_tl
\tl_new:N \l_tmpb_tl
-%% File: l3str.dtx Copyright (C) 2014-2015 The LaTeX3 Project
+%% File: l3str.dtx Copyright (C) 2011-2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -3596,23 +3594,56 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3str.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3str.dtx 6021 2015-09-20 15:10:27Z joseph $
{L3 Strings}
-\cs_new:Npn \str_head:n #1
- {
- \exp_after:wN \__str_head:w
- \tl_to_str:n {#1}
- { { } } ~ \q_stop
- }
-\cs_new:Npn \__str_head:w #1 ~ %
- { \tl_head:w #1 { ~ } }
-\cs_new:Npn \str_tail:n #1
- {
- \exp_after:wN \__str_tail:w
- \reverse_if:N \if_charcode:w
- \scan_stop: \tl_to_str:n {#1} X X \q_stop
- }
-\cs_new:Npn \__str_tail:w #1 X #2 \q_stop { \fi: #1 }
+\group_begin:
+ \cs_set_protected:Npn \__str_tmp:n #1
+ {
+ \tl_if_blank:nF {#1}
+ {
+ \cs_new_eq:cc { str_ #1 :N } { tl_ #1 :N }
+ \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :N } { c }
+ \__str_tmp:n
+ }
+ }
+ \__str_tmp:n
+ { new }
+ { use }
+ { clear }
+ { gclear }
+ { clear_new }
+ { gclear_new }
+ { }
+\group_end:
+\cs_new_eq:NN \str_set_eq:NN \tl_set_eq:NN
+\cs_new_eq:NN \str_gset_eq:NN \tl_gset_eq:NN
+\cs_generate_variant:Nn \str_set_eq:NN { c , Nc , cc }
+\cs_generate_variant:Nn \str_gset_eq:NN { c , Nc , cc }
+\group_begin:
+ \cs_set_protected:Npn \__str_tmp:n #1
+ {
+ \tl_if_blank:nF {#1}
+ {
+ \cs_new_protected:cpx { str_ #1 :Nn } ##1##2
+ { \exp_not:c { tl_ #1 :Nx } ##1 { \exp_not:N \tl_to_str:n {##2} } }
+ \exp_args:Nc \cs_generate_variant:Nn { str_ #1 :Nn } { Nx , cn , cx }
+ \__str_tmp:n
+ }
+ }
+ \__str_tmp:n
+ { set }
+ { gset }
+ { const }
+ { put_left }
+ { gput_left }
+ { put_right }
+ { gput_right }
+ { }
+\group_end:
+\prg_new_eq_conditional:NNn \str_if_exist:N \tl_if_exist:N { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_exist:c \tl_if_exist:c { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_empty:N \tl_if_empty:N { p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_empty:c \tl_if_empty:c { p , T , F , TF }
\cs_new:Npn \__str_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} }
\cs_if_exist:NT \luatex_luatexversion:D
{
@@ -3663,6 +3694,15 @@
\if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero
\prg_return_true: \else: \prg_return_false: \fi:
}
+\prg_new_conditional:Npnn \str_if_eq:NN #1#2 { p , TF , T , F }
+ {
+ \if_int_compare:w \__str_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 }
+ = \c_zero \prg_return_true: \else: \prg_return_false: \fi:
+ }
+\cs_generate_variant:Nn \str_if_eq:NNT { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq:NNF { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq:NNTF { c , Nc , cc }
+\cs_generate_variant:Nn \str_if_eq_p:NN { c , Nc , cc }
\cs_new:Npn \str_case:nn #1#2
{
\exp:w
@@ -3724,6 +3764,251 @@
{ \__str_case_x:nw {#1} }
}
\cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw
+\cs_new:Npn \__str_to_other:n #1
+ {
+ \exp_after:wN \__str_to_other_loop:w
+ \tl_to_str:n {#1} ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ A ~ \q_mark \q_stop
+ }
+\group_begin:
+\tex_lccode:D `\* = `\ %
+\tex_lccode:D `\A = `\A
+\tex_lowercase:D
+ {
+ \group_end:
+ \cs_new:Npn \__str_to_other_loop:w
+ #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 ~ #7 ~ #8 ~ #9 \q_stop
+ {
+ \if_meaning:w A #8
+ \__str_to_other_end:w
+ \fi:
+ \__str_to_other_loop:w
+ #9 #1 * #2 * #3 * #4 * #5 * #6 * #7 * #8 * \q_stop
+ }
+ \cs_new:Npn \__str_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop
+ { \fi: #2 }
+ }
+\cs_new_nopar:Npn \str_item:Nn { \exp_args:No \str_item:nn }
+\cs_generate_variant:Nn \str_item:Nn { c }
+\cs_new:Npn \str_item:nn #1#2
+ {
+ \exp_args:Nf \tl_to_str:n
+ {
+ \exp_args:Nf \__str_item:nn
+ { \__str_to_other:n {#1} } {#2}
+ }
+ }
+\cs_new:Npn \str_item_ignore_spaces:nn #1
+ { \exp_args:No \__str_item:nn { \tl_to_str:n {#1} } }
+\cs_new:Npn \__str_item:nn #1#2
+ {
+ \exp_after:wN \__str_item:w
+ \int_use:N \__int_eval:w #2 \exp_after:wN ;
+ \__int_value:w \__str_count:n {#1} ;
+ #1 \q_stop
+ }
+\cs_new:Npn \__str_item:w #1; #2;
+ {
+ \int_compare:nNnTF {#1} < \c_zero
+ {
+ \int_compare:nNnTF {#1} < {-#2}
+ { \use_none_delimit_by_q_stop:w }
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \exp:w \exp_after:wN \__str_skip_exp_end:w
+ \int_use:N \__int_eval:w #1 + #2 ;
+ }
+ }
+ {
+ \int_compare:nNnTF {#1} > {#2}
+ { \use_none_delimit_by_q_stop:w }
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \exp:w \__str_skip_exp_end:w #1 ; { }
+ }
+ }
+ }
+\cs_new:Npn \__str_skip_exp_end:w #1;
+ {
+ \if_int_compare:w #1 > \c_eight
+ \exp_after:wN \__str_skip_loop:wNNNNNNNN
+ \else:
+ \exp_after:wN \__str_skip_end:w
+ \int_use:N \__int_eval:w
+ \fi:
+ #1 ;
+ }
+\cs_new:Npn \__str_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
+ { \exp_after:wN \__str_skip_exp_end:w \int_use:N \__int_eval:w #1 - \c_eight ; }
+\cs_new:Npn \__str_skip_end:w #1 ;
+ {
+ \exp_after:wN \__str_skip_end:NNNNNNNN
+ \if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or:
+ }
+\cs_new:Npn \__str_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: }
+\cs_new_nopar:Npn \str_range:Nnn { \exp_args:No \str_range:nnn }
+\cs_generate_variant:Nn \str_range:Nnn { c }
+\cs_new:Npn \str_range:nnn #1#2#3
+ {
+ \exp_args:Nf \tl_to_str:n
+ {
+ \exp_args:Nf \__str_range:nnn
+ { \__str_to_other:n {#1} } {#2} {#3}
+ }
+ }
+\cs_new:Npn \str_range_ignore_spaces:nnn #1
+ { \exp_args:No \__str_range:nnn { \tl_to_str:n {#1} } }
+\cs_new:Npn \__str_range:nnn #1#2#3
+ {
+ \exp_after:wN \__str_range:w
+ \__int_value:w \__str_count:n {#1} \exp_after:wN ;
+ \int_use:N \__int_eval:w #2 - \c_one \exp_after:wN ;
+ \int_use:N \__int_eval:w #3 ;
+ #1 \q_stop
+ }
+\cs_new:Npn \__str_range:w #1; #2; #3;
+ {
+ \exp_args:Nf \__str_range:nnw
+ { \__str_range_normalize:nn {#2} {#1} }
+ { \__str_range_normalize:nn {#3} {#1} }
+ }
+\cs_new:Npn \__str_range:nnw #1#2
+ {
+ \exp_after:wN \__str_collect_delimit_by_q_stop:w
+ \int_use:N \__int_eval:w #2 - #1 \exp_after:wN ;
+ \exp:w \__str_skip_exp_end:w #1 ;
+ }
+\cs_new:Npn \__str_range_normalize:nn #1#2
+ {
+ \int_eval:n
+ {
+ \if_int_compare:w #1 < \c_zero
+ \if_int_compare:w #1 < -#2 \exp_stop_f:
+ \c_zero
+ \else:
+ #1 + #2 + \c_one
+ \fi:
+ \else:
+ \if_int_compare:w #1 < #2 \exp_stop_f:
+ #1
+ \else:
+ #2
+ \fi:
+ \fi:
+ }
+ }
+\cs_new:Npn \__str_collect_delimit_by_q_stop:w #1;
+ { \__str_collect_loop:wn #1 ; { } }
+\cs_new:Npn \__str_collect_loop:wn #1 ;
+ {
+ \if_int_compare:w #1 > \c_seven
+ \exp_after:wN \__str_collect_loop:wnNNNNNNN
+ \else:
+ \exp_after:wN \__str_collect_end:wn
+ \fi:
+ #1 ;
+ }
+\cs_new:Npn \__str_collect_loop:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9
+ {
+ \exp_after:wN \__str_collect_loop:wn
+ \int_use:N \__int_eval:w #1 - \c_seven ;
+ { #2 #3#4#5#6#7#8#9 }
+ }
+\cs_new:Npn \__str_collect_end:wn #1 ;
+ {
+ \exp_after:wN \__str_collect_end:nnnnnnnnw
+ \if_case:w \if_int_compare:w #1 > \c_zero #1 \else: 0 \fi: \exp_stop_f:
+ \or: \or: \or: \or: \or: \or: \fi:
+ }
+\cs_new:Npn \__str_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop
+ { #1#2#3#4#5#6#7#8 }
+\cs_new_nopar:Npn \str_count_spaces:N
+ { \exp_args:No \str_count_spaces:n }
+\cs_generate_variant:Nn \str_count_spaces:N { c }
+\cs_new:Npn \str_count_spaces:n #1
+ {
+ \int_eval:n
+ {
+ \exp_after:wN \__str_count_spaces_loop:w
+ \tl_to_str:n {#1} ~
+ X 7 ~ X 6 ~ X 5 ~ X 4 ~ X 3 ~ X 2 ~ X 1 ~ X 0 ~ X -1 ~
+ \q_stop
+ }
+ }
+\cs_new:Npn \__str_count_spaces_loop:w #1~#2~#3~#4~#5~#6~#7~#8~#9~
+ {
+ \if_meaning:w X #9
+ \use_i_delimit_by_q_stop:nw
+ \fi:
+ \c_nine + \__str_count_spaces_loop:w
+ }
+\cs_new_nopar:Npn \str_count:N { \exp_args:No \str_count:n }
+\cs_generate_variant:Nn \str_count:N { c }
+\cs_new:Npn \str_count:n #1
+ {
+ \__str_count_aux:n
+ {
+ \str_count_spaces:n {#1}
+ + \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1}
+ }
+ }
+\cs_new:Npn \__str_count:n #1
+ {
+ \__str_count_aux:n
+ { \__str_count_loop:NNNNNNNNN #1 }
+ }
+\cs_new:Npn \str_count_ignore_spaces:n #1
+ {
+ \__str_count_aux:n
+ { \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1} }
+ }
+\cs_new:Npn \__str_count_aux:n #1
+ {
+ \int_eval:n
+ {
+ #1
+ { X \c_eight } { X \c_seven } { X \c_six }
+ { X \c_five } { X \c_four } { X \c_three }
+ { X \c_two } { X \c_one } { X \c_zero }
+ \q_stop
+ }
+ }
+\cs_new:Npn \__str_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
+ {
+ \if_meaning:w X #9
+ \exp_after:wN \use_none_delimit_by_q_stop:w
+ \fi:
+ \c_nine + \__str_count_loop:NNNNNNNNN
+ }
+\cs_new_nopar:Npn \str_head:N { \exp_args:No \str_head:n }
+\cs_generate_variant:Nn \str_head:N { c }
+\cs_set:Npn \str_head:n #1
+ {
+ \exp_after:wN \__str_head:w
+ \tl_to_str:n {#1}
+ { { } } ~ \q_stop
+ }
+\cs_set:Npn \__str_head:w #1 ~ %
+ { \use_i_delimit_by_q_stop:nw #1 { ~ } }
+\cs_new:Npn \str_head_ignore_spaces:n #1
+ {
+ \exp_after:wN \use_i_delimit_by_q_stop:nw
+ \tl_to_str:n {#1} { } \q_stop
+ }
+\cs_new_nopar:Npn \str_tail:N { \exp_args:No \str_tail:n }
+\cs_generate_variant:Nn \str_tail:N { c }
+\cs_set:Npn \str_tail:n #1
+ {
+ \exp_after:wN \__str_tail_auxi:w
+ \reverse_if:N \if_charcode:w
+ \scan_stop: \tl_to_str:n {#1} X X \q_stop
+ }
+\cs_set:Npn \__str_tail_auxi:w #1 X #2 \q_stop { \fi: #1 }
+\cs_new:Npn \str_tail_ignore_spaces:n #1
+ {
+ \exp_after:wN \__str_tail_auxii:w
+ \tl_to_str:n {#1} \q_mark \q_mark \q_stop
+ }
+\cs_new:Npn \__str_tail_auxii:w #1 #2 \q_mark #3 \q_stop { #2 }
\cs_new:Npn \str_fold_case:n #1 { \__str_change_case:nn {#1} { fold } }
\cs_new:Npn \str_lower_case:n #1 { \__str_change_case:nn {#1} { lower } }
\cs_new:Npn \str_upper_case:n #1 { \__str_change_case:nn {#1} { upper } }
@@ -3768,6 +4053,25 @@
{ c__unicode_ #9 _ #6 _X_ #7 _tl }
{ #8 }
}
+\str_const:Nx \c_ampersand_str { \cs_to_str:N \& }
+\str_const:Nx \c_atsign_str { \cs_to_str:N \@ }
+\str_const:Nx \c_backslash_str { \cs_to_str:N \\ }
+\str_const:Nx \c_left_brace_str { \cs_to_str:N \{ }
+\str_const:Nx \c_right_brace_str { \cs_to_str:N \} }
+\str_const:Nx \c_circumflex_str { \cs_to_str:N \^ }
+\str_const:Nx \c_colon_str { \cs_to_str:N \: }
+\str_const:Nx \c_dollar_str { \cs_to_str:N \$ }
+\str_const:Nx \c_hash_str { \cs_to_str:N \# }
+\str_const:Nx \c_percent_str { \cs_to_str:N \% }
+\str_const:Nx \c_tilde_str { \cs_to_str:N \~ }
+\str_const:Nx \c_underscore_str { \cs_to_str:N \_ }
+\str_new:N \l_tmpa_str
+\str_new:N \l_tmpb_str
+\str_new:N \g_tmpa_str
+\str_new:N \g_tmpb_str
+\cs_new_eq:NN \str_show:n \tl_show:n
+\cs_new_eq:NN \str_show:N \tl_show:N
+\cs_generate_variant:Nn \str_show:N { c }
%% File: l3seq.dtx Copyright (C) 1990-2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -4361,7 +4665,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3int.dtx 5987 2015-09-11 05:44:48Z joseph $
+\GetIdInfo$Id: l3int.dtx 6089 2015-09-25 13:29:50Z mittelba $
{L3 Integers}
\cs_new_eq:NN \__int_value:w \tex_number:D
\cs_new_eq:NN \__int_eval:w \etex_numexpr:D
@@ -4465,8 +4769,7 @@
\cs_if_exist:NT \luatex_luatexversion:D { 1 }
\cs_if_exist:NT \uptex_disablecjktoken:D
{ \if_int_compare:w \ptex_jis:D "2121 = "3000 ~ 1 \fi: }
- \cs_if_exist:NT \xetex_XeTeXversion:D { 1 }
- ~
+ \cs_if_exist:NT \xetex_XeTeXversion:D { 1 } ~
\cs_if_exist:NTF \uptex_disablecjktoken:D
{ \cs_new_eq:NN \__int_constdef:Nw \uptex_kchardef:D }
{ \cs_new_eq:NN \__int_constdef:Nw \tex_chardef:D }
@@ -4525,7 +4828,7 @@
\cs_generate_variant:Nn \int_set:Nn { c }
\cs_generate_variant:Nn \int_gset:Nn { c }
\cs_new_eq:NN \int_use:N \tex_the:D
-\cs_new:Npn \int_use:c #1 { \int_use:N \cs:w #1 \cs_end: }
+\cs_new:Npn \int_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
\cs_new_protected_nopar:Npn \__prg_compare_error:
{
\if_int_compare:w \c_zero \c_zero \fi:
@@ -6228,7 +6531,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3token.dtx 5893 2015-08-26 16:16:52Z mittelba $
+\GetIdInfo$Id: l3token.dtx 6040 2015-09-23 12:41:32Z joseph $
{L3 Experimental token manipulation}
\group_begin:
\tex_catcode:D `@ = \c_eleven
@@ -6237,7 +6540,7 @@
{
\group_begin:
\char_set_lccode:nn { 0 } {#1}
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \__char_set_catcode:Nn ^^@ } {#2}
}
\tex_catcode:D \c_zero = \c_thirteen
@@ -6256,7 +6559,7 @@
{
\group_begin:
\char_set_lccode:nn { 0 } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\seq_if_in:NnF \l_char_active_seq { ^^@ }
@@ -6519,21 +6822,18 @@
\if_charcode:w \exp_not:N #1 \exp_not:N #2
\prg_return_true: \else: \prg_return_false: \fi:
}
-\group_begin:
-\char_set_catcode_other:N \M
-\char_set_catcode_other:N \A
-\char_set_lccode:nn { `\; } { `\: }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\F } { `\F }
-\tl_to_lowercase:n
+\use:x
{
- \group_end:
- \prg_new_conditional:Npnn \token_if_macro:N #1 { p , T , F , TF }
+ \prg_new_conditional:Npnn \exp_not:N \token_if_macro:N ##1
+ { p , T , F , TF }
{
- \exp_after:wN \__token_if_macro_p:w
- \token_to_meaning:N #1 MA; \q_stop
+ \exp_not:N \exp_after:wN \exp_not:N \__token_if_macro_p:w
+ \exp_not:N \token_to_meaning:N ##1 \tl_to_str:n { ma : }
+ \exp_not:N \q_stop
}
- \cs_new:Npn \__token_if_macro_p:w #1 MA #2 ; #3 \q_stop
+ \cs_new:Npn \exp_not:N \__token_if_macro_p:w
+ ##1 \tl_to_str:n { ma } ##2 \c_colon_str ##3 \exp_not:N \q_stop
+ }
{
\if_int_compare:w \__str_if_eq_x:nn { #2 } { cro } = \c_zero
\prg_return_true:
@@ -6541,7 +6841,6 @@
\prg_return_false:
\fi:
}
- }
\prg_new_conditional:Npnn \token_if_cs:N #1 { p , T , F , TF }
{
\if_catcode:w \exp_not:N #1 \scan_stop:
@@ -6567,7 +6866,7 @@
\char_set_lccode:nn { `Z } { `d }
\tl_map_inline:nn { A C E G H I K L M O P R S U X Y Z R " }
{ \char_set_catcode:nn { `#1 } \c_twelve }
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\group_end:
\prg_new_conditional:Npnn \token_if_chardef:N #1 { p , T , F , TF }
@@ -6721,30 +7020,32 @@
}
\cs_new:Npn \__token_if_long_macro:w #1 LOXG~MACRO #2 \q_stop { #1 ~ }
}
-\tex_chardef:D \c_token_A_int = `A ~ %
-\group_begin:
-\char_set_catcode_other:N \;
-\char_set_lccode:nn { `\; } { `\: }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\F } { `\F }
-\tl_to_lowercase:n {
- \group_end:
- \prg_new_conditional:Npnn \token_if_primitive:N #1 { p , T , F , TF }
- {
- \token_if_macro:NTF #1
- \prg_return_false:
- {
- \exp_after:wN \__token_if_primitive:NNw
- \token_to_meaning:N #1 ; ; ; \q_stop #1
- }
- }
- \cs_new:Npn \__token_if_primitive:NNw #1#2 #3 ; #4 \q_stop
- {
- \tl_if_empty:oTF { \__token_if_primitive_space:w #3 ~ }
- { \__token_if_primitive_loop:N #3 ; \q_stop }
- { \__token_if_primitive_nullfont:N }
- }
-}
+\tex_chardef:D \c__token_A_int = `A ~ %
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \token_if_primitive:N ##1
+ { p , T , F , TF }
+ {
+ \exp_not:N \token_if_macro:NTF ##1
+ \exp_not:N \prg_return_false:
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \__token_if_primitive:NNw
+ \exp_not:N \token_to_meaning:N ##1
+ \tl_to_str:n { : : : } \exp_not:N \q_stop ##1
+ }
+ }
+ \cs_new:Npn \exp_not:N \__token_if_primitive:NNw
+ ##1##2 ##3 \c_colon_str ##4 \exp_not:N \q_stop
+ {
+ \exp_not:N \tl_if_empty:oTF
+ { \exp_not:N \__token_if_primitive_space:w ##3 ~ }
+ {
+ \exp_not:N \__token_if_primitive_loop:N ##3
+ \c_colon_str \exp_not:N \q_stop
+ }
+ { \exp_not:N \__token_if_primitive_nullfont:N }
+ }
+ }
\cs_new:Npn \__token_if_primitive_space:w #1 ~ { }
\cs_new:Npn \__token_if_primitive_nullfont:N #1
{
@@ -6756,7 +7057,7 @@
}
\cs_new:Npn \__token_if_primitive_loop:N #1
{
- \if_int_compare:w `#1 < \c_token_A_int %
+ \if_int_compare:w `#1 < \c__token_A_int %
\exp_after:wN \__token_if_primitive:Nw
\exp_after:wN #1
\else:
@@ -7322,7 +7623,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3msg.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3msg.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Messages}
\tl_new:N \l__msg_internal_tl
\tl_const:Nn \c__msg_text_prefix_tl { msg~text~>~ }
@@ -7447,7 +7748,7 @@
\char_set_lccode:nn {`\}} {`\ }
\char_set_lccode:nn {`\&} {`\!}
\char_set_catcode_active:N \&
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\group_end:
\cs_new_protected:Npn \__msg_interrupt_text:n #1
@@ -7983,7 +8284,7 @@
\char_set_lccode:nn { `L } { `L }
\char_set_lccode:nn { `T } { `T }
\char_set_lccode:nn { `X } { `X }
-\tl_to_lowercase:n
+\tex_lowercase:D
{
\cs_new:Npx \__msg_expandable_error:n #1
{
@@ -8141,7 +8442,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3file.dtx 5786 2015-08-05 16:18:39Z bruno $
+\GetIdInfo$Id: l3file.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 File and I/O operations}
\tl_new:N \g_file_current_name_tl
\cs_if_exist:NT \@currname
@@ -8523,7 +8824,7 @@
\group_begin:
\char_set_catcode_other:N \*
\char_set_lccode:nn {`\*} {`\ }
- \tl_to_lowercase:n { \tl_const:Nn \c_catcode_other_space_tl { * } }
+ \tex_lowercase:D { \tl_const:Nn \c_catcode_other_space_tl { * } }
\group_end:
\group_begin:
\int_set_eq:NN \tex_escapechar:D \c_minus_one
@@ -8611,7 +8912,7 @@
\cs_new_protected_nopar:Npn \__iow_wrap_word:
{
\int_set:Nn \l__iow_current_word_int
- { \__str_count_ignore_spaces:N \l__iow_current_word_tl }
+ { \exp_args:No \str_count_ignore_spaces:n \l__iow_current_word_tl }
\int_add:Nn \l__iow_current_line_int { \l__iow_current_word_int }
\int_compare:nNnTF \l__iow_current_line_int < \l__iow_target_count_int
{ \__iow_wrap_word_fits: }
@@ -8681,25 +8982,6 @@
{ \l__iow_current_line_tl }
\use_none_delimit_by_q_stop:w
}
-\cs_new_nopar:Npn \__str_count_ignore_spaces:N
- { \exp_args:No \__str_count_ignore_spaces:n }
-\cs_new:Npn \__str_count_ignore_spaces:n #1
- {
- \__int_value:w \__int_eval:w
- \exp_after:wN \__str_count_loop:NNNNNNNNN \tl_to_str:n {#1}
- { X8 } { X7 } { X6 } { X5 } { X4 } { X3 } { X2 } { X1 } { X0 }
- \q_stop
- \__int_eval_end:
- }
-\cs_new:Npn \__str_count_loop:NNNNNNNNN #1#2#3#4#5#6#7#8#9
- {
- \if_catcode:w X #9
- \exp_after:wN \use_none_delimit_by_q_stop:w
- \else:
- 9 +
- \exp_after:wN \__str_count_loop:NNNNNNNNN
- \fi:
- }
\__msg_kernel_new:nnnn { kernel } { file-not-found }
{ File~'#1'~not~found. }
{
@@ -8760,7 +9042,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3skip.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3skip.dtx 6089 2015-09-25 13:29:50Z mittelba $
{L3 Dimensions and skips}
\cs_new_eq:NN \if_dim:w \tex_ifdim:D
\cs_new_eq:NN \__dim_eval:w \etex_dimexpr:D
@@ -8976,7 +9258,7 @@
\cs_new:Npn \dim_eval:n #1
{ \dim_use:N \__dim_eval:w #1 \__dim_eval_end: }
\cs_new_eq:NN \dim_use:N \tex_the:D
-\cs_generate_variant:Nn \dim_use:N { c }
+\cs_new:Npn \dim_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
\cs_new:Npn \dim_to_decimal:n #1
{
\exp_after:wN
@@ -9085,7 +9367,7 @@
\cs_new:Npn \skip_eval:n #1
{ \skip_use:N \etex_glueexpr:D #1 \scan_stop: }
\cs_new_eq:NN \skip_use:N \tex_the:D
-\cs_generate_variant:Nn \skip_use:N { c }
+\cs_new:Npn \skip_use:c #1 { \tex_the:D \cs:w #1 \cs_end: }
\cs_new_eq:NN \skip_horizontal:N \tex_hskip:D
\cs_new:Npn \skip_horizontal:n #1
{ \skip_horizontal:N \etex_glueexpr:D #1 \scan_stop: }
@@ -9200,7 +9482,7 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3keys.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3keys.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Key-value interfaces}
\int_new:N \g__keyval_level_int
\tl_new:N \l__keyval_key_tl
@@ -9210,24 +9492,24 @@
\group_begin:
\char_set_catcode_active:n { `\= }
\char_set_catcode_active:n { `\, }
- \char_set_lccode:nn { `\8 } { `\= }
- \char_set_lccode:nn { `\9 } { `\, }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new_protected:Npn \__keyval_parse:n #1
- {
- \group_begin:
- \tl_set:Nn \l__keyval_sanitise_tl {#1}
- \tl_replace_all:Nnn \l__keyval_sanitise_tl { = } { 8 }
- \tl_replace_all:Nnn \l__keyval_sanitise_tl { , } { 9 }
- \tl_clear:N \l__keyval_parse_tl
- \exp_after:wN \__keyval_parse_elt:w \exp_after:wN
- \q_nil \l__keyval_sanitise_tl 9 \q_recursion_tail 9 \q_recursion_stop
- \exp_after:wN \group_end:
- \l__keyval_parse_tl
- }
- }
+ \cs_new_protected:Npx \__keyval_parse:n #1
+ {
+ \group_begin:
+ \tl_set:Nn \exp_not:N \l__keyval_sanitise_tl {#1}
+ \tl_replace_all:Nnn \exp_not:N \l__keyval_sanitise_tl
+ { \exp_not:N = } { \token_to_str:N = }
+ \tl_replace_all:Nnn \exp_not:N \l__keyval_sanitise_tl
+ { \exp_not:N , } { \token_to_str:N , }
+ \tl_clear:N \exp_not:N \l__keyval_parse_tl
+ \exp_not:N \exp_after:wN
+ \exp_not:N \__keyval_parse_elt:w \exp_not:N \exp_after:wN
+ \exp_not:N \q_nil \exp_not:N \l__keyval_sanitise_tl
+ \token_to_str:N , \exp_not:N \q_recursion_tail
+ \token_to_str:N , \exp_not:N \q_recursion_stop
+ \exp_not:N \exp_after:wN \group_end:
+ \exp_not:N \l__keyval_parse_tl
+ }
+\group_end:
\cs_new_protected:Npn \__keyval_parse_elt:w #1 ,
{
\tl_if_blank:oF { \use_none:n #1 }
@@ -10911,20 +11193,17 @@
\cs_new:Npn \__fp_parse_expand:w #1 { \exp_end_continue_f:w #1 }
\cs_new:Npn \__fp_parse_return_semicolon:w
#1 \fi: \__fp_parse_expand:w { \fi: ; #1 }
-\group_begin:
-\char_set_catcode_other:N \S
-\char_set_catcode_other:N \F
-\char_set_catcode_other:N \P
-\char_set_lccode:nn { `\- } { `\_ }
-\tl_to_lowercase:n
+\cs_new:Npx \__fp_type_from_scan:N #1
{
- \group_end:
- \cs_new:Npn \__fp_type_from_scan:N #1
- {
- \exp_after:wN \__fp_type_from_scan:w
- \token_to_str:N #1 \q_mark S--FP-? \q_mark \q_stop
- }
- \cs_new:Npn \__fp_type_from_scan:w #1 S--FP #2 \q_mark #3 \q_stop {#2}
+ \exp_not:N \exp_after:wN \exp_not:N \__fp_type_from_scan:w
+ \exp_not:N \token_to_str:N #1 \exp_not:N \q_mark
+ \tl_to_str:n { s__fp _? } \exp_not:N \q_mark \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \__fp_type_from_scan:w
+ ##1 \tl_to_str:n { s__fp } ##2 \exp_not:N \q_mark ##3 \exp_not:N \q_stop
+ {##2}
}
\cs_set_protected:Npn \__fp_tmp:w #1 #2 #3
{
@@ -11016,28 +11295,27 @@
\exp_after:wN \__fp_parse_exponent:N
\exp:w \__fp_parse_expand:w
}
-\group_begin:
-\char_set_catcode_other:N \P
-\char_set_catcode_other:N \T
-\char_set_catcode_other:N \M
-\char_set_catcode_other:N \U
-\tl_to_lowercase:n
+\cs_new:Npx \__fp_parse_one_register_aux:Nw #1
{
- \group_end:
- \cs_new:Npn \__fp_parse_one_register_aux:Nw #1
+ \exp_not:n
{
\exp_after:wN \use:nn
\exp_after:wN \__fp_parse_one_register_auxii:wwwNw
- \exp_after:wN { \tex_the:D #1 }
- ; \__fp_parse_one_register_dim:ww
- PT ; \__fp_parse_one_register_mu:www
- . PT ; \__fp_parse_one_register_int:www
- \q_stop
}
- \cs_new:Npn \__fp_parse_one_register_auxii:wwwNw
- #1 . #2 PT #3 ; #4#5 \q_stop { #4 #1.#2; }
- \cs_new:Npn \__fp_parse_one_register_mu:www #1 MU; #2;
- { \__fp_parse_one_register_dim:ww #1; }
+ \exp_not:N \exp_after:wN { \exp_not:N \tex_the:D #1 }
+ ; \exp_not:N \__fp_parse_one_register_dim:ww
+ \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_mu:www
+ . \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_int:www
+ \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \__fp_parse_one_register_auxii:wwwNw
+ ##1 . ##2 \tl_to_str:n { pt } ##3 ; ##4##5 \exp_not:N \q_stop
+ { ##4 ##1.##2; }
+ \cs_new:Npn \exp_not:N \__fp_parse_one_register_mu:www
+ ##1 \tl_to_str:n { mu } ; ##2 ;
+ { \exp_not:N \__fp_parse_one_register_dim:ww ##1 ; }
}
\cs_new:Npn \__fp_parse_one_register_int:www #1; #2.; #3;
{ \__fp_parse:n { #1 e #3 } }
@@ -16745,7 +17023,7 @@
%%
%% -----------------------------------------------------------------------
%%
-\GetIdInfo$Id: l3candidates.dtx 6002 2015-09-11 22:13:30Z joseph $
+\GetIdInfo$Id: l3candidates.dtx 6039 2015-09-23 12:41:26Z joseph $
{L3 Experimental additions to l3kernel}
\cs_new_protected_nopar:Npn \cs_log:N
{ \__msg_log_next: \cs_show:N }
@@ -17621,56 +17899,6 @@
\cs_new:Npn \__tl_act_count_space:n #1 { 1 + }
\cs_new:Npn \__tl_act_count_group:nn #1 #2
{ 2 + \tl_count_tokens:n {#2} + }
-\tl_const:Nn \c__tl_act_uppercase_tl
- {
- aA bB cC dD eE fF gG hH iI jJ kK lL mM
- nN oO pP qQ rR sS tT uU vV wW xX yY zZ
- }
-\tl_const:Nn \c__tl_act_lowercase_tl
- {
- Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm
- Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz
- }
-\cs_new:Npn \tl_expandable_uppercase:n #1
- {
- \etex_unexpanded:D \exp_after:wN
- {
- \exp:w
- \__tl_act_case_aux:nn { \c__tl_act_uppercase_tl } {#1}
- }
- }
-\cs_new:Npn \tl_expandable_lowercase:n #1
- {
- \etex_unexpanded:D \exp_after:wN
- {
- \exp:w
- \__tl_act_case_aux:nn { \c__tl_act_lowercase_tl } {#1}
- }
- }
-\cs_new:Npn \__tl_act_case_aux:nn
- {
- \__tl_act:NNNnn
- \__tl_act_case_normal:nN
- \__tl_act_case_group:nn
- \__tl_act_case_space:n
- }
-\cs_new:Npn \__tl_act_case_space:n #1 { \__tl_act_output:n {~} }
-\cs_new:Npn \__tl_act_case_normal:nN #1 #2
- {
- \exp_args:Nf \__tl_act_output:n
- {
- \exp_args:NNo \str_case:nnF #2 {#1}
- { \exp_stop_f: #2 }
- }
- }
-\cs_new:Npn \__tl_act_case_group:nn #1 #2
- {
- \exp_after:wN \__tl_act_output:n \exp_after:wN
- {
- \exp_after:wN
- { \exp:w \__tl_act_case_aux:nn {#1} {#2} }
- }
- }
\cs_new_protected_nopar:Npn \tl_set_from_file:Nnn
{ \__tl_set_from_file:NNnn \tl_set:Nn }
\cs_new_protected_nopar:Npn \tl_gset_from_file:Nnn
@@ -18766,12 +18994,7 @@
\__msg_kernel_new:nnn { kernel } { char-space }
{ Cannot~generate~space~chars. }
\group_begin:
- \char_set_catcode_other:N \O
- \char_set_catcode_other:N \U
- \char_set_catcode_other:N \T
- \char_set_catcode_other:N \E
- \char_set_catcode_other:N \R
- \tl_to_lowercase:n
+ \cs_set_protected:Npn \__peek_tmp:w #1 \q_stop
{
\cs_new_protected_nopar:Npn \__peek_execute_branches_N_type:
{
@@ -18783,16 +19006,17 @@
\exp_after:wN \__peek_N_type:w
\token_to_meaning:N \l_peek_token
\q_mark \__peek_N_type_aux:nnw
- OUTER \q_mark \use_none_delimit_by_q_stop:w
+ #1 \q_mark \use_none_delimit_by_q_stop:w
\q_stop
\exp_after:wN \__peek_true:w
\else:
\exp_after:wN \__peek_false:w
\fi:
}
- \cs_new_protected:Npn \__peek_N_type:w #1 OUTER #2 \q_mark #3
- { #3 {#1} {#2} }
+ \cs_new_protected:Npn \__peek_N_type:w ##1 #1 ##2 \q_mark ##3
+ { ##3 {##1} {##2} }
}
+ \exp_after:wN \__peek_tmp:w \tl_to_str:n { outer } \q_stop
\group_end:
\cs_new_protected:Npn \__peek_N_type_aux:nnw #1 #2 #3 \fi:
{
@@ -18807,12 +19031,6 @@
{ \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: }
\cs_new_protected_nopar:Npn \peek_N_type:F
{ \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: }
-\cs_new_protected:Npn \fp_set_from_dim:Nn #1#2
- { \fp_set:Nn #1 { \dim_to_fp:n {#2} } }
-\cs_new_protected:Npn \fp_gset_from_dim:Nn #1#2
- { \fp_gset:Nn #1 { \dim_to_fp:n {#2} } }
-\cs_generate_variant:Nn \fp_set_from_dim:Nn { c }
-\cs_generate_variant:Nn \fp_gset_from_dim:Nn { c }
%% File: l3sys.dtx Copyright (C) 2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -18845,8 +19063,16 @@
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id$
+\GetIdInfo$Id: l3sys.dtx 6087 2015-09-25 10:29:53Z joseph $
{L3 Experimental system/runtime functions}
+\str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
+\int_const:Nn \c_sys_minute_int
+ { \int_mod:nn { \tex_time:D } { 60 } }
+\int_const:Nn \c_sys_hour_int
+ { \int_div_truncate:nn { \tex_time:D } { 60 } }
+\int_const:Nn \c_sys_day_int { \tex_day:D }
+\int_const:Nn \c_sys_month_int { \tex_month:D }
+\int_const:Nn \c_sys_year_int { \tex_year:D }
\clist_map_inline:nn { lua , pdf , p , up , xe }
{
\cs_new_eq:cN { sys_if_engine_ #1 tex:T } \use_none:n
@@ -18860,6 +19086,7 @@
\cs_gset_eq:NN \sys_if_engine_luatex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_luatex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_luatex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { luatex }
}
\cs_if_exist:NT \pdftex_pdftexversion:D
{
@@ -18867,6 +19094,7 @@
\cs_gset_eq:NN \sys_if_engine_pdftex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_pdftex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_pdftex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { pdftex }
}
\cs_if_exist:NT \ptex_kanjiskip:D
{
@@ -18880,12 +19108,14 @@
\cs_gset_eq:NN \sys_if_engine_uptex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_uptex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_uptex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { uptex }
}
{
\cs_gset_eq:NN \sys_if_engine_ptex:T \use:n
\cs_gset_eq:NN \sys_if_engine_ptex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_ptex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_ptex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { ptex }
}
}
\cs_if_exist:NT \xetex_XeTeXversion:D
@@ -18894,6 +19124,34 @@
\cs_gset_eq:NN \sys_if_engine_xetex:F \use_none:n
\cs_gset_eq:NN \sys_if_engine_xetex:TF \use_i:nn
\cs_gset_eq:NN \sys_if_engine_xetex_p: \c_true_bool
+ \str_const:Nn \c_sys_engine_str { xetex }
+ }
+\bool_if:nTF
+ {
+ \cs_if_exist_p:N \pdftex_pdfoutput:D
+ && \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero
+ }
+ {
+ \cs_new_eq:NN \sys_if_output_dvi:T \use_none:n
+ \cs_new_eq:NN \sys_if_output_dvi:F \use:n
+ \cs_new_eq:NN \sys_if_output_dvi:TF \use_ii:nn
+ \cs_new_eq:NN \sys_if_output_dvi_p: \c_false_bool
+ \cs_new_eq:NN \sys_if_output_pdf:T \use:n
+ \cs_new_eq:NN \sys_if_output_pdf:F \use_none:n
+ \cs_new_eq:NN \sys_if_output_pdf:TF \use_i:nn
+ \cs_new_eq:NN \sys_if_output_pdf_p: \c_true_bool
+ \str_const:Nn \c_sys_output_str { pdf }
+ }
+ {
+ \cs_new_eq:NN \sys_if_output_dvi:T \use:n
+ \cs_new_eq:NN \sys_if_output_dvi:F \use_none:n
+ \cs_new_eq:NN \sys_if_output_dvi:TF \use_i:nn
+ \cs_new_eq:NN \sys_if_output_dvi_p: \c_true_bool
+ \cs_new_eq:NN \sys_if_output_pdf:T \use_none:n
+ \cs_new_eq:NN \sys_if_output_pdf:F \use:n
+ \cs_new_eq:NN \sys_if_output_pdf:TF \use_ii:nn
+ \cs_new_eq:NN \sys_if_output_pdf_p: \c_false_bool
+ \str_const:Nn \c_sys_output_str { dvi }
}
\prg_new_eq_conditional:NNn \luatex_if_engine: \sys_if_engine_luatex:
{ T , F , TF , p }
@@ -18916,6 +19174,7 @@
\cs_new_eq:NN \pdftex_if_engine:TF \use_i:nn
\cs_new_eq:NN \pdftex_if_engine_p: \c_true_bool
}
+\cs_set_eq:NN \c_job_name_tl \c_sys_jobname_str
%% File: l3luatex.dtx Copyright (C) 2010-2015 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
index b06f37d4c6d..8941b300707 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
@@ -47,8 +47,8 @@
%% -----------------------------------------------------------------------
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 programming layer}
-\def\ExplFileDate{2015/09/11}
-\def\ExplFileVersion{6002}
+\def\ExplFileDate{2015/09/27}
+\def\ExplFileVersion{6111}
\let\ExplLoaderFileVersion\ExplFileVersion
\begingroup
\def\tempa{LaTeX2e}
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
index acd8aaf809f..b0bdf9bc21c 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
@@ -47,8 +47,8 @@
%% -----------------------------------------------------------------------
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 programming layer}
-\def\ExplFileDate{2015/09/11}
-\def\ExplFileVersion{6002}
+\def\ExplFileDate{2015/09/27}
+\def\ExplFileVersion{6111}
\let\ExplLoaderFileVersion\ExplFileVersion
\ProvidesPackage{\ExplFileName}
[%
@@ -112,21 +112,6 @@
active~engine.~LaTeX3~will~use~the~'#2'~driver~instead.
}
\tl_new:N \l__expl_driver_tl
-\bool_if:nTF
- {
- \cs_if_exist_p:N \pdftex_pdfoutput:D
- && \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero
- }
- {
- \cs_new_eq:NN \__expl_if_pdf:T \use:n
- \cs_new_eq:NN \__expl_if_pdf:F \use_none:n
- \cs_new_eq:NN \__expl_if_pdf:TF \use_i:nn
- }
- {
- \cs_new_eq:NN \__expl_if_pdf:T \use_none:n
- \cs_new_eq:NN \__expl_if_pdf:F \use:n
- \cs_new_eq:NN \__expl_if_pdf:TF \use_ii:nn
- }
\keys_define:nn { expl }
{
driver .choice:,
@@ -137,7 +122,7 @@
\sys_if_engine_xetex:TF
{ xdvipdfmx }
{
- \__expl_if_pdf:TF
+ \sys_if_output_pdf:TF
{ pdfmode }
{
\bool_if:nTF
@@ -161,7 +146,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
}
{
- \__expl_if_pdf:T
+ \sys_if_output_pdf:T
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ dvipdfmx } { pdfmode }
@@ -179,7 +164,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
}
{
- \__expl_if_pdf:T
+ \sys_if_output_pdf:T
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ dvips } { pdfmode }
@@ -199,7 +184,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
}
{
- \__expl_if_pdf:F
+ \sys_if_output_pdf:F
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ pdfmode } { dvips }
@@ -212,7 +197,7 @@
\tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
\sys_if_engine_xetex:F
{
- \__expl_if_pdf:TF
+ \sys_if_output_pdf:TF
{
\__msg_kernel_error:nnnn { expl } { wrong-driver }
{ xdvipdfmx } { pdfmode }
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
index c06eb9cbee2..ed1d01cec9d 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
@@ -50,7 +50,7 @@
\let \fileversionOld \ExplFileVersion
\let \filedescriptionOld \ExplFileDescription
\RequirePackage{expl3,xparse,calc}
-\GetIdInfo$Id: l3doc.dtx 5983 2015-09-10 18:57:56Z joseph $
+\GetIdInfo$Id: l3doc.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Experimental documentation class}
\ProvidesExplClass
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -1416,7 +1416,7 @@
\char_set_lccode:nn { `\^^B } { `\\ }
\char_set_lccode:nn { `\^^L } { `\{ }
\char_set_lccode:nn { `\^^R } { `\} }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\cs_set_protected:Npn \xmacro@code
@@ -1461,7 +1461,7 @@
{ \g__codedoc_typeset_implementation_bool && \g__codedoc_checkfunc_bool }
{
\iow_term:x { \c__codedoc_iow_separator_tl \iow_newline: }
- \iow_open:Nn \g__codedoc_func_iow { \c_job_name_tl .cmds }
+ \iow_open:Nn \g__codedoc_func_iow { \c_sys_jobname_str .cmds }
\tl_clear:N \l__codedoc_doc_def_tl
\tl_clear:N \l__codedoc_doc_undef_tl
@@ -1600,7 +1600,7 @@
{
Generate~the~index~by~executing\\
\iow_indent:n
- { makeindex~-s~gind.ist~-o~\c_job_name_tl.ind~\c_job_name_tl.idx }
+ { makeindex~-s~gind.ist~-o~\c_sys_jobname_str.ind~\c_sys_jobname_str.idx }
}
\tl_gput_right:Nn \PrintIndex
{ \AtEndDocument { \msg_info:nn { l3doc } { print-index-howto } } }
@@ -1766,7 +1766,7 @@
{
Generate~the~change~list~by~executing\\
\iow_indent:n
- { makeindex~-s~gglo.ist~-o~\c_job_name_tl.gls~\c_job_name_tl.glo }
+ { makeindex~-s~gglo.ist~-o~\c_sys_jobname_str.gls~\c_sys_jobname_str.glo }
}
\tl_gput_right:Nn \PrintChanges
{ \AtEndDocument { \msg_info:nn { l3doc } { print-changes-howto } } }
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str.sty b/Master/texmf-dist/tex/latex/l3kernel/l3str.sty
new file mode 100644
index 00000000000..c14980cd4e7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3str.sty
@@ -0,0 +1,76 @@
+%%
+%% This is file `l3str.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% l3oldmodules.dtx (with options: `l3str,oldmodules')
+%%
+%% EXPERIMENTAL CODE
+%%
+%% Do not distribute this file without also distributing the
+%% source files specified above.
+%%
+%% Do not distribute a modified version of this file.
+%%
+%% File: l3oldmodules.dtx Copyright (C) 2014 The LaTeX3 Project
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in the file
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% The released version of this bundle is available from CTAN.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% The development version of the bundle can be found at
+%%
+%% http://www.latex-project.org/svnroot/experimental/trunk/
+%%
+%% for those people who are interested.
+%%
+%%%%%%%%%%%
+%% NOTE: %%
+%%%%%%%%%%%
+%%
+%% Snapshots taken from the repository represent work in progress and may
+%% not work or may contain conflicting material! We therefore ask
+%% people _not_ to put them into distributions, archives, etc. without
+%% prior consultation with the LaTeX3 Project.
+%%
+%% -----------------------------------------------------------------------
+\def\ExplFileDate{2014/09/06}
+
+\def\old@liii@module@name
+{l3str}
+\ProvidesPackage\old@liii@module@name
+ [%
+ \ExplFileDate\space v-no-info
+ Obsolete L3 package
+ ]
+\typeout{*****************************************************************}
+\typeout{** }
+\typeout{** Package \old@liii@module@name\space is obsolete and has been removed!}
+\typeout{** }
+\typeout{** Its functionality is now only provided as part of in the expl3 package}
+\typeout{** }
+\typeout{** After showing you an error message you can hit <return> we will continue}
+\typeout{** for now by loading expl3 for you. However, at some point in the future}
+\typeout{** the old packages will be removed.}
+\typeout{** }
+\typeout{** Therefore, please replace '\string\usepackage{\old@liii@module@name}'}
+\typeout{** with '\string\usepackage{expl3}' in your documents as soon as possible.}
+\typeout{** }
+\typeout{*******************************************************************}
+\PackageError\old@liii@module@name{This package is obsolete ---
+ use 'expl3' instead}\@ehc
+\RequirePackage{expl3}
+%%
+%%
+%% End of file `l3str.sty'.
diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
index 9dffe8d39d6..d53c1b29014 100644
--- a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
@@ -46,8 +46,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{l3keys2e}{Support package l3kernel too old}
@@ -59,7 +59,7 @@
}%
\endinput
}
-\GetIdInfo$Id: l3keys2e.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: l3keys2e.dtx 6111 2015-09-27 16:06:17Z joseph $
{LaTeX2e option processing using LaTeX3 keys}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
index 9c1441858b5..c16f725c5f8 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
@@ -50,8 +50,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{xparse}{Support package l3kernel too old}
@@ -63,19 +63,12 @@
}%
\endinput
}
-\GetIdInfo$Id: xparse.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: xparse.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental document command parser}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \tl_const:Nn \c__xparse_no_value_tl { QNoValue- }
- }
+\tl_const:Nx \c__xparse_no_value_tl
+ { \char_generate:nn { `\- } { 11 } NoValue- }
\prop_new:N \c__xparse_shorthands_prop
\prop_put:Nnn \c__xparse_shorthands_prop { o } { d[] }
\prop_put:Nnn \c__xparse_shorthands_prop { O } { D[] }
@@ -683,24 +676,20 @@
#3 \l__xparse_args_tl
}
}
- \group_begin:
- \token_if_eq_catcode:NNTF #1 ^
- {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \group_begin:
\char_set_lccode:nn { `A } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\l__xparse_fn_tl A
}
- }
- {
- \char_set_lccode:nn { `^ } { `#1 }
- \tl_to_lowercase:n
- {
- \group_end:
- \l__xparse_fn_tl ^
- }
- }
+ }
+ {
+ \exp_after:wN \l__xparse_fn_tl
+ \token_to_str:N #1
+ }
}
}
\tl_new:N \l__xparse_nesting_a_tl
@@ -1061,7 +1050,7 @@
\__xparse_add_arg:o \c__xparse_no_value_tl
\group_begin:
\char_set_lccode:nn { `\# } { \tex_endlinechar:D }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \peek_meaning_remove:NTF ## }
{
\__msg_kernel_error:nnxxx { xparse } { verbatim-newline }
@@ -1278,12 +1267,12 @@
\tl_set:Nn \l__xparse_split_list_tl {#2}
\group_begin:
\char_set_lccode:nn { `\@ } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
- \group_end:
- \tl_replace_all:Nnn \l__xparse_split_list_tl { @ } {#1}
- }
- \__xparse_split_list_multi:nV {#1} \l__xparse_split_list_tl
+ \group_end:
+ \tl_replace_all:Nnn \l__xparse_split_list_tl { @ }
+ } {#1}
+ \__xparse_split_list_multi:nV {#1} \l__xparse_split_list_tl
}
\group_end:
\cs_new_protected:Npn \__xparse_split_argument:nnn #1#2#3
@@ -1370,24 +1359,22 @@
{ \tl_to_str:n {#1} }
}
}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\F } { `\F }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \prg_new_conditional:Npnn \__xparse_if_no_value:n #1 { T , F , TF }
- {
- \str_if_eq:onTF
- { \__xparse_if_value_aux:w ? #1 { } QNoValue- }
- { ? { } QNoValue- }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- \cs_new:Npn \__xparse_if_value_aux:w #1 QNoValue- { #1 }
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \__xparse_if_no_value:n ##1
+ { T , F , TF }
+ {
+ \exp_not:N \str_if_eq:onTF
+ {
+ \exp_not:N \__xparse_if_value_aux:w ? ##1 { }
+ \c__xparse_no_value_tl
+ }
+ { ? { } \c__xparse_no_value_tl }
+ { \exp_not:N \prg_return_true: }
+ { \exp_not:N \prg_return_false: }
+ }
+ \cs_new:Npn \exp_not:N \__xparse_if_value_aux:w ##1 \c__xparse_no_value_tl
+ { ##1 }
}
\__msg_kernel_new:nnnn { xparse } { bad-arg-spec }
{ Bad~argument~specification~'#1'. }
diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
index c761e58bb88..2008933ab74 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
@@ -50,8 +50,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{xtemplate}{Support package l3kernel too old}
@@ -63,7 +63,7 @@
}%
\endinput
}
-\GetIdInfo$Id: xtemplate.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental prototype document functions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}