diff options
author | Karl Berry <karl@freefriends.org> | 2018-09-24 20:23:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-09-24 20:23:18 +0000 |
commit | a495fe970496337011c0698a03476ce888a26105 (patch) | |
tree | 592b35bc873870f28ec4883e3ba0fdd6a4d68119 /Master/texmf-dist | |
parent | 68966bb4bfd52e8d9d91b9fd5e6ff36d3d74a57e (diff) |
l3 (24sep18)
git-svn-id: svn://tug.org/texlive/trunk@48749 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
102 files changed, 1633 insertions, 530 deletions
diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md index 5b760755937..b6446a428af 100644 --- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md @@ -7,6 +7,15 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2018-09-23] + +## Changed + +- Entries in `scriptfiles` are excluded from `installfiles` +- Use a per-config directory for running tests +- Enable use of local `texmf.cnf` file in tests and documentation +- New `ctanreadme` variable + ## [2018-09-21] ### Changed @@ -159,7 +168,8 @@ this project uses date-based 'snapshot' version identifiers. - Rationalise short option names: removed `-d`, `-E`, `-r` - Target `cmdcheck`: specific to LaTeX3 kernel work -[Unreleased]: https://github.com/latex3/l3build/compare/2018-09-21...HEAD +[Unreleased]: https://github.com/latex3/l3build/compare/2018-09-23...HEAD +[2018-09-23]: https://github.com/latex3/l3build/compare/2018-09-21...2018-09-23 [2018-09-21]: https://github.com/latex3/l3build/compare/2018-08-07...2018-09-21 [2018-08-07]: https://github.com/latex3/l3build/compare/2018-08-04...2018-08-07 [2018-08-04]: https://github.com/latex3/l3build/compare/2018-08-02...2018-08-04 diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md index fcb8a9c471e..45a2278c961 100644 --- a/Master/texmf-dist/doc/latex/l3build/README.md +++ b/Master/texmf-dist/doc/latex/l3build/README.md @@ -1,7 +1,7 @@ l3build: a testing and building system for LaTeX3 ================================================= -Release 2018-09-21 +Release 2018-09-23 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf Binary files differindex 36dd4564708..0de4f839baf 100644 --- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf +++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md index d3441e2afd8..74cae992223 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3kernel/CHANGELOG.md @@ -7,6 +7,16 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2018-09-24] + +### Added +- Some driver-level support for PDF features +- `\peek_catcode_collect_inline:Nn`, `\peek_charcode_collect_inline:Nn`, + `\peek_meaning_collect_inline:Nn` + +### Fixed +- Handling of unknown keys when inheritance is active (fixes #481) + ## [2018-08-23] ### Added @@ -122,7 +132,8 @@ this project uses date-based 'snapshot' version identifiers. - Step functions have been added for dim variables, e.g. `\dim_step_inline:nnnn` -[Unreleased]: https://github.com/latex3/latex3/compare/2018-08-23...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2018-09-24...HEAD +[2018-09-24]: https://github.com/latex3/latex3/compare/2018-08-23...2018-09-24 [2018-08-23]: https://github.com/latex3/latex3/compare/2018-06-14...2018-08-23 [2018-06-14]: https://github.com/latex3/latex3/compare/2018-06-01...2018-06-14 [2018-06-01]: https://github.com/latex3/latex3/compare/2018-05-13...2018-06-01 diff --git a/Master/texmf-dist/doc/latex/l3kernel/README.md b/Master/texmf-dist/doc/latex/l3kernel/README.md index a12b92d0dd2..cffeac226da 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 ============================== -Release 2018-08-23 +Release 2018-09-24 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf Binary files differindex 6e4a52b0341..65f783650a1 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf Binary files differindex 6cfb021f727..3999dc41595 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex b/Master/texmf-dist/doc/latex/l3kernel/interface3.tex index 3fef7a4217c..78c842c30de 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/interface3.tex @@ -52,7 +52,7 @@ {latex-team@latex-project.org}% }% } -\date{Released 2018-08-23} +\date{Released 2018-09-24} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf Binary files differindex 8f30b7a38a1..6e3edeb6b72 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf Binary files differindex ba19c87acc0..e6b0833b309 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex index 82003bc95c1..028983a08d6 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex @@ -30,7 +30,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2018-08-23} +\date{Released 2018-09-24} \begin{document} diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf Binary files differindex add9b78ecf0..c24846b8f88 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex index d21a6a11e27..cd358e22c13 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex @@ -30,7 +30,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2018-08-23} +\date{Released 2018-09-24} \newcommand{\TF}{\textit{(TF)}} diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf Binary files differindex 679c2147284..e4a8705a614 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.tex b/Master/texmf-dist/doc/latex/l3kernel/source3.tex index e3e1bc280f6..13049df1544 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/source3.tex @@ -51,7 +51,7 @@ {latex-team@latex-project.org}% }% } -\date{Released 2018-08-23} +\date{Released 2018-09-24} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/doc/latex/l3packages/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3packages/CHANGELOG.md index bb08e570834..55103cde3d6 100644 --- a/Master/texmf-dist/doc/latex/l3packages/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3packages/CHANGELOG.md @@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2018-09-24] + +### Changed +- `xparse`: put spaces back when a trailing optional arg is absent (fixes #466) + ## [2018-08-23] ### Added @@ -25,7 +30,8 @@ this project uses date-based 'snapshot' version identifiers. - Switch to ISO date format - Improve cross-module use of internal functions -[Unreleased]: https://github.com/latex3/latex3/compare/2018-08-23...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2018-09-24...HEAD +[2018-09-24]: https://github.com/latex3/latex3/compare/2018-08-23...2018-09-24 [2018-08-23]: https://github.com/latex3/latex3/compare/2018-05-12...2018-08-23 [2018-05-12]: https://github.com/latex3/latex3/compare/2018-04-30...2018-05-12 [2018-04-30]: https://github.com/latex3/latex3/compare/2017-12-16...2018-04-30 diff --git a/Master/texmf-dist/doc/latex/l3packages/README.md b/Master/texmf-dist/doc/latex/l3packages/README.md index 5438f53d160..5835416a462 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 ========================== -Release 2018-08-23 +Release 2018-09-24 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf b/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf Binary files differindex 2331453c43d..a1d0786d810 100644 --- a/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf diff --git a/Master/texmf-dist/doc/latex/l3packages/xfp/xfp.pdf b/Master/texmf-dist/doc/latex/l3packages/xfp/xfp.pdf Binary files differindex 4dfe95883c2..a48ec1caade 100644 --- a/Master/texmf-dist/doc/latex/l3packages/xfp/xfp.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/xfp/xfp.pdf diff --git a/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf b/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf Binary files differindex eba375d6ec8..918b1ad2852 100644 --- a/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf diff --git a/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf b/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf Binary files differindex e58a84dacde..23d001fb6ea 100644 --- a/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf diff --git a/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf b/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf Binary files differindex 2787c0fee69..2e5b49bf900 100644 --- a/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1 index d02772c505c..1060047cb42 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.1 +++ b/Master/texmf-dist/doc/man/man1/l3build.1 @@ -1,4 +1,4 @@ -.TH l3build 1 "2018-09-21" +.TH l3build 1 "2018-09-23" .SH NAME l3build \- Checking and building packages .SH SYNOPSIS diff --git a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf Binary files differindex b18393cac51..a7767b32c93 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua index e59f6ca7e54..1c20067d9b6 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-check.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua @@ -30,6 +30,9 @@ local output = io.output local rnd = math.random +local var_value = kpse.var_value +local set_program_name = kpse.set_program_name + local luatex_version = status.luatex_version local len = string.len @@ -726,6 +729,8 @@ function runtest(name, engine, hide, ext, pdfmode, breakout) break end end + -- Deal with TEXMFCNF + set_program_name("kpsewhich") -- Clean out any dynamic files for _,filetype in pairs(dynamicfiles) do rm(testdir,filetype) @@ -741,6 +746,9 @@ function runtest(name, engine, hide, ext, pdfmode, breakout) -- Avoid spurious output from (u)pTeX os_setenv .. " GUESS_INPUT_KANJI_ENCODING=0" .. os_concat .. + -- Allow for local texmf files + os_setenv .. " TEXMFCNF=." .. os_pathsep .. var_value("TEXMFCNF") + .. os_concat .. (forcecheckepoch and setepoch() or "") .. -- Ensure lines are of a known length os_setenv .. " max_print_line=" .. maxprintline diff --git a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua index f1e0757e9b0..b256ce21403 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua @@ -25,6 +25,9 @@ for those people who are interested. local pairs = pairs local print = print +local lower = string.lower +local match = string.match + -- Copy files to the main CTAN release directory function copyctan() mkdir(ctandir .. "/" .. ctanpkg) @@ -129,6 +132,17 @@ function ctan() cp(i, j, tdsdir .. "/doc/" .. tdsroot .. "/" .. bundle) end end + -- Rename README if necessary + if ctanreadme ~= "" and not match(lower(ctanreadme),"^readme%.%w+") then + local newfile = "README." .. match(ctanreadme,"%.(%w+)$") + for _,dir in pairs({ctandir .. "/" .. ctanpkg, + tdsdir .. "/doc/" .. tdsroot .. "/" .. bundle}) do + if fileexists(dir .. "/" .. ctanreadme) then + rm(dir,newfile) + ren(dir,ctanreadme,newfile) + end + end + end dirzip(tdsdir, ctanpkg .. ".tds") if packtdszip then cp(ctanpkg .. ".tds.zip", tdsdir, ctandir) diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua index 88ac5bad6f3..12c59914916 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-install.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua @@ -29,6 +29,7 @@ local set_program = kpse.set_program_name local var_value = kpse.var_value local gsub = string.gsub +local lower = string.lower local match = string.match local insert = table.insert @@ -132,14 +133,6 @@ function install_files(target,full,dry_run) end local errorlevel = unpack() if errorlevel ~= 0 then return errorlevel end - errorlevel = install_files(unpackdir,"tex",{installfiles}) - + install_files(unpackdir,"bibtex/bst",{bstfiles},module,true) - + install_files(unpackdir,"makeindex",{makeindexfiles},module,true) - + install_files(unpackdir,"scripts",{scriptfiles},module) - if errorlevel ~= 0 then return errorlevel end - if full then - errorlevel = doc() - if errorlevel ~= 0 then return errorlevel end -- Creates a 'controlled' list of files local function excludelist(dir,include,exclude) @@ -165,6 +158,11 @@ function install_files(target,full,dry_run) return includelist end + local installlist = excludelist(unpackdir,installfiles,{scriptfiles}) + + if full then + errorlevel = doc() + if errorlevel ~= 0 then return errorlevel end -- For the purposes here, any typesetting demo files need to be -- part of the main typesetting list local typesetfiles = typesetfiles @@ -188,6 +186,16 @@ function install_files(target,full,dry_run) {bibfiles,demofiles,docfiles,pdffiles,textfiles,typesetlist}) if errorlevel ~= 0 then return errorlevel end + -- Rename README if necessary + if not dry_run then + if ctanreadme ~= "" and not match(lower(ctanreadme),"^readme%.%w+") then + local installdir = target .. "/doc/" .. moduledir + if fileexists(installdir .. "/" .. ctanreadme) then + ren(installdir,ctanreadme,"README." .. match(ctanreadme,"%.(%w+)$")) + end + end + end + -- Any script man files need special handling local manfiles = { } for _,glob in pairs(scriptmanfiles) do @@ -210,6 +218,14 @@ function install_files(target,full,dry_run) end end end + + if errorlevel ~= 0 then return errorlevel end + + errorlevel = install_files(unpackdir,"tex",{installlist}) + + install_files(unpackdir,"bibtex/bst",{bstfiles},module,true) + + install_files(unpackdir,"makeindex",{makeindexfiles},module,true) + + install_files(unpackdir,"scripts",{scriptfiles},module) + return errorlevel end diff --git a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua index 71fe0ea6c4b..9f732f7fab4 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua @@ -29,6 +29,9 @@ for those people who are interested. local gsub = string.gsub local match = string.match +local var_value = kpse.var_value +local set_program_name = kpse.set_program_name + function dvitopdf(name, dir, engine, hide) if match(engine, "^u?ptex$") then run( @@ -52,11 +55,15 @@ end -- An auxiliary used to set up the environmental variables function runtool(subdir, dir, envvar, command) + set_program_name("kpsewhich") dir = dir or "." return( run( typesetdir .. "/" .. subdir, (forcedocepoch and setepoch() or "") .. + -- Allow for local texmf files + os_setenv .. " TEXMFCNF=." .. os_pathsep .. var_value("TEXMFCNF") + .. os_concat .. os_setenv .. " " .. envvar .. "=." .. os_pathsep .. abspath(localdir) .. os_pathsep .. abspath(dir .. "/" .. subdir) diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua index f24b11acb3a..b3b999755dd 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua @@ -159,6 +159,7 @@ end -- Other required settings asciiengines = asciiengines or {"pdftex"} checkruns = checkruns or 1 +ctanreadme = ctanreadme or "README.md" ctanzip = ctanzip or ctanpkg .. "-ctan" epoch = epoch or 1463734800 if flatten == nil then diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua index d97fecd8298..827d3856a74 100755 --- a/Master/texmf-dist/scripts/l3build/l3build.lua +++ b/Master/texmf-dist/scripts/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2018-09-21" +release_date = "2018-09-23" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") @@ -137,9 +137,16 @@ if options["target"] == "check" then end end if next(failed) then - print(" Failed tests for configs:") for _,config in ipairs(failed) do - print(" - " .. config) + print("Failed tests for configuration " .. config .. ":") + print("\n Check failed with difference files") + if failed ~= "build" then + local testdir = testdir .. "-" .. failed + end + for _,i in ipairs(filelist(testdir,"*" .. os_diffext)) do + print(" - " .. testdir .. "/" .. i) + end + print("") end exit(1) else @@ -154,6 +161,7 @@ if #checkconfigs == 1 and local config = "./" .. checkconfigs[1] .. ".lua" if fileexists(config) then dofile(config) + testdir = testdir .. "-" .. checkconfigs[1] else print("Error: Cannot find configuration " .. checkconfigs[1]) exit(1) diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx index f6c691d3fdf..352db17b2fc 100644 --- a/Master/texmf-dist/source/latex/l3build/l3build.dtx +++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx @@ -152,6 +152,7 @@ \luavarseparator \luavarset{asciiengines}{\{"pdftex"\}}{Engines which should log as sure ASCII} \luavarset{checkruns} {1} {Number of runs to complete for a test before comparing the log} +\luavarset{ctanreadme}{"README.md"} {Name of the file to send to CTAN as \texttt{README.\meta{ext}}} \luavarset{ctanzip}{ctanpkg ... "-ctan"}{Name of the zip file created for upload to CTAN} \luavarset{epoch} {1463734800} {Epoch (Unix date) to set for test runs} \luavarset{flatten} {true} {Switch to flatten any source structure when sending to CTAN} @@ -222,7 +223,7 @@ % }^^A % } % -% \date{Released 2018-09-21} +% \date{Released 2018-09-23} % % \maketitle % \tableofcontents @@ -437,6 +438,11 @@ % The |source| tree is constructed from all files matched by \var{typesetfiles} and \var{sourcefiles}. % The |tex| tree from all files matched by \var{installfiles}. % +% The special case \var{ctanreadme} is used to allow renaming of a local +% |foo.xyz| file to |README.xyz|. The local |foo.xyz| should be listed in +% \var{textfiles}, and will be renamed as part of constructing the CTAN +% structure. The file extension will be unchanged by this process. +% % Files that should always be excluded from the archive are matched against the \var{excludefiles} variable; by default this is \luavar{excludefiles}, which match Emacs' autosave files. % % Binary files should be specified with the \var{binaryfiles} variable (default \luavar{binaryfiles}); these are added to the zip archive without normalising line endings (text files are automatically converted to Unix-style line endings). @@ -1054,6 +1060,18 @@ % takes either a date or raw epoch. When given, this will automatically % activate forcing of the epoch in both testing and typesetting. % +% \subsection{Settings in \texttt{texmf.cnf}} +% +% To allow application of non-standard \TeX{} trees or similar non-standard +% settings, \pkg{l3build} enables searching for a \texttt{texmf.cnf} file +% by setting the envirnmental variable \texttt{TEXMFCNF}. This might +% for example be used with a file containing +% \begin{verbatim} +% TEXMFAUXTREES = ../../texmf, +% \end{verbatim} +% for adding a local tree within the development repository (assuming the +% typical \pkg{l3build} layout). +% % \section{Alternative test formats} % % \subsection{Generating test files with \pkg{DocStrip}} diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index 9d19e45ee11..6a33c69b9f0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -21,7 +21,7 @@ % for those people who are interested. % %<*driver|generic|package> -\def\ExplFileDate{2018-08-23}% +\def\ExplFileDate{2018-09-24}% %</driver|generic|package> %<*driver> \documentclass[full]{l3doc} @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx index f8926277432..a4f8d3facb6 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx index 90f6d3c80ec..d6598c6ceda 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx index de180429e47..fb1291e6aca 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx @@ -138,7 +138,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index 552a2e93ed9..018145c609a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx index 43c19185279..f64f954a9f3 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -1467,6 +1467,39 @@ % (as appropriate to the result of the test). % \end{function} % +% \begin{function}[added = 2018-09-23] +% { +% \peek_catcode_collect_inline:Nn, +% \peek_charcode_collect_inline:Nn, +% \peek_meaning_collect_inline:Nn +% } +% \begin{syntax} +% \cs{peek_catcode_collect_inline:Nn} \meta{test token} \Arg{inline code} +% \cs{peek_charcode_collect_inline:Nn} \meta{test token} \Arg{inline code} +% \cs{peek_meaning_collect_inline:Nn} \meta{test token} \Arg{inline code} +% \end{syntax} +% Collects and removes tokens from the input stream until finding a +% token that does not match the \meta{test token} (as defined by the +% test \cs{token_if_eq_catcode:NNTF} or \cs{token_if_eq_charcode:NNTF} +% or \cs{token_if_eq_meaning:NNTF}). The collected tokens are passed +% to the \meta{inline code} as~|#1|. When begin-group or end-group +% tokens (usually |{| or~|}|) are collected they are replaced by +% implicit \cs{c_group_begin_token} and \cs{c_group_end_token}, and +% when spaces (including \cs{c_space_token}) are collected they are +% replaced by explicit spaces. +% +% For example the following code prints ``Hello'' to the terminal and +% leave ``, world!'' in the input stream. +% \begin{verbatim} +% \peek_catcode_collect_inline:Nn A { \iow_term:n {#1} } Hello,~world! +% \end{verbatim} +% Another example is that the following code tests if the next token is |*|, ignoring intervening spaces, but putting them back using |#1| if there is no~|*|. +% \begin{verbatim} +% \peek_meaning_collect_inline:Nn \c_space_token +% { \peek_charcode:NTF * { star } { no~star #1 } } +% \end{verbatim} +% \end{function} +% % \end{documentation} % % \begin{implementation} @@ -1488,21 +1521,13 @@ % this will switch to horizontal mode and insert \tn{everypar} tokens and % nothing else. Unlike the \LaTeXe{} version, the availability of \eTeX{} % means using a mode test can be done at for example the start of an -% \tn{halign}. The \tn{quitvmode} primitive essentially wraps the same -% code up at the engine level. +% \tn{halign}. % \begin{macrocode} -\cs_new_protected:Npx \mode_leave_vertical: +\cs_new_protected:Npn \mode_leave_vertical: { - \cs_if_exist:NTF \tex_quitvmode:D - { \tex_quitvmode:D } - { - \exp_not:n - { - \if_mode_vertical: - \exp_after:wN \tex_indent:D - \fi: - } - } + \if_mode_vertical: + \exp_after:wN \tex_indent:D + \fi: } % \end{macrocode} % \end{macro} @@ -5229,6 +5254,86 @@ % \end{macro} % \end{macro} % +% \begin{variable}{\l_@@_collect_tl} +% \begin{macrocode} +\tl_new:N \l_@@_collect_tl +% \end{macrocode} +% \end{variable} +% +% \begin{macro} +% { +% \peek_catcode_collect_inline:Nn, +% \peek_charcode_collect_inline:Nn, +% \peek_meaning_collect_inline:Nn +% } +% \begin{macro} +% { +% \@@_collect:NNn, \@@_collect_true:w, +% \@@_collect_remove:nw, \@@_collect:N +% } +% Most of the work is done by \cs{@@_execute_branches_\ldots{}:}, +% which calls either \cs{@@_true:w} or \cs{@@_false:w} according to +% whether the next token \cs{l_peek_token} matches the search token +% (stored in \cs{l_@@_search_token} and \cs{l_@@_search_tl}). +% Here, in the \texttt{true} case we run \cs{@@_collect_true:w}, +% which generally calls \cs{@@_collect:N} to store the peeked token +% into \cs{l_@@_collect_tl}, except in special non-\texttt{N}-type +% cases (begin-group, end-group, or space), where a frozen token is +% stored. The \texttt{true} branch calls +% \cs{@@_execute_branches_\ldots{}:} to fetch more matching tokens. +% Once there are no more, \cs{@@_false_aux:n} closes the safe-align +% group and runs the user's inline code. +% \begin{macrocode} +\cs_new_protected:Npn \peek_catcode_collect_inline:Nn + { \@@_collect:NNn \@@_execute_branches_catcode: } +\cs_new_protected:Npn \peek_charcode_collect_inline:Nn + { \@@_collect:NNn \@@_execute_branches_charcode: } +\cs_new_protected:Npn \peek_meaning_collect_inline:Nn + { \@@_collect:NNn \@@_execute_branches_meaning: } +\cs_new_protected:Npn \@@_collect:NNn #1#2#3 + { + \group_align_safe_begin: + \cs_set_eq:NN \l_@@_search_token #2 + \tl_set:Nn \l_@@_search_tl {#2} + \tl_clear:N \l_@@_collect_tl + \cs_set:Npn \@@_false:w + { \exp_args:No \@@_false_aux:n \l_@@_collect_tl } + \cs_set:Npn \@@_false_aux:n ##1 + { + \group_align_safe_end: + #3 + } + \cs_set_eq:NN \@@_true:w \@@_collect_true:w + \cs_set:Npn \@@_true_aux:w { \peek_after:Nw #1 } + \@@_true_aux:w + } +\cs_new_protected:Npn \@@_collect_true:w + { + \if_case:w + \if_catcode:w \exp_not:N \l_peek_token { 1 \exp_stop_f: \fi: + \if_catcode:w \exp_not:N \l_peek_token } 2 \exp_stop_f: \fi: + \if_meaning:w \l_peek_token \c_space_token 3 \exp_stop_f: \fi: + 0 \exp_stop_f: + \exp_after:wN \@@_collect:N + \or: \@@_collect_remove:nw { \c_group_begin_token } + \or: \@@_collect_remove:nw { \c_group_end_token } + \or: \@@_collect_remove:nw { ~ } + \fi: + } +\cs_new_protected:Npn \@@_collect:N #1 + { + \tl_put_right:Nn \l_@@_collect_tl {#1} + \@@_true_aux:w + } +\cs_new_protected:Npn \@@_collect_remove:nw #1 + { + \tl_put_right:Nn \l_@@_collect_tl {#1} + \exp_after:wN \@@_true_remove:w + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</initex|package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx index 97ff75f1a17..fabaf99d76b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx index fb396cf66e6..fcad722f870 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx index 9ac01cb070d..c448ec4fa3e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx index c8f6a5e5da7..60294abcc83 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx index b1f0a63c060..9d3746ca2aa 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx @@ -77,7 +77,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % \maketitle % \tableofcontents % @@ -281,6 +281,10 @@ and all files in that bundle must be distributed together. % \item |replace| is a boolean key (\texttt{true} by default) which % indicates whether to replace |@@| as \pkg{l3docstrip} does. % \end{itemize} +% These commands allow hyphenation of control sequences after (most) underscores. +% By default, a hyphen is used to mark the hyphenation, but this can be changed with +% the \texttt{cs-break-nohyphen} class option. +% To disable hyphenation of control sequencies entirely, use \texttt{cs-break-off}. % \end{function} % % @@ -687,6 +691,7 @@ and all files in that bundle must be distributed together. % \g_@@_lmodern_bool, % \g_@@_checkfunc_bool, % \g_@@_checktest_bool, +% \g_@@_cs_break_bool, % \g_@@_kernel_bool % } % Information about package options. @@ -695,6 +700,8 @@ and all files in that bundle must be distributed together. \bool_new:N \g_@@_checkfunc_bool \bool_new:N \g_@@_checktest_bool \bool_new:N \g_@@_kernel_bool +\bool_new:N \g_@@_cs_break_bool +\bool_gset_true:N \g_@@_cs_break_bool % \end{macrocode} % \end{variable} % @@ -1412,6 +1419,13 @@ and all files in that bundle must be distributed together. % \end{macrocode} % % \begin{macrocode} +\DeclareOption { cs-break-off } + { \bool_gset_false:N \g_@@_cs_break_bool } +\DeclareOption { cs-break-nohyphen } + { \PassOptionsToPackage{nohyphen}{underscore} } +% \end{macrocode} +% +% \begin{macrocode} \DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } } \ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default } \PassOptionsToClass { a4paper } { article } @@ -1460,9 +1474,9 @@ and all files in that bundle must be distributed together. pifont, textcomp, trace, - underscore, csquotes, fancyvrb, + underscore, verbatim } \raggedbottom @@ -1933,19 +1947,34 @@ and all files in that bundle must be distributed together. \@@_replace_at_at:N \l_@@_cmd_tl \tl_replace_all:Nno \l_@@_cmd_tl { _ } \l_@@_tmpb_tl } +% \end{macrocode} +% \paragraph{Typesetting} +% Note the replacement for the underscore is to permit linebreaks. +% The \texttt{underscore} package adds the linebreak, +% and the regex results in applying the breakable underscore only to the \emph{last} +% of a run of underscores, and not if the underscore follows a backslash. +% \begin{macrocode} \mode_if_math:T { \mbox } - { - \verbatim@font - \@@_if_almost_str:VT \l_@@_cmd_tl - { - \tl_set:Nx \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl } - \tl_replace_all:Non \l_@@_cmd_tl - { \token_to_str:N _ } { \_ } - } - \tl_replace_all:Nnn \l_@@_cmd_tl { ~ } { \@xobeysp } - \l_@@_cmd_tl - \@ - } + { + \verbatim@font + \@@_if_almost_str:VT \l_@@_cmd_tl + { + \tl_set:Nx \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl } + \bool_if:NT \g_@@_cs_break_bool + { + \regex_replace_all:nnN + {([^\\])_([^\_])} + {\1\c{BreakableUnderscore}\2} + \l_@@_cmd_tl + } + } + \tl_replace_all:Nnn \l_@@_cmd_tl { ~ } { \@xobeysp } + \l_@@_cmd_tl + \@ + } +% \end{macrocode} +% \paragraph{Indexing} +% \begin{macrocode} \bool_if:NF \l_@@_cmd_noindex_bool { \quark_if_no_value:NF \l_@@_cmd_index_tl diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx index 14eb116ba35..63988b271ac 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx index d46578027d6..4a91ce531b4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -458,6 +458,79 @@ % given. % \end{function} % +% \section{PDF Features} +% +% A range of PDF features are exposed by \pdfTeX{} and \LuaTeX{} in direct PDF +% output mode, and the vast majority of these are also controllable using +% the \texttt{(x)dvipdfmx} driver (as DVI instructions are converted directly +% to PDF). Some of these functions are also available for cases where PDFs +% are generated by \texttt{dvips}: this depends on being able to pass +% information through correctly. +% +% \subsection{PDF Objects} +% +% Objects are used to provide a range of data structures in a PDF. At the +% driver level, different PDF object types are declared separately. Objects +% are only \emph{written} to the PDF when referenced. +% +% \begin{function}{\driver_pdf_object_new:nn} +% \begin{syntax} +% \cs{driver_pdf_object_new:n} \Arg{name} \Arg{type} +% \end{syntax} +% Declares \meta{name} as a PDF object. The \texttt{type} should be one of +% |array| or |dict|, |fstream| or |stream|. +% \end{function} +% +% \begin{function}[EXP]{\driver_pdf_object_ref:n} +% \begin{syntax} +% \cs{driver_pdf_object_ref:n} \Arg{object} +% \end{syntax} +% Inserts the appropriate information to reference the \meta{object} +% in for example page resource allocation. +% \end{function} +% +% \begin{function}{\driver_pdf_object_write:nn} +% \begin{syntax} +% \cs{driver_pdf_object_write:nn} \Arg{name} \Arg{data} +% \end{syntax} +% Writes the \meta{data} as content of the \meta{object}. Depending on the +% \meta{type} declared for the object, the format required for the +% \meta{data} will vary +% \begin{itemize} +% \item[\texttt{array}] A space-separated list of values +% \item[\texttt{dict}] Key--value pairs in the form +% \texttt{/\meta{key} \meta{value}} +% \item[\texttt{fstream}] Two brace groups: \meta{content} and +% \meta{file name} +% \item[\texttt{stream}] Two brace groups: \meta{content} and +% \meta{additional attributes} +% \end{itemize} +% \end{function} +% +% \subsection{PDF structure} +% +% \begin{function}{\driver_pdf_compresslevel:n} +% \begin{syntax} +% \cs{driver_pdf_compresslevel:n} \Arg{level} +% \end{syntax} +% Sets the degree of compression used for PDF files: the \meta{level} should +% be in the range $0$ to $9$ (higher is more compression). Typically, either +% compression is disables ($0$) or maximised ($9$). When used with +% \texttt{(x)dvipdfmx}, this setting may only be applied globally: it should +% be set only once. +% \end{function} +% +% \begin{function}{\driver_pdf_objects_enable:, \driver_pdf_objects_disable:} +% \begin{syntax} +% \cs{driver_pdf_objects_disable:} +% \end{syntax} +% Enables or disables the creation of PDF objects. These objects are used to +% reduce the size of PDFs, and typically are enabled as standard. When used +% with \texttt{(x)dvipdfmx}, object creation can be disabled but not +% re-enabled, and this setting may only be applied globally: it should +% be set only once. +% \end{function} +% % \end{documentation} % % \begin{implementation} @@ -481,23 +554,23 @@ %<*package> \ProvidesExplFile %<*dvipdfmx> - {l3dvidpfmx.def}{2018-08-23}{} + {l3dvidpfmx.def}{2018-09-24}{} {L3 Experimental driver: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3dvips.def}{2018-08-23}{} + {l3dvips.def}{2018-09-24}{} {L3 Experimental driver: dvips} %</dvips> %<*dvisvgm> - {l3dvisvgm.def}{2018-08-23}{} + {l3dvisvgm.def}{2018-09-24}{} {L3 Experimental driver: dvisvgm} %</dvisvgm> %<*pdfmode> - {l3pdfmode.def}{2018-08-23}{} + {l3pdfmode.def}{2018-09-24}{} {L3 Experimental driver: PDF mode} %</pdfmode> %<*xdvipdfmx> - {l3xdvidpfmx.def}{2018-08-23}{} + {l3xdvidpfmx.def}{2018-09-24}{} {L3 Experimental driver: xdvipdfmx} %</xdvipdfmx> %</package> @@ -605,7 +678,7 @@ { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } } \cs_new_protected:Npn \driver_color_spot:nn #1#2 - { \@@_color_select:n { \c_space_tl #1 } } + { \@@_color_select:n { #1 } } \cs_new_protected:Npn \@@_color_select:n #1 { \@@_literal:n { color~push~ #1 } @@ -904,7 +977,7 @@ % \end{macrocode} % \end{macro} % -% \subsection{Images} +% \subsubsection{Images} % % \begin{macro}{\@@_image_getbb_eps:n} % Simply use the generic function. @@ -922,7 +995,7 @@ % \end{macrocode} % \end{macro} % -% \subsection{Drawing} +% \subsubsection{Drawing} % % \begin{macro}{\@@_draw_literal:n, \@@_draw_literal:x} % The same as literal PostScript: same arguments about positioning apply @@ -1322,6 +1395,113 @@ % \end{macrocode} % \end{macro} % +% \subsubsection{PDF Features} +% +% \begin{variable}{\g_@@_pdf_object_int, \g_@@_pdf_object_prop} +% For tracking objects to allow finalisation. +% \begin{macrocode} +\int_new:N \g_@@_pdf_object_int +\prop_new:N \g_@@_pdf_object_prop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\driver_pdf_object_new:nn} +% \begin{macro}[EXP]{\driver_pdf_object_ref:n} +% Tracking objects is similar to \texttt{dvipdfmx}. +% \begin{macrocode} +\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2 + { + \int_gincr:N \g_@@_pdf_object_int + \int_const:cn + { g_@@_pdf_object_ \tl_to_str:n {#1} _int } + { \g_@@_pdf_object_int } + \prop_gput:Nnn \g_@@_pdf_object_prop {#1} {#2} + } +\cs_new:Npn \driver_pdf_object_ref:n #1 + { { l3obj \int_use:c { g_@@_pdf_object_ \tl_to_str:n {#1} _int } } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\driver_pdf_object_write:nn} +% \begin{macro} +% { +% \@@_pdf_object_write_array:nn , +% \@@_pdf_object_write_dict:nn , +% \@@_pdf_object_write_stream:nn +% } +% \begin{macro}{\@@_pdf_object_write_stream:nnn} +% This is where we choose the actual type: some work to get things +% right. +% \begin{macrocode} +\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 + { + \@@_literal_postscript:x + { + mark ~ /_objdef ~ \driver_pdf_object_ref:n {#1} ~ + /type + \str_case_e:nn + { \prop_item:Nn \g_@@_pdf_object_prop {#1} } + { + { array } { /array } + { dict } { /dict } + { fstream } { /stream } + { stream } { /stream } + } + /OBJ ~ pdfmark + } + \use:c + { @@_pdf_object_write_ \prop_item:Nn \g_@@_pdf_object_prop {#1} :nn } + {#1} {#2} + } +\cs_new_protected:Npn \@@_pdf_object_write_array:nn #1#2 + { + \@@_literal_postscript:x + { + mark ~ \driver_pdf_object_ref:n {#1} ~ + [ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL ~ pdfmark + } + } +\cs_new_protected:Npn \@@_pdf_object_write_dict:nn #1#2 + { + \@@_literal_postscript:x + { + mark ~ \driver_pdf_object_ref:n {#1} ~ + << ~ \exp_not:n {#2} ~ >> ~ /PUT ~ pdfmark + } + } +\cs_new_protected:Npn \@@_pdf_object_write_stream:nn #1#2 + { + \exp_args:Nx + \@@_pdf_object_write_stream:nnn + { \driver_pdf_object_ref:n {#1} } + #2 + } +\cs_new_protected:Npn \@@_pdf_object_write_stream:nnn #1#2#3 + { + \@@_literal_postscript:n + { + [nobreak] ~ + mark ~ #1 ~ ( #3 ) ~ /PUT ~ pdfmark ~ + mark ~ #1 ~ << #2 >> ~ /PUT ~ pdfmark + } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\driver_pdf_compresslevel:n} +% \begin{macro}{\driver_pdf_objects_enable:, \driver_pdf_objects_disable:} +% These are all no-ops. +% \begin{macrocode} +\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 { } +\cs_new_protected:Npn \driver_pdf_objects_enable: { } +\cs_new_protected:Npn \driver_pdf_objects_disable: { } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</dvips> % \end{macrocode} @@ -1483,7 +1663,7 @@ % \end{macrocode} % \end{macro} % -% \subsection{Images} +% \subsubsection{Images} % % \begin{variable}{\l_@@_image_attr_tl} % In PDF mode, additional attributes of an image (such as page number) are @@ -1594,6 +1774,117 @@ % \end{macrocode} % \end{macro} % +% \subsubsection{PDF Objects} +% +% \begin{variable}{\g_@@_pdf_object_prop} +% For tracking objects to allow finalisation. +% \begin{macrocode} +\prop_new:N \g_@@_pdf_object_prop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\driver_pdf_object_new:nn} +% \begin{macro}[EXP]{\driver_pdf_object_ref:n} +% Declaring objects means reserving at the PDF level plus starting +% tracking. +% \begin{macrocode} +\group_begin: + \cs_set_protected:Npn \@@_tmp:w #1#2 + { + \cs_new_protected:Npx \driver_pdf_object_new:nn ##1##2 + { + #1 reserveobjnum ~ + \int_const:cn + { g_@@_pdf_object_ \exp_not:N \tl_to_str:n {##1} _int } + {#2} + \prop_gput:Nnn \exp_not:N \g_@@_pdf_object_prop {##1} {##2} + } + } + \cs_if_exist:NTF \tex_pdfextension:D + { + \@@_tmp:w + { \tex_pdfextension:D obj ~ } + { \tex_pdffeedback:D lastobj \scan_stop: } + } + { \@@_tmp:w { \tex_pdfobj:D } { \tex_pdflastobj:D } } +\group_end: +\cs_new:Npn \driver_pdf_object_ref:n #1 + { \int_use:c { g_@@_pdf_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\driver_pdf_object_write:nn} +% \begin{macro}[EXP]{\@@_exp_not_i:nn, \@@_exp_not_ii:nn} +% Writing the data needs a little information about the structure of the +% object. +% \begin{macrocode} +\group_begin: + \cs_set_protected:Npn \@@_tmp:w #1 + { + \cs_new_protected:Npn \driver_pdf_object_write:nn ##1##2 + { + \tex_immediate:D #1 useobjnum ~ + \int_use:c + { g_@@_pdf_object_ \tl_to_str:n {##1} _int } + \str_case_e:nn + { \prop_item:Nn \g_@@_pdf_object_prop {##1} } + { + { array } { { [ ~ \exp_not:n {##2} ~ ] } } + { dict } { { << ~ \exp_not:n {##2} ~ >> } } + { fstream } + { + stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~ + file ~ { \@@_exp_not_ii:nn ##2 } + } + { stream } + { + stream ~ attr ~ { \@@_exp_not_i:nn ##2 } ~ + { \@@_exp_not_ii:nn ##2 } + } + } + } + } + \cs_if_exist:NTF \tex_pdfextension:D + { \@@_tmp:w { \tex_pdfextension:D obj ~ } } + { \@@_tmp:w { \tex_pdfobj:D } } +\group_end: +\cs_new:Npn \@@_exp_not_i:nn #1#2 { \exp_not:n {#1} } +\cs_new:Npn \@@_exp_not_ii:nn #1#2 { \exp_not:n {#2} } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{PDF Structure} +% +% \begin{macro}{\driver_pdf_compresslevel:n} +% \begin{macro}{\driver_pdf_objects_enable:, \driver_pdf_objects_disable:} +% \begin{macro}{\@@_pdf_objectlevel:n} +% Simply pass data to the engine. +% \begin{macrocode} +\cs_new_protected:Npx \driver_pdf_compresslevel:n #1 + { + \cs_if_exist:NTF \tex_pdfcompresslevel:D + { \tex_pdfcompresslevel:D } + { \tex_pdfvariable:D compresslevel } + \exp_not:N \int_value:w \exp_not:N \int_eval:n {#1} \scan_stop: + } +\cs_new_protected:Npn \driver_pdf_objects_enable: + { \@@_pdf_objectlevel:n { 2 } } +\cs_new_protected:Npn \driver_pdf_objects_disable: + { \@@_pdf_objectlevel:n { 0 } } +\cs_new_protected:Npx \@@_pdf_objectlevel:n #1 + { + \cs_if_exist:NTF \tex_pdfobjcompresslevel:D + { \tex_pdfobjcompresslevel:D } + { \tex_pdfvariable:D objcompresslevel } + #1 \scan_stop: + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</pdfmode> % \end{macrocode} @@ -1704,7 +1995,7 @@ % \end{macrocode} % \end{macro} % -% \subsection{Images} +% \subsubsection{Images} % % \begin{macro} % { @@ -1840,6 +2131,104 @@ % \end{macro} % \end{macro} % +% \subsubsection{PDF Objects} +% +% \begin{variable}{\g_@@_pdf_object_int, \g_@@_pdf_object_prop} +% For tracking objects to allow finalisation. +% \begin{macrocode} +\int_new:N \g_@@_pdf_object_int +\prop_new:N \g_@@_pdf_object_prop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\driver_pdf_object_new:nn} +% \begin{macro}[EXP]{\driver_pdf_object_ref:n} +% Objects are tracked at the macro level, but we don't have to do anything +% at this stage. +% \begin{macrocode} +\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2 + { + \int_gincr:N \g_@@_pdf_object_int + \int_const:cn + { g_@@_pdf_object_ \tl_to_str:n {#1} _int } + { \g_@@_pdf_object_int } + \prop_gput:Nnn \g_@@_pdf_object_prop {#1} {#2} + } +\cs_new:Npn \driver_pdf_object_ref:n #1 + { @l3obj \int_use:c { g_@@_pdf_object_ \tl_to_str:n {#1} _int } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\driver_pdf_object_write:nn} +% \begin{macro}{\@@_pdf_object_write:nnn} +% \begin{macro} +% { +% \@@_pdf_object_write_array:nn , +% \@@_pdf_object_write_dict:nn , +% \@@_pdf_object_write_fstream:nn , +% \@@_pdf_object_write_stream:nn +% } +% \begin{macro}{\@@_pdf_object_write_stream:nnnn} +% This is where we choose the actual type. +% \begin{macrocode} +\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 + { + \exp_args:Nx \@@_pdf_object_write:nnn + { \prop_item:Nn \g_@@_pdf_object_prop {#1} } {#1} {#2} + } +\cs_new_protected:Npn \@@_pdf_object_write:nnn #1#2#3 + { \use:c { @@_pdf_object_write_ #1 :nn } {#2} {#3} } +\cs_new_protected:Npn \@@_pdf_object_write_array:nn #1#2 + { + \@@_literal:x + { + pdf:obj ~ \driver_pdf_object_ref:n {#1} ~ + [ ~ \exp_not:n {#2} ~ ] + } + } +\cs_new_protected:Npn \@@_pdf_object_write_dict:nn #1#2 + { + \@@_literal:x + { + pdf:obj ~ \driver_pdf_object_ref:n {#1} ~ + << ~ \exp_not:n {#2} ~ >> + } + } +\cs_new_protected:Npn \@@_pdf_object_write_fstream:nn #1#2 + { \@@_pdf_object_write_stream:nnnn { f } {#1} #2 } +\cs_new_protected:Npn \@@_pdf_object_write_stream:nn #1#2 + { \@@_pdf_object_write_stream:nnnn { } {#1} #2 } +\cs_new_protected:Npn \@@_pdf_object_write_stream:nnnn #1#2#3#4 + { + \@@_literal:x + { + pdf: #1 stream ~ \driver_pdf_object_ref:n {#2} ~ + ( \exp_not:n {#4} ) ~ << \exp_not:n {#3} >> + + } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{PDF Structure} +% +% \begin{macro}{\driver_pdf_compresslevel:n} +% \begin{macro}{\driver_pdf_objects_enable:, \driver_pdf_objects_disable:} +% Pass data to the driver: these are a one-shot. +% \begin{macrocode} +\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 + { \@@_literal:x { dvipdfmx:config~z~ \int_eval:n {#1} } } +\cs_new_protected:Npn \driver_pdf_objects_enable: { } +\cs_new_protected:Npn \driver_pdf_objects_disable: + { \@@_literal:n { dvipdfmx:config~C~0x40 } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</dvipdfmx|xdvipdfmx> % \end{macrocode} @@ -1850,7 +2239,7 @@ %<*xdvipdfmx> % \end{macrocode} % -% \subsection{Images} +% \subsubsection{Images} % % \begin{macro} % {\@@_image_getbb_jpg:n, \@@_image_getbb_pdf:n, \@@_image_getbb_png:n} @@ -1955,7 +2344,7 @@ %<*dvipdfmx|pdfmode|xdvipdfmx> % \end{macrocode} % -% \subsection{Drawing} +% \subsubsection{Drawing} % % \begin{macro}{\@@_draw_literal:n, \@@_draw_literal:x} % Pass data through using a dedicated interface. @@ -2416,7 +2805,7 @@ % \end{macrocode} % \end{macro} % -% \subsection{Driver-specific auxiliaries} +% \subsubsection{Driver-specific auxiliaries} % % \begin{macro}{\@@_scope_begin:n, \@@_scope_begin:x} % In SVG transformations, clips and so on are attached directly to scopes so @@ -2556,7 +2945,7 @@ % \end{macrocode} % \end{macro} % -% \subsection{Images} +% \subsubsection{Images} % % \begin{macro}{\@@_image_getbb_png:n, \@@_image_getbb_jpg:n} % These can be included by extracting the bounding box data. @@ -2592,7 +2981,29 @@ % \end{macro} % \end{macro} % -% \subsection{Drawing} +% \subsubsection{PDF Features} +% +% \begin{macro}{\driver_pdf_object_new:n} +% \begin{macro}[EXP]{\driver_pdf_object_ref:n} +% \begin{macro}{\driver_pdf_ojbect_write:nn} +% \begin{macro}{\driver_pdf_compresslevel:n} +% \begin{macro}{\driver_pdf_objects_enable:, \driver_pdf_objects_disable:} +% These are all no-ops. +% \begin{macrocode} +\cs_new_protected:Npn \driver_pdf_object_new:n #1 { } +\cs_new:Npn \driver_pdf_object_ref:n #1 { } +\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 { } +\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 { } +\cs_new_protected:Npn \driver_pdf_objects_enable: { } +\cs_new_protected:Npn \driver_pdf_objects_disable: { } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Drawing} % % \begin{macro}{\@@_draw_literal:n, \@@_draw_literal:x} % The same as the more general literal call. diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx index 4a4224b5936..ee757060b76 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index ecacb84a841..f623ae098d5 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -667,6 +667,13 @@ % % \subsubsection{Variables and constants} % +% \begin{variable}{\l_@@_internal_tl} +% Used as a short-term scratch variable. +% \begin{macrocode} +\tl_new:N \l_@@_internal_tl +% \end{macrocode} +% \end{variable} +% % \begin{variable}{\c_term_ior} % Reading from the terminal (with a prompt) is done using a positive % but non-existent stream number. Unlike writing, there is no concept @@ -955,7 +962,6 @@ % \begin{macro}{\@@_map_inline:NNn} % \begin{macro}{\@@_map_inline:NNNn} % \begin{macro}{\@@_map_inline_loop:NNN} -% \begin{variable}{\l_@@_internal_tl} % Mapping to an input stream can be done on either a token or a string % basis, hence the set up. Within that, there is a check to avoid reading % past the end of a file, hence the two applications of \cs{ior_if_eof:N}. @@ -988,9 +994,7 @@ \@@_map_inline_loop:NNN #1#2#3 } } -\tl_new:N \l_@@_internal_tl % \end{macrocode} -% \end{variable} % \end{macro} % \end{macro} % \end{macro} @@ -1865,6 +1869,13 @@ % % \subsection{File operations} % +% \begin{variable}{\l_@@_internal_tl} +% Used as a short-term scratch variable. +% \begin{macrocode} +\tl_new:N \l_@@_internal_tl +% \end{macrocode} +% \end{variable} +% % \begin{variable}{\g_@@_internal_ior} % A reserved stream to test for file existence. % \begin{macrocode} @@ -1952,13 +1963,6 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_tmp_tl} -% Used as a short-term scratch variable. -% \begin{macrocode} -\tl_new:N \l_@@_tmp_tl -% \end{macrocode} -% \end{variable} -% % \begin{variable}{\l_@@_base_name_str, \l_@@_full_name_str} % For storing the basename and full path whilst passing data internally. % \begin{macrocode} @@ -2007,14 +2011,14 @@ \group_begin: \seq_map_inline:Nn \l_char_active_seq { - \tl_set:Nx \l_@@_tmp_tl { \iow_char:N ##1 } - \char_set_active_eq:NN ##1 \l_@@_tmp_tl + \tl_set:Nx \l_@@_internal_tl { \iow_char:N ##1 } + \char_set_active_eq:NN ##1 \l_@@_internal_tl } - \tl_set:Nx \l_@@_tmp_tl {#1} - \tl_set:Nx \l_@@_tmp_tl - { \tl_to_str:N \l_@@_tmp_tl } + \tl_set:Nx \l_@@_internal_tl {#1} + \tl_set:Nx \l_@@_internal_tl + { \tl_to_str:N \l_@@_internal_tl } \exp_args:NNNV \group_end: - \str_set:Nn #2 \l_@@_tmp_tl + \str_set:Nn #2 \l_@@_internal_tl } \cs_new_protected:Npn \@@_name_quote:nN #1#2 { @@ -2174,8 +2178,8 @@ %</package> \cs_new_protected:Npn \@@_input_pop: { - \seq_gpop:NN \g_@@_stack_seq \l_@@_tmp_tl - \exp_after:wN \@@_input_pop:nnn \l_@@_tmp_tl + \seq_gpop:NN \g_@@_stack_seq \l_@@_internal_tl + \exp_after:wN \@@_input_pop:nnn \l_@@_internal_tl } %<*package> \cs_new_eq:NN \__kernel_file_input_pop: \__file_input_pop: diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx index bf5c5d7e3b5..1dc099c4fc8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx index 5caf1ad0be1..a2d98c2196b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx index 9e98ff8f43e..0bf13a954a2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % \maketitle % % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx index 0e17a7ddb4d..0b1f14d14d3 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx index fed862dc2f2..87736c6204d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx index c473ab1b110..08788057eff 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx index dddaebe50e9..b38077a3b9f 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx index 99bfe1d1ae7..e25f7126ee6 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx index ffc7edf283b..120ddd88c41 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx index c56d92ea761..dbffd2bd274 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx index 3526519ddc4..bb7e103f25d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx index 9eed28891c5..67b5329003b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx index c01862ddec1..2225981d426 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % \maketitle % % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx index 373d0b111e7..72b4443b241 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx @@ -38,7 +38,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx index 33ac720b455..2f467b82aa3 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx index 76b4668c239..3d5db336b31 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx index 29b930a6340..cd2321eec95 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -550,7 +550,7 @@ % \end{function} % % \begin{function}[added = 2012-06-04, updated = 2018-04-22] -% {\int_step_variable:nnn, \int_step_variable:nnnn, \int_step_variable:nnnnn} +% {\int_step_variable:nNn, \int_step_variable:nnNn, \int_step_variable:nnnNn} % \begin{syntax} % \cs{int_step_variable:nNn} \Arg{final value} \meta{tl~var} \Arg{code} % \cs{int_step_variable:nnNn} \Arg{initial value} \Arg{final value} \meta{tl~var} \Arg{code} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx index 7739ddd76d3..6f56abc96c7 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx index ef418edc446..f0b267e7249 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index da03797c65d..7195061bfcc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -238,9 +238,7 @@ % \end{syntax} % Stores the \meta{code} for execution when \meta{key} is used. % The \meta{code} can include one parameter (|#1|), which will be the -% \meta{value} given for the \meta{key}. The \texttt{x}-type variant -% expands \meta{code} at the point where the \meta{key} is -% created. +% \meta{value} given for the \meta{key}. % \end{function} % % \begin{function}[updated = 2013-07-09] @@ -2300,7 +2298,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_execute:, \@@_execute_unknown:} +% \begin{macro}{\@@_execute:, \@@_execute_inherit:, \@@_execute_unknown:} % \begin{macro}[EXP]{\@@_execute:nn} % \begin{macro}{\@@_store_unused:} % Actually executing a key is done in two parts. First, look for the @@ -2317,42 +2315,50 @@ \cs:w \c_@@_code_root_tl \l_keys_path_tl \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } } - { \@@_execute_unknown: } - } -\cs_new_protected:Npn \@@_execute_unknown: - { - \bool_if:NTF \l_@@_only_known_bool - { \@@_store_unused: } { - \cs_if_exist:cTF - { \c_@@_inherit_root_tl \@@_parent:o \l_keys_path_tl } + \bool_if:NTF \l_@@_only_known_bool + { \@@_store_unused: } { - \clist_map_inline:cn + \cs_if_exist:cTF { \c_@@_inherit_root_tl \@@_parent:o \l_keys_path_tl } - { - \cs_if_exist:cT - { \c_@@_code_root_tl ##1 / \l_keys_key_tl } - { - \cs:w \c_@@_code_root_tl ##1 / \l_keys_key_tl - \exp_after:wN \cs_end: \exp_after:wN - { \l_keys_value_tl } - \clist_map_break: - } - } + { \@@_execute_inherit: } + { \@@_execute_unknown: } } + } + } +% \end{macrocode} +% To deal with the case where there is no hit, we leave +% \cs{@@_execute_unknown:} in the input stream and clean it up using the +% break function: that avoids needing a boolean. +% \begin{macrocode} +\cs_new_protected:Npn \@@_execute_inherit: + { + \clist_map_inline:cn + { \c_@@_inherit_root_tl \@@_parent:o \l_keys_path_tl } + { + \cs_if_exist:cT + { \c_@@_code_root_tl ##1 / \l_keys_key_tl } { - \cs_if_exist:cTF - { \c_@@_code_root_tl \l_@@_module_tl / unknown } - { - \cs:w \c_@@_code_root_tl \l_@@_module_tl / unknown - \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } - } - { - \__kernel_msg_error:nnxx { kernel } { key-unknown } - { \l_keys_path_tl } { \l_@@_module_tl } - } + \cs:w \c_@@_code_root_tl ##1 / \l_keys_key_tl + \exp_after:wN \cs_end: \exp_after:wN + { \l_keys_value_tl } + \clist_map_break:n { \use_none:n } } - } + } + \@@_execute_unknown: + } +\cs_new_protected:Npn \@@_execute_unknown: + { + \cs_if_exist:cTF + { \c_@@_code_root_tl \l_@@_module_tl / unknown } + { + \cs:w \c_@@_code_root_tl \l_@@_module_tl / unknown + \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } + } + { + \__kernel_msg_error:nnxx { kernel } { key-unknown } + { \l_keys_path_tl } { \l_@@_module_tl } + } } \cs_new:Npn \@@_execute:nn #1#2 { diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx index ca9935e58cc..5c5e0bc3c29 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx index bd180cd0af9..f4351fbf64e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx index 52374a5935e..8f43cdc6c62 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -774,6 +774,10 @@ \@@_primitive:NN \automatichyphenpenalty \tex_automatichyphenpenalty:D \@@_primitive:NN \begincsname \tex_begincsname:D + \@@_primitive:NN \bodydir \tex_bodydir:D + \@@_primitive:NN \bodydirection \tex_bodydirection:D + \@@_primitive:NN \boxdir \tex_boxdir:D + \@@_primitive:NN \boxdirection \tex_boxdirection:D \@@_primitive:NN \breakafterdirmode \tex_breakafterdirmode:D \@@_primitive:NN \catcodetable \tex_catcodetable:D \@@_primitive:NN \clearmarks \tex_clearmarks:D @@ -782,12 +786,14 @@ \tex_crampedscriptscriptstyle:D \@@_primitive:NN \crampedscriptstyle \tex_crampedscriptstyle:D \@@_primitive:NN \crampedtextstyle \tex_crampedtextstyle:D + \@@_primitive:NN \csstring \tex_csstring:D \@@_primitive:NN \directlua \tex_directlua:D \@@_primitive:NN \dviextension \tex_dviextension:D \@@_primitive:NN \dvifeedback \tex_dvifeedback:D \@@_primitive:NN \dvivariable \tex_dvivariable:D \@@_primitive:NN \etoksapp \tex_etoksapp:D \@@_primitive:NN \etokspre \tex_etokspre:D + \@@_primitive:NN \exceptionpenalty \tex_exceptionpenalty:D \@@_primitive:NN \explicithyphenpenalty \tex_explicithyphenpenalty:D \@@_primitive:NN \expanded \tex_expanded:D \@@_primitive:NN \explicitdiscretionary \tex_explicitdiscretionary:D @@ -800,16 +806,34 @@ \@@_primitive:NN \hyphenationmin \tex_hyphenationmin:D \@@_primitive:NN \hyphenpenaltymode \tex_hyphenpenaltymode:D \@@_primitive:NN \gleaders \tex_gleaders:D + \@@_primitive:NN \ifcondition \tex_ifcondition:D + \@@_primitive:NN \immediateassigned \tex_immediateassigned:D + \@@_primitive:NN \immediateassignment \tex_immediateassignment:D \@@_primitive:NN \initcatcodetable \tex_initcatcodetable:D \@@_primitive:NN \lastnamedcs \tex_lastnamedcs:D \@@_primitive:NN \latelua \tex_latelua:D + \@@_primitive:NN \lateluafunction \tex_lateluafunction:D + \@@_primitive:NN \leftghost \tex_leftghost:D \@@_primitive:NN \letcharcode \tex_letcharcode:D + \@@_primitive:NN \linedir \tex_linedir:D + \@@_primitive:NN \linedirection \tex_linedirection:D + \@@_primitive:NN \localbrokenpenalty \tex_localbrokenpenalty:D + \@@_primitive:NN \localinterlinepenalty \tex_localinterlinepenalty:D + \@@_primitive:NN \luabytecode \tex_luabytecode:D + \@@_primitive:NN \luabytecodecall \tex_luabytecodecall:D + \@@_primitive:NN \luacopyinputnodes \tex_luacopyinputnodes:D + \@@_primitive:NN \luadef \tex_luadef:D + \@@_primitive:NN \localleftbox \tex_localleftbox:D + \@@_primitive:NN \localrightbox \tex_localrightbox:D \@@_primitive:NN \luaescapestring \tex_luaescapestring:D \@@_primitive:NN \luafunction \tex_luafunction:D + \@@_primitive:NN \luafunctioncall \tex_luafunctioncall:D \@@_primitive:NN \luatexbanner \tex_luatexbanner:D \@@_primitive:NN \luatexrevision \tex_luatexrevision:D \@@_primitive:NN \luatexversion \tex_luatexversion:D \@@_primitive:NN \mathdelimitersmode \tex_mathdelimitersmode:D + \@@_primitive:NN \mathdir \tex_mathdir:D + \@@_primitive:NN \mathdirection \tex_mathdirection:D \@@_primitive:NN \mathdisplayskipmode \tex_mathdisplayskipmode:D \@@_primitive:NN \matheqnogapstep \tex_matheqnogapstep:D \@@_primitive:NN \mathnolimitsmode \tex_mathnolimitsmode:D @@ -818,6 +842,7 @@ \@@_primitive:NN \mathrulesfam \tex_mathrulesfam:D \@@_primitive:NN \mathscriptsmode \tex_mathscriptsmode:D \@@_primitive:NN \mathscriptboxmode \tex_mathscriptboxmode:D + \@@_primitive:NN \mathscriptcharmode \tex_mathscriptcharmode:D \@@_primitive:NN \mathstyle \tex_mathstyle:D \@@_primitive:NN \mathsurroundmode \tex_mathsurroundmode:D \@@_primitive:NN \mathsurroundskip \tex_mathsurroundskip:D @@ -828,9 +853,13 @@ \@@_primitive:NN \novrule \tex_novrule:D \@@_primitive:NN \outputbox \tex_outputbox:D \@@_primitive:NN \pagebottomoffset \tex_pagebottomoffset:D + \@@_primitive:NN \pagedir \tex_pagedir:D + \@@_primitive:NN \pagedirection \tex_pagedirection:D \@@_primitive:NN \pageleftoffset \tex_pageleftoffset:D \@@_primitive:NN \pagerightoffset \tex_pagerightoffset:D \@@_primitive:NN \pagetopoffset \tex_pagetopoffset:D + \@@_primitive:NN \pardir \tex_pardir:D + \@@_primitive:NN \pardirection \tex_pardirection:D \@@_primitive:NN \pdfextension \tex_pdfextension:D \@@_primitive:NN \pdffeedback \tex_pdffeedback:D \@@_primitive:NN \pdfvariable \tex_pdfvariable:D @@ -841,6 +870,7 @@ \@@_primitive:NN \preexhyphenchar \tex_preexhyphenchar:D \@@_primitive:NN \prehyphenchar \tex_prehyphenchar:D \@@_primitive:NN \prerelpenalty \tex_prerelpenalty:D + \@@_primitive:NN \rightghost \tex_rightghost:D \@@_primitive:NN \savecatcodetable \tex_savecatcodetable:D \@@_primitive:NN \scantextokens \tex_scantextokens:D \@@_primitive:NN \setfontid \tex_setfontid:D @@ -851,28 +881,13 @@ \@@_primitive:NN \suppressoutererror \tex_suppressoutererror:D \@@_primitive:NN \suppressprimitiveerror \tex_suppressprimitiveerror:D + \@@_primitive:NN \textdir \tex_textdir:D + \@@_primitive:NN \textdirection \tex_textdirection:D \@@_primitive:NN \toksapp \tex_toksapp:D \@@_primitive:NN \tokspre \tex_tokspre:D \@@_primitive:NN \tpack \tex_tpack:D \@@_primitive:NN \vpack \tex_vpack:D % \end{macrocode} -% These come from Omega/Aleph, but we do not support those engines and -% so list them here. -% \begin{macrocode} - \@@_primitive:NN \bodydir \tex_bodydir:D - \@@_primitive:NN \boxdir \tex_boxdir:D - \@@_primitive:NN \leftghost \tex_leftghost:D - \@@_primitive:NN \linedir \tex_linedir:D - \@@_primitive:NN \localbrokenpenalty \tex_localbrokenpenalty:D - \@@_primitive:NN \localinterlinepenalty \tex_localinterlinepenalty:D - \@@_primitive:NN \localleftbox \tex_localleftbox:D - \@@_primitive:NN \localrightbox \tex_localrightbox:D - \@@_primitive:NN \mathdir \tex_mathdir:D - \@@_primitive:NN \pagedir \tex_pagedir:D - \@@_primitive:NN \pardir \tex_pardir:D - \@@_primitive:NN \rightghost \tex_rightghost:D - \@@_primitive:NN \textdir \tex_textdir:D -% \end{macrocode} % Primitives from \pdfTeX{} that \LuaTeX{} renames. % \begin{macrocode} \@@_primitive:NN \adjustspacing \tex_adjustspacing:D diff --git a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx index eb1be68f173..4f0c27f31c0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx @@ -42,7 +42,7 @@ % } % % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index e936df28377..b00c6160f26 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx index 191c9e70157..4fad81c25c4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx index e649702601a..cde1625bb7b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx index d4eb2c4066c..66ed9ae168d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -114,23 +114,23 @@ % |\_.*?\_| where |.| matches arbitrary characters and the % lazy quantifier |*?| means to match as few characters as % possible, thus avoiding matching underscores. -% \item |[+-]?\d+| matches an explicit integer with at most one +% \item |[\+\-]?\d+| matches an explicit integer with at most one % sign. -% \item \verb*"[+\-\ ]*\d+\ *" matches an explicit integer with any +% \item \verb*"[\+\-\ ]*\d+\ *" matches an explicit integer with any % number of $+$ and $-$ signs, with spaces allowed except within the % mantissa, and surrounded by spaces. -% \item \verb*"[+\-\ ]*(\d+|\d*\.\d+)\ *" matches an explicit integer or +% \item \verb*"[\+\-\ ]*(\d+|\d*\.\d+)\ *" matches an explicit integer or % decimal number; using \verb*"[.,]" instead of \verb*"\." would allow % the comma as a decimal marker. % \item -% \verb*"[+\-\ ]*(\d+|\d*\.\d+)\ *((?i)pt|in|[cem]m|ex|[bs]p|[dn]d|[pcn]c)\ *" +% \verb*"[\+\-\ ]*(\d+|\d*\.\d+)\ *((?i)pt|in|[cem]m|ex|[bs]p|[dn]d|[pcn]c)\ *" % \allowbreak matches an explicit dimension with any unit that \TeX{} knows, where % \verb*"(?i)" means to treat lowercase and uppercase letters % identically. -% \item \verb*"[+\-\ ]*((?i)nan|inf|(\d+|\d*\.\d+)(\ *e[+-\ ]*\d+)?)\ *" +% \item \verb*"[\+\-\ ]*((?i)nan|inf|(\d+|\d*\.\d+)(\ *e[\+\-\ ]*\d+)?)\ *" % matches an explicit floating point number or the special values % \verb*"nan" and \verb*"inf" (with signs and spaces allowed). -% \item \verb*"[+\-\ ]*(\d+|\cC.)\ *" matches an explicit integer or +% \item \verb*"[\+\-\ ]*(\d+|\cC.)\ *" matches an explicit integer or % control sequence (without checking whether it is an integer % variable). % \item |\G.*?\K| at the beginning of a regular expression matches and @@ -141,7 +141,7 @@ % \cs{regex_extract_all:nnN}. % \end{itemize} % While it is impossible for a regular expression to match only integer -% expressions, \verb*"[+\-\(]*\d+\)*([+\-*/][+\-\(]*\d+\)*)*" matches among +% expressions, \verb*"[\+\-\(]*\d+\)*([\+\-*/][\+\-\(]*\d+\)*)*" matches among % other things all valid integer expressions (made only with explicit % integers). One should follow it with further testing. % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx index 5e590bd0c2d..b42a1bef8a2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx index 182427cb48a..5b129855e33 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx index b1f2b7eabe5..a38e58b54c2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx index af918d1d164..acb496f5c34 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx index a1d10f187c2..69a486f90fe 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx index 2b8048e6dc2..095b7cf25f4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx index fcd5084c318..3288659f861 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index 3188f7709d9..b5ed9de6bf9 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx index e154f1850ee..7d7b33f10aa 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx index 16702af9e43..9df257daa7e 100644 --- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx +++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx @@ -60,7 +60,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -131,7 +131,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3keys2e}{2018-08-23}{} +\ProvidesExplPackage{l3keys2e}{2018-09-24}{} {LaTeX2e option processing using LaTeX3 keys} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx index 9491f672954..32b7edaa0fd 100644 --- a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx @@ -62,7 +62,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -161,7 +161,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfp}{2018-08-23}{} +\ProvidesExplPackage{xfp}{2018-09-24}{} {L3 Floating point unit} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx index 2a1c9de876f..578c69b07c0 100644 --- a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -533,7 +533,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfrac}{2018-08-23}{} +\ProvidesExplPackage{xfrac}{2018-09-24}{} {L3 Experimental split-level fractions} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx index c9685d264d5..1e24d659fe7 100644 --- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx @@ -67,7 +67,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -818,7 +818,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xparse}{2018-08-23}{} +\ProvidesExplPackage{xparse}{2018-09-24}{} {L3 Experimental document command parser} % \end{macrocode} % @@ -953,6 +953,13 @@ % \end{macrocode} % \end{variable} % +% \begin{variable}{\l_@@_obey_spaces_bool} +% For trailing optionals. +% \begin{macrocode} +\bool_new:N \l_@@_obey_spaces_bool +% \end{macrocode} +% \end{variable} +% % \begin{variable}{\l_@@_last_delimiters_tl} % Holds the delimiters (first tokens) of all optional arguments since % the previous mandatory argument, to warn about cases where it would @@ -971,13 +978,6 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_ignore_spaces_bool} -% For trailing optionals. -% \begin{macrocode} -\bool_new:N \l_@@_ignore_spaces_bool -% \end{macrocode} -% \end{variable} -% % \begin{variable}{\l_@@_m_args_int} % The number of \texttt{m} arguments: if this is the same as the total % number of arguments, then a short-cut can be taken in the creation of @@ -1028,15 +1028,20 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_some_long_bool, \l_@@_some_short_bool} -% Both of these flags are set while normalizing the argument -% specification. To grab arguments expandably, all short arguments -% must appear before long arguments, so as soon as the first long -% argument is seen (other than \texttt{t}-type, whose long status is -% ignored) the \texttt{some_long} flag is set. The -% \texttt{some_short} flag is used for expandable commands, to know -% whether to define a short auxiliary too. -% \begin{macrocode} +% \begin{variable} +% {\l_@@_some_obey_spaces_bool, \l_@@_some_long_bool, \l_@@_some_short_bool} +% These flags are set while normalizing the argument specification. +% The \texttt{obey_spaces} one is used to detect when |!| is used on +% an argument that is not a trailing optional argument. +% The other two are used to check whether all short arguments appear +% before long arguments: this is needed to grab arguments expandably. +% As soon as the first long argument is seen (other than +% \texttt{t}-type, whose long status is ignored) the +% \texttt{some_long} flag is set. The \texttt{some_short} flag is +% used for expandable commands, to know whether to define a short +% auxiliary too. +% \begin{macrocode} +\bool_new:N \l_@@_some_obey_spaces_bool \bool_new:N \l_@@_some_long_bool \bool_new:N \l_@@_some_short_bool % \end{macrocode} @@ -1521,50 +1526,49 @@ % specification is valid before the main parsing run. If it is not % valid the entire set up is abandoned to avoid any strange internal % errors. A function is provided for each argument type that will grab -% any extra arguments and call the loop function. -% -% The first thing that is done in the loop is to check that the various -% argument types have the correct number of data items associated with -% them. The opportunity is also taken to make sure that where a single -% character is required, one has actually been supplied. -% -% The second is that processors and the marker~|+| for long arguments -% must be followed by arguments. -% -% The third is to check for forbidden types for expandable commands, -% namely \texttt{G}/\texttt{v} always, and \texttt{l}/\texttt{u} after -% optional arguments (\pkg{xparse} may have inserted braces due to a -% failed search for an optional argument). -% -% The fourth is that an optional argument should not be followed by a -% mandatory argument with the same delimiter, as otherwise the optional -% argument could never be omitted. -% -% The fifth is to keep track in \cs{l_@@_some_long_bool} and -% \cs{l_@@_some_short_bool} of whether the command has some long/short -% arguments. -% -% The sixth is to keep track in \cs{l_@@_grab_expandably_bool} of -% whether all arguments are \texttt{m}/\texttt{l}/\texttt{u} type and -% short arguments appear before long ones, in which case they can be -% grabbed expandably just as safely as they could be grabbed expandably. -% Regardless of that, arguments of expandable commands will be grabbed -% expandably and arguments of environments will not (because the list of -% arguments built by non-expandable grabbing is used to pass them to the -% end-environment code). -% -% The last is to count mandatory arguments, used later to detect which -% optional arguments are trailing. +% any extra data items and call the loop function after performing the +% following checks and tasks. +% \begin{itemize} +% \item Check that each argument has the correct number of data items +% associated with it, and that where a single character is required, +% one has actually been supplied. +% \item Check that processors and the markers~|+| and~|!| are followed +% by an argument for which they make sense, and are not redundant. +% \item Check the absence of forbidden types for expandable commands, +% namely \texttt{G}/\texttt{v} always, and \texttt{l}/\texttt{u} +% after optional arguments (\pkg{xparse} may have inserted braces +% due to a failed search for an optional argument). +% \item Check that no optional argument is followed by a mandatory +% argument with the same delimiter, as otherwise the optional +% argument could never be omitted. +% \item Keep track in \cs{l_@@_some_long_bool} and +% \cs{l_@@_some_short_bool} of whether the command has some +% long/short arguments. +% \item Keep track in \cs{l_@@_grab_expandably_bool} of whether all +% arguments are \texttt{m}/\texttt{l}/\texttt{u} type and short +% arguments appear before long ones, in which case they can be +% grabbed expandably just as safely as they could be grabbed +% nonexpandably. Regardless of that, arguments of expandable +% commands will be grabbed expandably and arguments of environments +% will not (because the list of arguments built by non-expandable +% grabbing is used to pass them to the end-environment code). +% \item Count mandatory arguments, used later to detect which optional +% arguments are trailing. +% \end{itemize} +% Further checks happen at the end of the loop: +% \begin{itemize} +% \item that there are at most $9$ arguments; +% \item that an expandable command does not end with an optional +% argument (this case is detected by using the fact that +% \cs{l_@@_last_delimiters_tl} is cleared by every mandatory argument +% and filled by every optional argument). +% \end{itemize} % % \begin{macro}{\@@_normalize_arg_spec:n} % \begin{macro}{\@@_normalize_arg_spec_loop:n} % Loop through the argument specification, calling an auxiliary % specific to each argument type. If any argument is unknown stop the -% definition. After the loop, if there are more than -% $9$ arguments, stop. Additionally, expandable commands may not end -% with an optional argument; this case is detected by using the fact -% that \cs{l_@@_last_delimiters_tl} is cleared by every mandatory -% argument and filled by every optional argument. +% definition. % \begin{macrocode} \cs_new_protected:Npn \@@_normalize_arg_spec:n #1 { @@ -1573,10 +1577,11 @@ \tl_clear:N \l_@@_last_delimiters_tl \tl_clear:N \l_@@_arg_spec_tl \bool_set_true:N \l_@@_grab_expandably_bool + \bool_set_false:N \l_@@_obey_spaces_bool \bool_set_false:N \l_@@_long_bool + \bool_set_false:N \l_@@_some_obey_spaces_bool \bool_set_false:N \l_@@_some_long_bool \bool_set_false:N \l_@@_some_short_bool - \bool_set_false:N \l_@@_ignore_spaces_bool \@@_normalize_arg_spec_loop:n #1 \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop \int_compare:nNnT \l_@@_current_arg_int > 9 @@ -1691,7 +1696,12 @@ \cs_new_protected:cpn { @@_normalize_type_+:w } #1 { \quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn } - \tl_put_right:Nn \l_@@_arg_spec_tl { + } + \bool_if:NT \l_@@_long_bool + { + \__kernel_msg_error:nnxx { xparse } { two-markers } + { \iow_char:N \\ \l_@@_function_tl } { + } + \@@_bad_def:wn + } \bool_set_true:N \l_@@_long_bool \int_decr:N \l_@@_current_arg_int \@@_normalize_arg_spec_loop:n {#1} @@ -1699,7 +1709,14 @@ \cs_new_protected:cpn { @@_normalize_type_!:w } #1 { \quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn } - \tl_put_right:Nn \l_@@_arg_spec_tl { ! } + \bool_if:NT \l_@@_obey_spaces_bool + { + \__kernel_msg_error:nnxx { xparse } { two-markers } + { \iow_char:N \\ \l_@@_function_tl } { ! } + \@@_bad_def:wn + } + \bool_set_true:N \l_@@_obey_spaces_bool + \bool_set_true:N \l_@@_some_obey_spaces_bool \int_decr:N \l_@@_current_arg_int \@@_normalize_arg_spec_loop:n {#1} } @@ -1770,9 +1787,14 @@ { \quark_if_recursion_tail_stop_do:Nn #1 { \@@_bad_arg_spec:wn } \@@_single_char_check:n {#1} - \tl_put_right:Nn \l_@@_arg_spec_tl { t #1 } + \tl_put_right:Nx \l_@@_arg_spec_tl + { + \bool_if:NT \l_@@_obey_spaces_bool { ! } + t \exp_not:n {#1} + } \tl_put_right:Nn \l_@@_last_delimiters_tl {#1} \bool_set_false:N \l_@@_grab_expandably_bool + \bool_set_false:N \l_@@_obey_spaces_bool \bool_set_false:N \l_@@_long_bool \@@_normalize_arg_spec_loop:n } @@ -1800,17 +1822,13 @@ \cs_new_protected:Npn \@@_normalize_type_l:w { \@@_normalize_check_lu:N l - \@@_add_arg_spec:n { l } - \int_incr:N \l_@@_mandatory_args_int - \tl_clear:N \l_@@_last_delimiters_tl + \@@_add_arg_spec_mandatory:n { l } \@@_normalize_arg_spec_loop:n } \cs_new_protected:Npn \@@_normalize_type_m:w { \@@_delimiter_check:nnn { } { m } { \iow_char:N \{ } - \@@_add_arg_spec:n { m } - \int_incr:N \l_@@_mandatory_args_int - \tl_clear:N \l_@@_last_delimiters_tl + \@@_add_arg_spec_mandatory:n { m } \@@_normalize_arg_spec_loop:n } \cs_new_protected:Npn \@@_normalize_type_R:w #1#2#3 @@ -1819,27 +1837,21 @@ \@@_single_char_check:n {#1} \@@_single_char_check:n {#2} \@@_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} } - \@@_add_arg_spec:n { R #1 #2 {#3} } - \int_incr:N \l_@@_mandatory_args_int - \tl_clear:N \l_@@_last_delimiters_tl \bool_set_false:N \l_@@_grab_expandably_bool + \@@_add_arg_spec_mandatory:n { R #1 #2 {#3} } \@@_normalize_arg_spec_loop:n } \cs_new_protected:Npn \@@_normalize_type_u:w #1 { \quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn } \@@_normalize_check_lu:N u - \@@_add_arg_spec:n { u {#1} } - \int_incr:N \l_@@_mandatory_args_int - \tl_clear:N \l_@@_last_delimiters_tl + \@@_add_arg_spec_mandatory:n { u {#1} } \@@_normalize_arg_spec_loop:n } \cs_new_protected:Npn \@@_normalize_type_v:w { \@@_normalize_check_gv:N v - \@@_add_arg_spec:n { v } - \int_incr:N \l_@@_mandatory_args_int - \tl_clear:N \l_@@_last_delimiters_tl + \@@_add_arg_spec_mandatory:n { v } \@@_normalize_arg_spec_loop:n } % \end{macrocode} @@ -1936,13 +1948,16 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_add_arg_spec:n} +% \begin{macro}{\@@_add_arg_spec:n, \@@_add_arg_spec_mandatory:n} % When adding an argument to the argument specification, set the % \texttt{some_long} or \texttt{some_short} booleans as appropriate -% and clear the boolean keeping track of whether the argument is long. +% and clear the booleans keeping track of |+| and |!| markers. % Before that, test for a short argument following some long % arguments: this is forbidden for expandable commands and prevents % grabbing arguments expandably. +% +% For mandatory arguments do some more work, in particular complain if +% they were preceeded by~|!|. % \begin{macrocode} \cs_new_protected:Npn \@@_add_arg_spec:n #1 { @@ -1961,8 +1976,26 @@ \bool_if:NTF \l_@@_long_bool { \bool_set_true:N \l_@@_some_long_bool } { \bool_set_true:N \l_@@_some_short_bool } + \tl_put_right:Nx \l_@@_arg_spec_tl + { + \bool_if:NT \l_@@_long_bool { + } + \bool_if:NT \l_@@_obey_spaces_bool { ! } + \exp_not:n {#1} + } \bool_set_false:N \l_@@_long_bool - \tl_put_right:Nn \l_@@_arg_spec_tl {#1} + \bool_set_false:N \l_@@_obey_spaces_bool + } +\cs_new_protected:Npn \@@_add_arg_spec_mandatory:n #1 + { + \bool_if:NT \l_@@_some_obey_spaces_bool + { + \__kernel_msg_error:nnxx { xparse } { non-trailing-obey-spaces } + { \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} } + \@@_bad_def:wn + } + \int_incr:N \l_@@_mandatory_args_int + \tl_clear:N \l_@@_last_delimiters_tl + \@@_add_arg_spec:n {#1} } % \end{macrocode} % \end{macro} @@ -1972,8 +2005,8 @@ % \begin{macro}{\@@_prepare_signature:n} % \begin{macro}{\@@_prepare_signature:N} % \begin{macro}{\@@_prepare_signature_bypass:N} -% Actually creating the signature uses the same loop approach as counting -% up mandatory arguments. There are first a number of variables which need +% Actually creating the signature uses the same loop approach as +% normalizing the signature. There are first a number of variables which need % to be set to track what is going on. Many of these variables are unused % when defining expandable commands. % \begin{macrocode} @@ -1981,7 +2014,7 @@ { \int_zero:N \l_@@_current_arg_int \bool_set_false:N \l_@@_long_bool - \bool_set_false:N \l_@@_ignore_spaces_bool + \bool_set_false:N \l_@@_obey_spaces_bool \int_zero:N \l_@@_m_args_int \bool_set_false:N \l_@@_defaults_bool \tl_clear:N \l_@@_defaults_tl @@ -2056,7 +2089,7 @@ \cs_new_protected:cpn { @@_add_type_!:w } { \@@_flush_m_args: - \bool_set_true:N \l_@@_ignore_spaces_bool + \bool_set_true:N \l_@@_obey_spaces_bool \bool_set_true:N \l_@@_prefixed_bool \@@_prepare_signature_bypass:N } @@ -2239,24 +2272,16 @@ % % \begin{macro}{\@@_add_grabber_mandatory:N} % \begin{macro}{\@@_add_grabber_optional:N} -% To keep the various checks needed in one place, adding the grabber to -% the signature is done here. For mandatory arguments, the only question -% is whether to add a long grabber. For optional arguments, there is -% also a check to see if any mandatory arguments are still to be added. -% This is used to determine whether to skip spaces or not when -% searching for the argument. +% To keep the various checks needed in one place, adding the grabber +% to the signature is done here. The only questions are whether the +% grabber should be long or not, and whether to obey spaces. The +% \cs{l_@@_obey_spaces_bool} boolean can only be \texttt{true} for +% trailing optional arguments. In that case spaces will not be +% ignored when looking for that optional argument. % \begin{macrocode} \cs_new_protected:Npn \@@_add_grabber_mandatory:N #1 { - \tl_put_right:Nx \l_@@_signature_tl - { - \exp_not:c - { @@_grab_ #1 \bool_if:NT \l_@@_long_bool { _long } :w } - } - \bool_set_false:N \l_@@_long_bool - \tl_put_right:Nx \l_@@_process_all_tl - { { \exp_not:o \l_@@_process_one_tl } } - \tl_clear:N \l_@@_process_one_tl + \@@_add_grabber_optional:N #1 \int_decr:N \l_@@_mandatory_args_int } \cs_new_protected:Npn \@@_add_grabber_optional:N #1 @@ -2267,15 +2292,12 @@ { @@_grab_ #1 \bool_if:NT \l_@@_long_bool { _long } - \bool_lazy_and:nnT - { \l_@@_ignore_spaces_bool } - { \int_compare_p:nNn \l_@@_mandatory_args_int = 0 } - { _ignore_spaces } + \bool_if:NT \l_@@_obey_spaces_bool { _obey_spaces } :w } } \bool_set_false:N \l_@@_long_bool - \bool_set_false:N \l_@@_ignore_spaces_bool + \bool_set_false:N \l_@@_obey_spaces_bool \tl_put_right:Nx \l_@@_process_all_tl { { \exp_not:o \l_@@_process_one_tl } } \tl_clear:N \l_@@_process_one_tl @@ -2573,28 +2595,34 @@ % % \begin{macro}{\@@_grab_D:w} % \begin{macro}{\@@_grab_D_long:w} -% \begin{macro}{\@@_grab_D_ignore_spaces:w} -% \begin{macro}{\@@_grab_D_long_ignore_spaces:w} +% \begin{macro}{\@@_grab_D_obey_spaces:w} +% \begin{macro}{\@@_grab_D_long_obey_spaces:w} % The generic delimited argument grabber. The auxiliary function does % a peek test before calling \cs{@@_grab_D_call:Nw}, so that the % optional nature of the argument works as expected. % \begin{macrocode} \cs_new_protected:Npn \@@_grab_D:w #1#2#3 \@@_run_code: { - \@@_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected_nopar:Npn - { _ignore_spaces } + \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \@@_peek_nonspace_remove:NTF } \cs_new_protected:Npn \@@_grab_D_long:w #1#2#3 \@@_run_code: { - \@@_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected:Npn - { _ignore_spaces } + \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn + \@@_peek_nonspace_remove:NTF + } +\cs_new_protected:Npn \@@_grab_D_obey_spaces:w #1#2#3 \@@_run_code: + { + \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \peek_meaning_remove:NTF + } +\cs_new_protected:Npn \@@_grab_D_long_obey_spaces:w #1#2#3 \@@_run_code: + { + \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn + \peek_meaning_remove:NTF } -\cs_new_protected:Npn \@@_grab_D_ignore_spaces:w #1#2#3 \@@_run_code: - { \@@_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected_nopar:Npn { } } -\cs_new_protected:Npn \@@_grab_D_long_ignore_spaces:w #1#2#3 \@@_run_code: - { \@@_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected:Npn { } } % \end{macrocode} -% \begin{macro}{\@@_grab_D_aux:NNnNn} +% \begin{macro}{\@@_grab_D_aux:NNnNN} % \begin{macro}{\@@_grab_D_aux:NNnN} % This is a bit complicated. The idea is that, in order to check for % nested optional argument tokens (\texttt{[[...]]} and so on) the @@ -2604,10 +2632,10 @@ % prevents loss of braces, and there is then a test to see if there are % nested delimiters to handle. % \begin{macrocode} -\cs_new_protected:Npn \@@_grab_D_aux:NNnNn #1#2#3#4#5 +\cs_new_protected:Npn \@@_grab_D_aux:NNnNN #1#2#3#4#5 { \@@_grab_D_aux:NNnN #1#2 {#3} #4 - \use:c { peek_meaning_remove #5 :NTF } #1 + #5 #1 { \@@_grab_D_call:Nw #1 } { \@@_add_arg:o \c_novalue_tl } } @@ -2743,36 +2771,36 @@ % \begin{macro} % { % \@@_grab_E:w, \@@_grab_E_long:w, -% \@@_grab_E_ignore_spaces:w, \@@_grab_E_long_ignore_spaces:w +% \@@_grab_E_obey_spaces:w, \@@_grab_E_long_obey_spaces:w % } -% \begin{macro}{\@@_grab_E:nnNn} -% \begin{macro}{\@@_grab_E_loop:nnN} +% \begin{macro}{\@@_grab_E:nnNN} +% \begin{macro}{\@@_grab_E_loop:NnN} % \begin{macro}{\@@_grab_E_finalise:} % Everything here needs to point to a loop. % \begin{macrocode} \cs_new_protected:Npn \@@_grab_E:w #1#2 \@@_run_code: { - \@@_grab_E:nnNn {#1} {#2} + \@@_grab_E:nnNN {#1} {#2} \cs_set_protected_nopar:Npn - { _ignore_spaces } + \@@_peek_nonspace_remove:NTF } \cs_new_protected:Npn \@@_grab_E_long:w #1#2 \@@_run_code: { - \@@_grab_E:nnNn {#1} {#2} + \@@_grab_E:nnNN {#1} {#2} \cs_set_protected:Npn - { _ignore_spaces } + \@@_peek_nonspace_remove:NTF } -\cs_new_protected:Npn \@@_grab_E_ignore_spaces:w #1#2 \@@_run_code: +\cs_new_protected:Npn \@@_grab_E_obey_spaces:w #1#2 \@@_run_code: { - \@@_grab_E:nnNn {#1} {#2} + \@@_grab_E:nnNN {#1} {#2} \cs_set_protected_nopar:Npn - { } + \peek_meaning_remove:NTF } -\cs_new_protected:Npn \@@_grab_E_long_ignore_spaces:w #1#2 \@@_run_code: +\cs_new_protected:Npn \@@_grab_E_long_obey_spaces:w #1#2 \@@_run_code: { - \@@_grab_E:nnNn {#1} {#2} + \@@_grab_E:nnNN {#1} {#2} \cs_set_protected:Npn - { } + \peek_meaning_remove:NTF } % \end{macrocode} % A loop is needed here to allow a random ordering of keys. These are @@ -2780,12 +2808,12 @@ % they can appear later. The grabbed values are held in a property list % which is then turned into an ordered list to be passed back to the user. % \begin{macrocode} -\cs_new_protected:Npn \@@_grab_E:nnNn #1#2#3#4 +\cs_new_protected:Npn \@@_grab_E:nnNN #1#2#3#4 { \exp_after:wN #3 \l_@@_fn_tl ##1##2##3 { \prop_put:Nnn \l_@@_tmp_prop {##1} {##3} - \@@_grab_E_loop:nnN {#4} { } ##2 \q_recursion_stop + \@@_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop } \prop_clear:N \l_@@_tmp_prop \tl_set:Nn \l_@@_signature_tl {#2} @@ -2800,16 +2828,16 @@ } \l_@@_signature_tl \@@_run_code: } - \@@_grab_E_loop:nnN {#4} { } #1 \q_recursion_tail \q_recursion_stop + \@@_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop } -\cs_new_protected:Npn \@@_grab_E_loop:nnN #1#2#3#4 \q_recursion_stop +\cs_new_protected:Npn \@@_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop { \cs_if_eq:NNTF #3 \q_recursion_tail { \@@_grab_E_finalise: } { - \use:c { peek_meaning_remove #1 :NTF } #3 + #1 #3 { \l_@@_fn_tl #3 {#2#4} } - { \@@_grab_E_loop:nnN {#1} {#2#3} #4 \q_recursion_stop } + { \@@_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop } } } \cs_new_protected:Npn \@@_grab_E_finalise: { } @@ -2821,31 +2849,38 @@ % % \begin{macro}{\@@_grab_G:w} % \begin{macro}{\@@_grab_G_long:w} -% \begin{macro}{\@@_grab_G_ignore_spaces:w} -% \begin{macro}{\@@_grab_G_long_ignore_spaces:w} -% \begin{macro}{\@@_grab_G_aux:nNn} +% \begin{macro}{\@@_grab_G_obey_spaces:w} +% \begin{macro}{\@@_grab_G_long_obey_spaces:w} +% \begin{macro}{\@@_grab_G_aux:nNN} % Optional groups are checked by meaning, so that the same code will % work with, for example, \ConTeXt{}-like input. % \begin{macrocode} \cs_new_protected:Npn \@@_grab_G:w #1 \@@_run_code: { - \@@_grab_G_aux:nNn {#1} \cs_set_protected_nopar:Npn - { _ignore_spaces } + \@@_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn + \@@_peek_nonspace:NTF } \cs_new_protected:Npn \@@_grab_G_long:w #1 \@@_run_code: { - \@@_grab_G_aux:nNn {#1} \cs_set_protected:Npn { _ignore_spaces } + \@@_grab_G_aux:nNN {#1} \cs_set_protected:Npn + \@@_peek_nonspace:NTF + } +\cs_new_protected:Npn \@@_grab_G_obey_spaces:w #1 \@@_run_code: + { + \@@_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn + \peek_meaning:NTF } -\cs_new_protected:Npn \@@_grab_G_ignore_spaces:w #1 \@@_run_code: - { \@@_grab_G_aux:nNn {#1} \cs_set_protected_nopar:Npn { } } -\cs_new_protected:Npn \@@_grab_G_long_ignore_spaces:w #1 \@@_run_code: - { \@@_grab_G_aux:nNn {#1} \cs_set_protected:Npn { } } -\cs_new_protected:Npn \@@_grab_G_aux:nNn #1#2#3 +\cs_new_protected:Npn \@@_grab_G_long_obey_spaces:w #1 \@@_run_code: + { + \@@_grab_G_aux:nNN {#1} \cs_set_protected:Npn + \peek_meaning:NTF + } +\cs_new_protected:Npn \@@_grab_G_aux:nNN #1#2#3 { \tl_set:Nn \l_@@_signature_tl {#1} \exp_after:wN #2 \l_@@_fn_tl ##1 { \@@_add_arg:n {##1} } - \use:c { peek_meaning #3 :NTF } \c_group_begin_token + #3 \c_group_begin_token { \l_@@_fn_tl } { \@@_add_arg:o \c_novalue_tl } } @@ -2998,7 +3033,7 @@ \cs_new_protected:Npn \@@_grab_R_aux:NNnN #1#2#3#4 { \@@_grab_D_aux:NNnN #1 #2 {#3} #4 - \peek_meaning_remove_ignore_spaces:NTF #1 + \@@_peek_nonspace_remove:NTF #1 { \@@_grab_D_call:Nw #1 } { \__kernel_msg_error:nnxx { xparse } { missing-required } @@ -3012,19 +3047,15 @@ % \end{macro} % % \begin{macro}{\@@_grab_t:w} -% \begin{macro}{\@@_grab_t_long:w} -% \begin{macro}{\@@_grab_t_ignore_spaces:w} -% \begin{macro}{\@@_grab_t_long_ignore_spaces:w} +% \begin{macro}{\@@_grab_t_obey_spaces:w} % \begin{macro}{\@@_grab_t_aux:NNw} % Dealing with a token is quite easy. Check the match, remove the % token if needed and add a flag to the output. % \begin{macrocode} \cs_new_protected:Npn \@@_grab_t:w - { \@@_grab_t_aux:NNw \peek_meaning_remove_ignore_spaces:NTF } -\cs_new_eq:NN \@@_grab_t_long:w \@@_grab_t:w -\cs_new_protected:Npn \@@_grab_t_ignore_spaces:w + { \@@_grab_t_aux:NNw \@@_peek_nonspace_remove:NTF } +\cs_new_protected:Npn \@@_grab_t_obey_spaces:w { \@@_grab_t_aux:NNw \peek_meaning_remove:NTF } -\cs_new_eq:NN \@@_grab_t_long_ignore_spaces:w \@@_grab_t_ignore_spaces:w \cs_new_protected:Npn \@@_grab_t_aux:NNw #1#2#3 \@@_run_code: { \tl_set:Nn \l_@@_signature_tl {#3} @@ -3040,8 +3071,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} % % \begin{macro}{\@@_grab_u:w} % \begin{macro}{\@@_grab_u_long:w} @@ -4066,6 +4095,23 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\@@_peek_nonspace:NTF, \@@_peek_nonspace_remove:NTF, \@@_peek_nonspace_aux:nNNTF} +% Collect spaces in a loop, and put the collected spaces back in the +% false branch of a call to \cs{peek_meaning:NTF} or +% \cs{peek_meaning_remove:NTF}. +% \begin{macrocode} +\cs_new_protected:Npn \@@_peek_nonspace:NTF + { \@@_peek_nonspace_aux:nNNTF { } \peek_meaning:NTF } +\cs_new_protected:Npn \@@_peek_nonspace_remove:NTF + { \@@_peek_nonspace_aux:nNNTF { } \peek_meaning_remove:NTF } +\cs_new_protected:Npn \@@_peek_nonspace_aux:nNNTF #1#2#3#4#5 + { + \peek_meaning_remove:NTF \c_space_token + { \@@_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} } + { #2 #3 { #4 } { #5 #1 } } + } +% \end{macro} +% % \subsection{Messages} % % Some messages intended as errors. @@ -4158,6 +4204,13 @@ The~current~command~'#1'~expects~an~argument~starting~with~'#2'.~ LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed. } +\__kernel_msg_new:nnnn { xparse } { non-trailing-obey-spaces } + { Prefix~'!'~used~before~mandatory~argument~'#2'~of~command~'#1'. } + { + The~prefix~'!'~can~only~apply~to~trailing~optional~arguments. + \\ \\ + LaTeX~will~ignore~this~entire~definition. + } \__kernel_msg_new:nnnn { xparse } { non-xparse-command } { Command~'#1'~not~defined~using~xparse. } { @@ -4219,6 +4272,12 @@ This~cannot~be~implemented. \\ \\ LaTeX~will~ignore~this~entire~definition. } +\__kernel_msg_new:nnnn { xparse } { two-markers } + { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~command~'#1'. } + { + The~argument~specification~provided~has~two~markers~'#2'~applying~ + to~the~same~argument;~these~are~redundant. + } \__kernel_msg_new:nnnn { xparse } { unknown-argument-type } { Unknown~argument~type~'#2'~for~the~command~'#1'. } { diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx index 182e8be40f8..d0f69f40172 100644 --- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % % \maketitle % @@ -682,7 +682,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xtemplate}{2018-08-23}{} +\ProvidesExplPackage{xtemplate}{2018-09-24}{} {L3 Experimental prototype document functions} % \end{macrocode} % diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index ee3ce0a28f8..cf7dd09bf49 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -63,7 +63,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018-08-23}% +\def\ExplFileDate{2018-09-24}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -961,6 +961,10 @@ \__kernel_primitive:NN \automatichyphenpenalty \tex_automatichyphenpenalty:D \__kernel_primitive:NN \begincsname \tex_begincsname:D + \__kernel_primitive:NN \bodydir \tex_bodydir:D + \__kernel_primitive:NN \bodydirection \tex_bodydirection:D + \__kernel_primitive:NN \boxdir \tex_boxdir:D + \__kernel_primitive:NN \boxdirection \tex_boxdirection:D \__kernel_primitive:NN \breakafterdirmode \tex_breakafterdirmode:D \__kernel_primitive:NN \catcodetable \tex_catcodetable:D \__kernel_primitive:NN \clearmarks \tex_clearmarks:D @@ -969,12 +973,14 @@ \tex_crampedscriptscriptstyle:D \__kernel_primitive:NN \crampedscriptstyle \tex_crampedscriptstyle:D \__kernel_primitive:NN \crampedtextstyle \tex_crampedtextstyle:D + \__kernel_primitive:NN \csstring \tex_csstring:D \__kernel_primitive:NN \directlua \tex_directlua:D \__kernel_primitive:NN \dviextension \tex_dviextension:D \__kernel_primitive:NN \dvifeedback \tex_dvifeedback:D \__kernel_primitive:NN \dvivariable \tex_dvivariable:D \__kernel_primitive:NN \etoksapp \tex_etoksapp:D \__kernel_primitive:NN \etokspre \tex_etokspre:D + \__kernel_primitive:NN \exceptionpenalty \tex_exceptionpenalty:D \__kernel_primitive:NN \explicithyphenpenalty \tex_explicithyphenpenalty:D \__kernel_primitive:NN \expanded \tex_expanded:D \__kernel_primitive:NN \explicitdiscretionary \tex_explicitdiscretionary:D @@ -987,16 +993,34 @@ \__kernel_primitive:NN \hyphenationmin \tex_hyphenationmin:D \__kernel_primitive:NN \hyphenpenaltymode \tex_hyphenpenaltymode:D \__kernel_primitive:NN \gleaders \tex_gleaders:D + \__kernel_primitive:NN \ifcondition \tex_ifcondition:D + \__kernel_primitive:NN \immediateassigned \tex_immediateassigned:D + \__kernel_primitive:NN \immediateassignment \tex_immediateassignment:D \__kernel_primitive:NN \initcatcodetable \tex_initcatcodetable:D \__kernel_primitive:NN \lastnamedcs \tex_lastnamedcs:D \__kernel_primitive:NN \latelua \tex_latelua:D + \__kernel_primitive:NN \lateluafunction \tex_lateluafunction:D + \__kernel_primitive:NN \leftghost \tex_leftghost:D \__kernel_primitive:NN \letcharcode \tex_letcharcode:D + \__kernel_primitive:NN \linedir \tex_linedir:D + \__kernel_primitive:NN \linedirection \tex_linedirection:D + \__kernel_primitive:NN \localbrokenpenalty \tex_localbrokenpenalty:D + \__kernel_primitive:NN \localinterlinepenalty \tex_localinterlinepenalty:D + \__kernel_primitive:NN \luabytecode \tex_luabytecode:D + \__kernel_primitive:NN \luabytecodecall \tex_luabytecodecall:D + \__kernel_primitive:NN \luacopyinputnodes \tex_luacopyinputnodes:D + \__kernel_primitive:NN \luadef \tex_luadef:D + \__kernel_primitive:NN \localleftbox \tex_localleftbox:D + \__kernel_primitive:NN \localrightbox \tex_localrightbox:D \__kernel_primitive:NN \luaescapestring \tex_luaescapestring:D \__kernel_primitive:NN \luafunction \tex_luafunction:D + \__kernel_primitive:NN \luafunctioncall \tex_luafunctioncall:D \__kernel_primitive:NN \luatexbanner \tex_luatexbanner:D \__kernel_primitive:NN \luatexrevision \tex_luatexrevision:D \__kernel_primitive:NN \luatexversion \tex_luatexversion:D \__kernel_primitive:NN \mathdelimitersmode \tex_mathdelimitersmode:D + \__kernel_primitive:NN \mathdir \tex_mathdir:D + \__kernel_primitive:NN \mathdirection \tex_mathdirection:D \__kernel_primitive:NN \mathdisplayskipmode \tex_mathdisplayskipmode:D \__kernel_primitive:NN \matheqnogapstep \tex_matheqnogapstep:D \__kernel_primitive:NN \mathnolimitsmode \tex_mathnolimitsmode:D @@ -1005,6 +1029,7 @@ \__kernel_primitive:NN \mathrulesfam \tex_mathrulesfam:D \__kernel_primitive:NN \mathscriptsmode \tex_mathscriptsmode:D \__kernel_primitive:NN \mathscriptboxmode \tex_mathscriptboxmode:D + \__kernel_primitive:NN \mathscriptcharmode \tex_mathscriptcharmode:D \__kernel_primitive:NN \mathstyle \tex_mathstyle:D \__kernel_primitive:NN \mathsurroundmode \tex_mathsurroundmode:D \__kernel_primitive:NN \mathsurroundskip \tex_mathsurroundskip:D @@ -1015,9 +1040,13 @@ \__kernel_primitive:NN \novrule \tex_novrule:D \__kernel_primitive:NN \outputbox \tex_outputbox:D \__kernel_primitive:NN \pagebottomoffset \tex_pagebottomoffset:D + \__kernel_primitive:NN \pagedir \tex_pagedir:D + \__kernel_primitive:NN \pagedirection \tex_pagedirection:D \__kernel_primitive:NN \pageleftoffset \tex_pageleftoffset:D \__kernel_primitive:NN \pagerightoffset \tex_pagerightoffset:D \__kernel_primitive:NN \pagetopoffset \tex_pagetopoffset:D + \__kernel_primitive:NN \pardir \tex_pardir:D + \__kernel_primitive:NN \pardirection \tex_pardirection:D \__kernel_primitive:NN \pdfextension \tex_pdfextension:D \__kernel_primitive:NN \pdffeedback \tex_pdffeedback:D \__kernel_primitive:NN \pdfvariable \tex_pdfvariable:D @@ -1028,6 +1057,7 @@ \__kernel_primitive:NN \preexhyphenchar \tex_preexhyphenchar:D \__kernel_primitive:NN \prehyphenchar \tex_prehyphenchar:D \__kernel_primitive:NN \prerelpenalty \tex_prerelpenalty:D + \__kernel_primitive:NN \rightghost \tex_rightghost:D \__kernel_primitive:NN \savecatcodetable \tex_savecatcodetable:D \__kernel_primitive:NN \scantextokens \tex_scantextokens:D \__kernel_primitive:NN \setfontid \tex_setfontid:D @@ -1038,23 +1068,12 @@ \__kernel_primitive:NN \suppressoutererror \tex_suppressoutererror:D \__kernel_primitive:NN \suppressprimitiveerror \tex_suppressprimitiveerror:D + \__kernel_primitive:NN \textdir \tex_textdir:D + \__kernel_primitive:NN \textdirection \tex_textdirection:D \__kernel_primitive:NN \toksapp \tex_toksapp:D \__kernel_primitive:NN \tokspre \tex_tokspre:D \__kernel_primitive:NN \tpack \tex_tpack:D \__kernel_primitive:NN \vpack \tex_vpack:D - \__kernel_primitive:NN \bodydir \tex_bodydir:D - \__kernel_primitive:NN \boxdir \tex_boxdir:D - \__kernel_primitive:NN \leftghost \tex_leftghost:D - \__kernel_primitive:NN \linedir \tex_linedir:D - \__kernel_primitive:NN \localbrokenpenalty \tex_localbrokenpenalty:D - \__kernel_primitive:NN \localinterlinepenalty \tex_localinterlinepenalty:D - \__kernel_primitive:NN \localleftbox \tex_localleftbox:D - \__kernel_primitive:NN \localrightbox \tex_localrightbox:D - \__kernel_primitive:NN \mathdir \tex_mathdir:D - \__kernel_primitive:NN \pagedir \tex_pagedir:D - \__kernel_primitive:NN \pardir \tex_pardir:D - \__kernel_primitive:NN \rightghost \tex_rightghost:D - \__kernel_primitive:NN \textdir \tex_textdir:D \__kernel_primitive:NN \adjustspacing \tex_adjustspacing:D \__kernel_primitive:NN \copyfont \tex_copyfont:D \__kernel_primitive:NN \draftmode \tex_draftmode:D @@ -10130,6 +10149,7 @@ \cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnn { nnff } \cs_generate_variant:Nn \__kernel_msg_expandable_error:nnn { nnf } %% File: l3file.dtx Copyright (C) 1990-2018 The LaTeX3 Project +\tl_new:N \l__ior_internal_tl \int_const:Nn \c_term_ior { 16 } \seq_new:N \g__ior_streams_seq \tl_new:N \l__ior_stream_tl @@ -10268,7 +10288,6 @@ \__ior_map_inline_loop:NNN #1#2#3 } } -\tl_new:N \l__ior_internal_tl \int_const:Nn \c_log_iow { -1 } \int_const:Nn \c_term_iow { @@ -10665,6 +10684,7 @@ { \tl_if_empty:NF #1 { \exp_after:wN \__iow_wrap_trim:w #1 \q_stop } } \exp_last_unbraced:NNNNo \cs_new:Npn \__iow_wrap_trim:w #1 \c_catcode_other_space_tl \q_stop {#1} +\tl_new:N \l__file_internal_tl \ior_new:N \g__file_internal_ior \str_new:N \g_file_curr_dir_str \str_new:N \g_file_curr_ext_str @@ -10694,7 +10714,6 @@ { \exp_after:wN \__file_tmp:w \@currnamestack } \group_end: \seq_new:N \g__file_record_seq -\tl_new:N \l__file_tmp_tl \str_new:N \l__file_base_name_str \str_new:N \l__file_full_name_str \str_new:N \l__file_dir_str @@ -10707,14 +10726,14 @@ \group_begin: \seq_map_inline:Nn \l_char_active_seq { - \tl_set:Nx \l__file_tmp_tl { \iow_char:N ##1 } - \char_set_active_eq:NN ##1 \l__file_tmp_tl + \tl_set:Nx \l__file_internal_tl { \iow_char:N ##1 } + \char_set_active_eq:NN ##1 \l__file_internal_tl } - \tl_set:Nx \l__file_tmp_tl {#1} - \tl_set:Nx \l__file_tmp_tl - { \tl_to_str:N \l__file_tmp_tl } + \tl_set:Nx \l__file_internal_tl {#1} + \tl_set:Nx \l__file_internal_tl + { \tl_to_str:N \l__file_internal_tl } \exp_args:NNNV \group_end: - \str_set:Nn #2 \l__file_tmp_tl + \str_set:Nn #2 \l__file_internal_tl } \cs_new_protected:Npn \__file_name_quote:nN #1#2 { @@ -10815,8 +10834,8 @@ \cs_new_eq:NN \__kernel_file_input_push:n \__file_input_push:n \cs_new_protected:Npn \__file_input_pop: { - \seq_gpop:NN \g__file_stack_seq \l__file_tmp_tl - \exp_after:wN \__file_input_pop:nnn \l__file_tmp_tl + \seq_gpop:NN \g__file_stack_seq \l__file_internal_tl + \exp_after:wN \__file_input_pop:nnn \l__file_internal_tl } \cs_new_eq:NN \__kernel_file_input_pop: \__file_input_pop: \cs_new_protected:Npn \__file_input_pop:nnn #1#2#3 @@ -12371,42 +12390,45 @@ \cs:w \c__keys_code_root_tl \l_keys_path_tl \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } } - { \__keys_execute_unknown: } - } -\cs_new_protected:Npn \__keys_execute_unknown: - { - \bool_if:NTF \l__keys_only_known_bool - { \__keys_store_unused: } { - \cs_if_exist:cTF - { \c__keys_inherit_root_tl \__keys_parent:o \l_keys_path_tl } + \bool_if:NTF \l__keys_only_known_bool + { \__keys_store_unused: } { - \clist_map_inline:cn + \cs_if_exist:cTF { \c__keys_inherit_root_tl \__keys_parent:o \l_keys_path_tl } - { - \cs_if_exist:cT - { \c__keys_code_root_tl ##1 / \l_keys_key_tl } - { - \cs:w \c__keys_code_root_tl ##1 / \l_keys_key_tl - \exp_after:wN \cs_end: \exp_after:wN - { \l_keys_value_tl } - \clist_map_break: - } - } + { \__keys_execute_inherit: } + { \__keys_execute_unknown: } } + } + } +\cs_new_protected:Npn \__keys_execute_inherit: + { + \clist_map_inline:cn + { \c__keys_inherit_root_tl \__keys_parent:o \l_keys_path_tl } + { + \cs_if_exist:cT + { \c__keys_code_root_tl ##1 / \l_keys_key_tl } { - \cs_if_exist:cTF - { \c__keys_code_root_tl \l__keys_module_tl / unknown } - { - \cs:w \c__keys_code_root_tl \l__keys_module_tl / unknown - \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } - } - { - \__kernel_msg_error:nnxx { kernel } { key-unknown } - { \l_keys_path_tl } { \l__keys_module_tl } - } + \cs:w \c__keys_code_root_tl ##1 / \l_keys_key_tl + \exp_after:wN \cs_end: \exp_after:wN + { \l_keys_value_tl } + \clist_map_break:n { \use_none:n } } - } + } + \__keys_execute_unknown: + } +\cs_new_protected:Npn \__keys_execute_unknown: + { + \cs_if_exist:cTF + { \c__keys_code_root_tl \l__keys_module_tl / unknown } + { + \cs:w \c__keys_code_root_tl \l__keys_module_tl / unknown + \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } + } + { + \__kernel_msg_error:nnxx { kernel } { key-unknown } + { \l_keys_path_tl } { \l__keys_module_tl } + } } \cs_new:Npn \__keys_execute:nn #1#2 { @@ -24737,18 +24759,11 @@ \group_end: } %% File: l3candidates.dtx Copyright (C) 2012-2018 The LaTeX3 Project -\cs_new_protected:Npx \mode_leave_vertical: +\cs_new_protected:Npn \mode_leave_vertical: { - \cs_if_exist:NTF \tex_quitvmode:D - { \tex_quitvmode:D } - { - \exp_not:n - { - \if_mode_vertical: - \exp_after:wN \tex_indent:D - \fi: - } - } + \if_mode_vertical: + \exp_after:wN \tex_indent:D + \fi: } \cs_new_protected:Npn \box_clip:N #1 { \hbox_set:Nn #1 { \driver_box_use_clip:N #1 } } @@ -27014,6 +27029,53 @@ { \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: } \cs_new_protected:Npn \peek_N_type:F { \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: } +\tl_new:N \l__peek_collect_tl +\cs_new_protected:Npn \peek_catcode_collect_inline:Nn + { \__peek_collect:NNn \__peek_execute_branches_catcode: } +\cs_new_protected:Npn \peek_charcode_collect_inline:Nn + { \__peek_collect:NNn \__peek_execute_branches_charcode: } +\cs_new_protected:Npn \peek_meaning_collect_inline:Nn + { \__peek_collect:NNn \__peek_execute_branches_meaning: } +\cs_new_protected:Npn \__peek_collect:NNn #1#2#3 + { + \group_align_safe_begin: + \cs_set_eq:NN \l__peek_search_token #2 + \tl_set:Nn \l__peek_search_tl {#2} + \tl_clear:N \l__peek_collect_tl + \cs_set:Npn \__peek_false:w + { \exp_args:No \__peek_false_aux:n \l__peek_collect_tl } + \cs_set:Npn \__peek_false_aux:n ##1 + { + \group_align_safe_end: + #3 + } + \cs_set_eq:NN \__peek_true:w \__peek_collect_true:w + \cs_set:Npn \__peek_true_aux:w { \peek_after:Nw #1 } + \__peek_true_aux:w + } +\cs_new_protected:Npn \__peek_collect_true:w + { + \if_case:w + \if_catcode:w \exp_not:N \l_peek_token { 1 \exp_stop_f: \fi: + \if_catcode:w \exp_not:N \l_peek_token } 2 \exp_stop_f: \fi: + \if_meaning:w \l_peek_token \c_space_token 3 \exp_stop_f: \fi: + 0 \exp_stop_f: + \exp_after:wN \__peek_collect:N + \or: \__peek_collect_remove:nw { \c_group_begin_token } + \or: \__peek_collect_remove:nw { \c_group_end_token } + \or: \__peek_collect_remove:nw { ~ } + \fi: + } +\cs_new_protected:Npn \__peek_collect:N #1 + { + \tl_put_right:Nn \l__peek_collect_tl {#1} + \__peek_true_aux:w + } +\cs_new_protected:Npn \__peek_collect_remove:nw #1 + { + \tl_put_right:Nn \l__peek_collect_tl {#1} + \exp_after:wN \__peek_true_remove:w + } %% File: l3deprecation.dtx (C) Copyright 2017-2018 The LaTeX3 Project \cs_new_protected:Npn \__kernel_deprecation_error:Nnn #1#2#3 { diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 373507a4c79..f2b84f74d19 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018-08-23}% +\def\ExplFileDate{2018-09-24}% \let\ExplLoaderFileDate\ExplFileDate \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 6c3b94acfda..5252ad1cbe0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx Copyright (C) 1990-2018 The LaTeX3 Project -\def\ExplFileDate{2018-08-23}% +\def\ExplFileDate{2018-09-24}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 3247d6f568c..f796c9937a9 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -57,6 +57,8 @@ \bool_new:N \g__codedoc_checkfunc_bool \bool_new:N \g__codedoc_checktest_bool \bool_new:N \g__codedoc_kernel_bool +\bool_new:N \g__codedoc_cs_break_bool +\bool_gset_true:N \g__codedoc_cs_break_bool \tl_new:N \l__codedoc_tmpa_tl \tl_new:N \l__codedoc_tmpb_tl \int_new:N \l__codedoc_tmpa_int @@ -416,6 +418,10 @@ { \bool_gset_false:N \g__codedoc_lmodern_bool } \DeclareOption { lm-default } { \bool_gset_true:N \g__codedoc_lmodern_bool } +\DeclareOption { cs-break-off } + { \bool_gset_false:N \g__codedoc_cs_break_bool } +\DeclareOption { cs-break-nohyphen } + { \PassOptionsToPackage{nohyphen}{underscore} } \DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } } \ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default } \PassOptionsToClass { a4paper } { article } @@ -446,9 +452,9 @@ pifont, textcomp, trace, - underscore, csquotes, fancyvrb, + underscore, verbatim } \raggedbottom @@ -686,18 +692,23 @@ \tl_replace_all:Nno \l__codedoc_cmd_tl { _ } \l__codedoc_tmpb_tl } \mode_if_math:T { \mbox } - { - \verbatim@font - \__codedoc_if_almost_str:VT \l__codedoc_cmd_tl - { - \tl_set:Nx \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl } - \tl_replace_all:Non \l__codedoc_cmd_tl - { \token_to_str:N _ } { \_ } - } - \tl_replace_all:Nnn \l__codedoc_cmd_tl { ~ } { \@xobeysp } - \l__codedoc_cmd_tl - \@ - } + { + \verbatim@font + \__codedoc_if_almost_str:VT \l__codedoc_cmd_tl + { + \tl_set:Nx \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl } + \bool_if:NT \g__codedoc_cs_break_bool + { + \regex_replace_all:nnN + {([^\\])_([^\_])} + {\1\c{BreakableUnderscore}\2} + \l__codedoc_cmd_tl + } + } + \tl_replace_all:Nnn \l__codedoc_cmd_tl { ~ } { \@xobeysp } + \l__codedoc_cmd_tl + \@ + } \bool_if:NF \l__codedoc_cmd_noindex_bool { \quark_if_no_value:NF \l__codedoc_cmd_index_tl diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def index e4dc5a16b41..cf97021907a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvidpfmx.def}{2018-08-23}{} + {l3dvidpfmx.def}{2018-09-24}{} {L3 Experimental driver: dvipdfmx} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 @@ -68,7 +68,7 @@ { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } } \cs_new_protected:Npn \driver_color_spot:nn #1#2 - { \__driver_color_select:n { \c_space_tl #1 } } + { \__driver_color_select:n { #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { \__driver_literal:n { color~push~ #1 } @@ -208,6 +208,59 @@ } } } +\int_new:N \g__driver_pdf_object_int +\prop_new:N \g__driver_pdf_object_prop +\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2 + { + \int_gincr:N \g__driver_pdf_object_int + \int_const:cn + { g__driver_pdf_object_ \tl_to_str:n {#1} _int } + { \g__driver_pdf_object_int } + \prop_gput:Nnn \g__driver_pdf_object_prop {#1} {#2} + } +\cs_new:Npn \driver_pdf_object_ref:n #1 + { @l3obj \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } } +\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 + { + \exp_args:Nx \__driver_pdf_object_write:nnn + { \prop_item:Nn \g__driver_pdf_object_prop {#1} } {#1} {#2} + } +\cs_new_protected:Npn \__driver_pdf_object_write:nnn #1#2#3 + { \use:c { __driver_pdf_object_write_ #1 :nn } {#2} {#3} } +\cs_new_protected:Npn \__driver_pdf_object_write_array:nn #1#2 + { + \__driver_literal:x + { + pdf:obj ~ \driver_pdf_object_ref:n {#1} ~ + [ ~ \exp_not:n {#2} ~ ] + } + } +\cs_new_protected:Npn \__driver_pdf_object_write_dict:nn #1#2 + { + \__driver_literal:x + { + pdf:obj ~ \driver_pdf_object_ref:n {#1} ~ + << ~ \exp_not:n {#2} ~ >> + } + } +\cs_new_protected:Npn \__driver_pdf_object_write_fstream:nn #1#2 + { \__driver_pdf_object_write_stream:nnnn { f } {#1} #2 } +\cs_new_protected:Npn \__driver_pdf_object_write_stream:nn #1#2 + { \__driver_pdf_object_write_stream:nnnn { } {#1} #2 } +\cs_new_protected:Npn \__driver_pdf_object_write_stream:nnnn #1#2#3#4 + { + \__driver_literal:x + { + pdf: #1 stream ~ \driver_pdf_object_ref:n {#2} ~ + ( \exp_not:n {#4} ) ~ << \exp_not:n {#3} >> + + } + } +\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 + { \__driver_literal:x { dvipdfmx:config~z~ \int_eval:n {#1} } } +\cs_new_protected:Npn \driver_pdf_objects_enable: { } +\cs_new_protected:Npn \driver_pdf_objects_disable: + { \__driver_literal:n { dvipdfmx:config~C~0x40 } } \cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_pdf:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index 920c8628651..6c8e6f89389 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvips.def}{2018-08-23}{} + {l3dvips.def}{2018-09-24}{} {L3 Experimental driver: dvips} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 @@ -68,7 +68,7 @@ { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } } \cs_new_protected:Npn \driver_color_spot:nn #1#2 - { \__driver_color_select:n { \c_space_tl #1 } } + { \__driver_color_select:n { #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { \__driver_literal:n { color~push~ #1 } @@ -394,6 +394,73 @@ \__driver_draw_literal:n { [begin] } \__driver_draw_literal:n { @beginspecial } } +\int_new:N \g__driver_pdf_object_int +\prop_new:N \g__driver_pdf_object_prop +\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2 + { + \int_gincr:N \g__driver_pdf_object_int + \int_const:cn + { g__driver_pdf_object_ \tl_to_str:n {#1} _int } + { \g__driver_pdf_object_int } + \prop_gput:Nnn \g__driver_pdf_object_prop {#1} {#2} + } +\cs_new:Npn \driver_pdf_object_ref:n #1 + { { l3obj \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } } } +\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 + { + \__driver_literal_postscript:x + { + mark ~ /_objdef ~ \driver_pdf_object_ref:n {#1} ~ + /type + \str_case_e:nn + { \prop_item:Nn \g__driver_pdf_object_prop {#1} } + { + { array } { /array } + { dict } { /dict } + { fstream } { /stream } + { stream } { /stream } + } + /OBJ ~ pdfmark + } + \use:c + { __driver_pdf_object_write_ \prop_item:Nn \g__driver_pdf_object_prop {#1} :nn } + {#1} {#2} + } +\cs_new_protected:Npn \__driver_pdf_object_write_array:nn #1#2 + { + \__driver_literal_postscript:x + { + mark ~ \driver_pdf_object_ref:n {#1} ~ + [ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL ~ pdfmark + } + } +\cs_new_protected:Npn \__driver_pdf_object_write_dict:nn #1#2 + { + \__driver_literal_postscript:x + { + mark ~ \driver_pdf_object_ref:n {#1} ~ + << ~ \exp_not:n {#2} ~ >> ~ /PUT ~ pdfmark + } + } +\cs_new_protected:Npn \__driver_pdf_object_write_stream:nn #1#2 + { + \exp_args:Nx + \__driver_pdf_object_write_stream:nnn + { \driver_pdf_object_ref:n {#1} } + #2 + } +\cs_new_protected:Npn \__driver_pdf_object_write_stream:nnn #1#2#3 + { + \__driver_literal_postscript:n + { + [nobreak] ~ + mark ~ #1 ~ ( #3 ) ~ /PUT ~ pdfmark ~ + mark ~ #1 ~ << #2 >> ~ /PUT ~ pdfmark + } + } +\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 { } +\cs_new_protected:Npn \driver_pdf_objects_enable: { } +\cs_new_protected:Npn \driver_pdf_objects_disable: { } %% %% %% End of file `l3dvips.def'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def index 32d4f658f60..467baf479fb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3dvisvgm.def}{2018-08-23}{} + {l3dvisvgm.def}{2018-09-24}{} {L3 Experimental driver: dvisvgm} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 @@ -68,7 +68,7 @@ { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } } \cs_new_protected:Npn \driver_color_spot:nn #1#2 - { \__driver_color_select:n { \c_space_tl #1 } } + { \__driver_color_select:n { #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { \__driver_literal:n { color~push~ #1 } @@ -186,6 +186,12 @@ \cs_new_eq:NN \__driver_image_include_jpg:n \__driver_image_include_png:n \cs_new:Npn \__driver_image_include_bitmap_quote:w #1 " #2 " #3 \q_stop { #1#2 } +\cs_new_protected:Npn \driver_pdf_object_new:n #1 { } +\cs_new:Npn \driver_pdf_object_ref:n #1 { } +\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 { } +\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 { } +\cs_new_protected:Npn \driver_pdf_objects_enable: { } +\cs_new_protected:Npn \driver_pdf_objects_disable: { } \cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_svg:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def index be271f63788..0435270fb92 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3pdfmode.def}{2018-08-23}{} + {l3pdfmode.def}{2018-09-24}{} {L3 Experimental driver: PDF mode} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 @@ -264,6 +264,79 @@ } \cs_new_eq:NN \__driver_image_include_pdf:n \__driver_image_include_jpg:n \cs_new_eq:NN \__driver_image_include_png:n \__driver_image_include_jpg:n +\prop_new:N \g__driver_pdf_object_prop +\group_begin: + \cs_set_protected:Npn \__driver_tmp:w #1#2 + { + \cs_new_protected:Npx \driver_pdf_object_new:nn ##1##2 + { + #1 reserveobjnum ~ + \int_const:cn + { g__driver_pdf_object_ \exp_not:N \tl_to_str:n {##1} _int } + {#2} + \prop_gput:Nnn \exp_not:N \g__driver_pdf_object_prop {##1} {##2} + } + } + \cs_if_exist:NTF \tex_pdfextension:D + { + \__driver_tmp:w + { \tex_pdfextension:D obj ~ } + { \tex_pdffeedback:D lastobj \scan_stop: } + } + { \__driver_tmp:w { \tex_pdfobj:D } { \tex_pdflastobj:D } } +\group_end: +\cs_new:Npn \driver_pdf_object_ref:n #1 + { \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R } +\group_begin: + \cs_set_protected:Npn \__driver_tmp:w #1 + { + \cs_new_protected:Npn \driver_pdf_object_write:nn ##1##2 + { + \tex_immediate:D #1 useobjnum ~ + \int_use:c + { g__driver_pdf_object_ \tl_to_str:n {##1} _int } + \str_case_e:nn + { \prop_item:Nn \g__driver_pdf_object_prop {##1} } + { + { array } { { [ ~ \exp_not:n {##2} ~ ] } } + { dict } { { << ~ \exp_not:n {##2} ~ >> } } + { fstream } + { + stream ~ attr ~ { \__driver_exp_not_i:nn ##2 } ~ + file ~ { \__driver_exp_not_ii:nn ##2 } + } + { stream } + { + stream ~ attr ~ { \__driver_exp_not_i:nn ##2 } ~ + { \__driver_exp_not_ii:nn ##2 } + } + } + } + } + \cs_if_exist:NTF \tex_pdfextension:D + { \__driver_tmp:w { \tex_pdfextension:D obj ~ } } + { \__driver_tmp:w { \tex_pdfobj:D } } +\group_end: +\cs_new:Npn \__driver_exp_not_i:nn #1#2 { \exp_not:n {#1} } +\cs_new:Npn \__driver_exp_not_ii:nn #1#2 { \exp_not:n {#2} } +\cs_new_protected:Npx \driver_pdf_compresslevel:n #1 + { + \cs_if_exist:NTF \tex_pdfcompresslevel:D + { \tex_pdfcompresslevel:D } + { \tex_pdfvariable:D compresslevel } + \exp_not:N \int_value:w \exp_not:N \int_eval:n {#1} \scan_stop: + } +\cs_new_protected:Npn \driver_pdf_objects_enable: + { \__driver_pdf_objectlevel:n { 2 } } +\cs_new_protected:Npn \driver_pdf_objects_disable: + { \__driver_pdf_objectlevel:n { 0 } } +\cs_new_protected:Npx \__driver_pdf_objectlevel:n #1 + { + \cs_if_exist:NTF \tex_pdfobjcompresslevel:D + { \tex_pdfobjcompresslevel:D } + { \tex_pdfvariable:D objcompresslevel } + #1 \scan_stop: + } \cs_new_eq:NN \__driver_draw_literal:n \__driver_literal_pdf:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \driver_draw_begin: diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def index afaabad8519..d1e6c9c80d0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def @@ -20,7 +20,7 @@ %% %% File: l3drivers.dtx Copyright(C) 2011-2018 The LaTeX3 Project \ProvidesExplFile - {l3xdvidpfmx.def}{2018-08-23}{} + {l3xdvidpfmx.def}{2018-09-24}{} {L3 Experimental driver: xdvipdfmx} \cs_new_eq:NN \__driver_literal:e \tex_special:D \cs_new_protected:Npn \__driver_literal:n #1 @@ -68,7 +68,7 @@ { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} } } \cs_new_protected:Npn \driver_color_spot:nn #1#2 - { \__driver_color_select:n { \c_space_tl #1 } } + { \__driver_color_select:n { #1 } } \cs_new_protected:Npn \__driver_color_select:n #1 { \__driver_literal:n { color~push~ #1 } @@ -193,6 +193,59 @@ } } } +\int_new:N \g__driver_pdf_object_int +\prop_new:N \g__driver_pdf_object_prop +\cs_new_protected:Npn \driver_pdf_object_new:nn #1#2 + { + \int_gincr:N \g__driver_pdf_object_int + \int_const:cn + { g__driver_pdf_object_ \tl_to_str:n {#1} _int } + { \g__driver_pdf_object_int } + \prop_gput:Nnn \g__driver_pdf_object_prop {#1} {#2} + } +\cs_new:Npn \driver_pdf_object_ref:n #1 + { @l3obj \int_use:c { g__driver_pdf_object_ \tl_to_str:n {#1} _int } } +\cs_new_protected:Npn \driver_pdf_object_write:nn #1#2 + { + \exp_args:Nx \__driver_pdf_object_write:nnn + { \prop_item:Nn \g__driver_pdf_object_prop {#1} } {#1} {#2} + } +\cs_new_protected:Npn \__driver_pdf_object_write:nnn #1#2#3 + { \use:c { __driver_pdf_object_write_ #1 :nn } {#2} {#3} } +\cs_new_protected:Npn \__driver_pdf_object_write_array:nn #1#2 + { + \__driver_literal:x + { + pdf:obj ~ \driver_pdf_object_ref:n {#1} ~ + [ ~ \exp_not:n {#2} ~ ] + } + } +\cs_new_protected:Npn \__driver_pdf_object_write_dict:nn #1#2 + { + \__driver_literal:x + { + pdf:obj ~ \driver_pdf_object_ref:n {#1} ~ + << ~ \exp_not:n {#2} ~ >> + } + } +\cs_new_protected:Npn \__driver_pdf_object_write_fstream:nn #1#2 + { \__driver_pdf_object_write_stream:nnnn { f } {#1} #2 } +\cs_new_protected:Npn \__driver_pdf_object_write_stream:nn #1#2 + { \__driver_pdf_object_write_stream:nnnn { } {#1} #2 } +\cs_new_protected:Npn \__driver_pdf_object_write_stream:nnnn #1#2#3#4 + { + \__driver_literal:x + { + pdf: #1 stream ~ \driver_pdf_object_ref:n {#2} ~ + ( \exp_not:n {#4} ) ~ << \exp_not:n {#3} >> + + } + } +\cs_new_protected:Npn \driver_pdf_compresslevel:n #1 + { \__driver_literal:x { dvipdfmx:config~z~ \int_eval:n {#1} } } +\cs_new_protected:Npn \driver_pdf_objects_enable: { } +\cs_new_protected:Npn \driver_pdf_objects_disable: + { \__driver_literal:n { dvipdfmx:config~C~0x40 } } \cs_new_protected:Npn \__driver_image_getbb_jpg:n #1 { \int_zero:N \l_image_page_int diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty index aea02783a52..00afbb1d7aa 100644 --- a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty +++ b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{l3keys2e}{2018-08-23}{} +\ProvidesExplPackage{l3keys2e}{2018-09-24}{} {LaTeX2e option processing using LaTeX3 keys} \cs_generate_variant:Nn \clist_put_right:Nn { Nv } \cs_generate_variant:Nn \keys_if_exist:nnT { nx } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty index cc364a280c1..3c2cf74d5ca 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty @@ -33,7 +33,7 @@ \endinput } \RequirePackage{xparse} -\ProvidesExplPackage{xfp}{2018-08-23}{} +\ProvidesExplPackage{xfp}{2018-09-24}{} {L3 Floating point unit} \NewExpandableDocumentCommand \fpeval { m } { \fp_eval:n {#1} } \NewExpandableDocumentCommand \inteval { m } { \int_eval:n {#1} } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty index 3a5e7940987..12cac2d08a9 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty @@ -34,7 +34,7 @@ \endinput } \RequirePackage{amstext,graphicx,l3keys2e,textcomp,xparse,xtemplate} -\ProvidesExplPackage{xfrac}{2018-08-23}{} +\ProvidesExplPackage{xfrac}{2018-09-24}{} {L3 Experimental split-level fractions} \keys_define:nn { xfrac } { diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty index 82ae71afa2c..4c7ef80fcfb 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty @@ -36,7 +36,7 @@ }% \endinput } -\ProvidesExplPackage{xparse}{2018-08-23}{} +\ProvidesExplPackage{xparse}{2018-09-24}{} {L3 Experimental document command parser} \tl_new:N \l__xparse_arg_spec_tl \tl_new:N \l__xparse_args_tl @@ -58,9 +58,9 @@ \tl_new:N \l__xparse_fn_code_tl \tl_new:N \l__xparse_function_tl \bool_new:N \l__xparse_grab_expandably_bool +\bool_new:N \l__xparse_obey_spaces_bool \tl_new:N \l__xparse_last_delimiters_tl \bool_new:N \l__xparse_long_bool -\bool_new:N \l__xparse_ignore_spaces_bool \int_new:N \l__xparse_m_args_int \int_new:N \l__xparse_mandatory_args_int \bool_new:N \l__xparse_prefixed_bool @@ -68,6 +68,7 @@ \tl_new:N \l__xparse_process_one_tl \bool_new:N \l__xparse_process_some_bool \tl_new:N \l__xparse_signature_tl +\bool_new:N \l__xparse_some_obey_spaces_bool \bool_new:N \l__xparse_some_long_bool \bool_new:N \l__xparse_some_short_bool \prop_new:N \l__xparse_tmp_prop @@ -362,10 +363,11 @@ \tl_clear:N \l__xparse_last_delimiters_tl \tl_clear:N \l__xparse_arg_spec_tl \bool_set_true:N \l__xparse_grab_expandably_bool + \bool_set_false:N \l__xparse_obey_spaces_bool \bool_set_false:N \l__xparse_long_bool + \bool_set_false:N \l__xparse_some_obey_spaces_bool \bool_set_false:N \l__xparse_some_long_bool \bool_set_false:N \l__xparse_some_short_bool - \bool_set_false:N \l__xparse_ignore_spaces_bool \__xparse_normalize_arg_spec_loop:n #1 \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop \int_compare:nNnT \l__xparse_current_arg_int > 9 @@ -443,7 +445,12 @@ \cs_new_protected:cpn { __xparse_normalize_type_+:w } #1 { \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn } - \tl_put_right:Nn \l__xparse_arg_spec_tl { + } + \bool_if:NT \l__xparse_long_bool + { + \__kernel_msg_error:nnxx { xparse } { two-markers } + { \iow_char:N \\ \l__xparse_function_tl } { + } + \__xparse_bad_def:wn + } \bool_set_true:N \l__xparse_long_bool \int_decr:N \l__xparse_current_arg_int \__xparse_normalize_arg_spec_loop:n {#1} @@ -451,7 +458,14 @@ \cs_new_protected:cpn { __xparse_normalize_type_!:w } #1 { \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn } - \tl_put_right:Nn \l__xparse_arg_spec_tl { ! } + \bool_if:NT \l__xparse_obey_spaces_bool + { + \__kernel_msg_error:nnxx { xparse } { two-markers } + { \iow_char:N \\ \l__xparse_function_tl } { ! } + \__xparse_bad_def:wn + } + \bool_set_true:N \l__xparse_obey_spaces_bool + \bool_set_true:N \l__xparse_some_obey_spaces_bool \int_decr:N \l__xparse_current_arg_int \__xparse_normalize_arg_spec_loop:n {#1} } @@ -499,26 +513,27 @@ { \quark_if_recursion_tail_stop_do:Nn #1 { \__xparse_bad_arg_spec:wn } \__xparse_single_char_check:n {#1} - \tl_put_right:Nn \l__xparse_arg_spec_tl { t #1 } + \tl_put_right:Nx \l__xparse_arg_spec_tl + { + \bool_if:NT \l__xparse_obey_spaces_bool { ! } + t \exp_not:n {#1} + } \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1} \bool_set_false:N \l__xparse_grab_expandably_bool + \bool_set_false:N \l__xparse_obey_spaces_bool \bool_set_false:N \l__xparse_long_bool \__xparse_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__xparse_normalize_type_l:w { \__xparse_normalize_check_lu:N l - \__xparse_add_arg_spec:n { l } - \int_incr:N \l__xparse_mandatory_args_int - \tl_clear:N \l__xparse_last_delimiters_tl + \__xparse_add_arg_spec_mandatory:n { l } \__xparse_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__xparse_normalize_type_m:w { \__xparse_delimiter_check:nnn { } { m } { \iow_char:N \{ } - \__xparse_add_arg_spec:n { m } - \int_incr:N \l__xparse_mandatory_args_int - \tl_clear:N \l__xparse_last_delimiters_tl + \__xparse_add_arg_spec_mandatory:n { m } \__xparse_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__xparse_normalize_type_R:w #1#2#3 @@ -527,27 +542,21 @@ \__xparse_single_char_check:n {#1} \__xparse_single_char_check:n {#2} \__xparse_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} } - \__xparse_add_arg_spec:n { R #1 #2 {#3} } - \int_incr:N \l__xparse_mandatory_args_int - \tl_clear:N \l__xparse_last_delimiters_tl \bool_set_false:N \l__xparse_grab_expandably_bool + \__xparse_add_arg_spec_mandatory:n { R #1 #2 {#3} } \__xparse_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__xparse_normalize_type_u:w #1 { \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn } \__xparse_normalize_check_lu:N u - \__xparse_add_arg_spec:n { u {#1} } - \int_incr:N \l__xparse_mandatory_args_int - \tl_clear:N \l__xparse_last_delimiters_tl + \__xparse_add_arg_spec_mandatory:n { u {#1} } \__xparse_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__xparse_normalize_type_v:w { \__xparse_normalize_check_gv:N v - \__xparse_add_arg_spec:n { v } - \int_incr:N \l__xparse_mandatory_args_int - \tl_clear:N \l__xparse_last_delimiters_tl + \__xparse_add_arg_spec_mandatory:n { v } \__xparse_normalize_arg_spec_loop:n } \cs_new_protected:Npn \__xparse_single_char_check:n #1 @@ -628,14 +637,32 @@ \bool_if:NTF \l__xparse_long_bool { \bool_set_true:N \l__xparse_some_long_bool } { \bool_set_true:N \l__xparse_some_short_bool } + \tl_put_right:Nx \l__xparse_arg_spec_tl + { + \bool_if:NT \l__xparse_long_bool { + } + \bool_if:NT \l__xparse_obey_spaces_bool { ! } + \exp_not:n {#1} + } \bool_set_false:N \l__xparse_long_bool - \tl_put_right:Nn \l__xparse_arg_spec_tl {#1} + \bool_set_false:N \l__xparse_obey_spaces_bool + } +\cs_new_protected:Npn \__xparse_add_arg_spec_mandatory:n #1 + { + \bool_if:NT \l__xparse_some_obey_spaces_bool + { + \__kernel_msg_error:nnxx { xparse } { non-trailing-obey-spaces } + { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} } + \__xparse_bad_def:wn + } + \int_incr:N \l__xparse_mandatory_args_int + \tl_clear:N \l__xparse_last_delimiters_tl + \__xparse_add_arg_spec:n {#1} } \cs_new_protected:Npn \__xparse_prepare_signature:n #1 { \int_zero:N \l__xparse_current_arg_int \bool_set_false:N \l__xparse_long_bool - \bool_set_false:N \l__xparse_ignore_spaces_bool + \bool_set_false:N \l__xparse_obey_spaces_bool \int_zero:N \l__xparse_m_args_int \bool_set_false:N \l__xparse_defaults_bool \tl_clear:N \l__xparse_defaults_tl @@ -671,7 +698,7 @@ \cs_new_protected:cpn { __xparse_add_type_!:w } { \__xparse_flush_m_args: - \bool_set_true:N \l__xparse_ignore_spaces_bool + \bool_set_true:N \l__xparse_obey_spaces_bool \bool_set_true:N \l__xparse_prefixed_bool \__xparse_prepare_signature_bypass:N } @@ -766,15 +793,7 @@ } \cs_new_protected:Npn \__xparse_add_grabber_mandatory:N #1 { - \tl_put_right:Nx \l__xparse_signature_tl - { - \exp_not:c - { __xparse_grab_ #1 \bool_if:NT \l__xparse_long_bool { _long } :w } - } - \bool_set_false:N \l__xparse_long_bool - \tl_put_right:Nx \l__xparse_process_all_tl - { { \exp_not:o \l__xparse_process_one_tl } } - \tl_clear:N \l__xparse_process_one_tl + \__xparse_add_grabber_optional:N #1 \int_decr:N \l__xparse_mandatory_args_int } \cs_new_protected:Npn \__xparse_add_grabber_optional:N #1 @@ -785,15 +804,12 @@ { __xparse_grab_ #1 \bool_if:NT \l__xparse_long_bool { _long } - \bool_lazy_and:nnT - { \l__xparse_ignore_spaces_bool } - { \int_compare_p:nNn \l__xparse_mandatory_args_int = 0 } - { _ignore_spaces } + \bool_if:NT \l__xparse_obey_spaces_bool { _obey_spaces } :w } } \bool_set_false:N \l__xparse_long_bool - \bool_set_false:N \l__xparse_ignore_spaces_bool + \bool_set_false:N \l__xparse_obey_spaces_bool \tl_put_right:Nx \l__xparse_process_all_tl { { \exp_not:o \l__xparse_process_one_tl } } \tl_clear:N \l__xparse_process_one_tl @@ -953,22 +969,28 @@ } \cs_new_protected:Npn \__xparse_grab_D:w #1#2#3 \__xparse_run_code: { - \__xparse_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected_nopar:Npn - { _ignore_spaces } + \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \__xparse_peek_nonspace_remove:NTF } \cs_new_protected:Npn \__xparse_grab_D_long:w #1#2#3 \__xparse_run_code: { - \__xparse_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected:Npn - { _ignore_spaces } + \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn + \__xparse_peek_nonspace_remove:NTF + } +\cs_new_protected:Npn \__xparse_grab_D_obey_spaces:w #1#2#3 \__xparse_run_code: + { + \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn + \peek_meaning_remove:NTF } -\cs_new_protected:Npn \__xparse_grab_D_ignore_spaces:w #1#2#3 \__xparse_run_code: - { \__xparse_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected_nopar:Npn { } } -\cs_new_protected:Npn \__xparse_grab_D_long_ignore_spaces:w #1#2#3 \__xparse_run_code: - { \__xparse_grab_D_aux:NNnNn #1 #2 {#3} \cs_set_protected:Npn { } } -\cs_new_protected:Npn \__xparse_grab_D_aux:NNnNn #1#2#3#4#5 +\cs_new_protected:Npn \__xparse_grab_D_long_obey_spaces:w #1#2#3 \__xparse_run_code: + { + \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn + \peek_meaning_remove:NTF + } +\cs_new_protected:Npn \__xparse_grab_D_aux:NNnNN #1#2#3#4#5 { \__xparse_grab_D_aux:NNnN #1#2 {#3} #4 - \use:c { peek_meaning_remove #5 :NTF } #1 + #5 #1 { \__xparse_grab_D_call:Nw #1 } { \__xparse_add_arg:o \c_novalue_tl } } @@ -1043,34 +1065,34 @@ } \cs_new_protected:Npn \__xparse_grab_E:w #1#2 \__xparse_run_code: { - \__xparse_grab_E:nnNn {#1} {#2} + \__xparse_grab_E:nnNN {#1} {#2} \cs_set_protected_nopar:Npn - { _ignore_spaces } + \__xparse_peek_nonspace_remove:NTF } \cs_new_protected:Npn \__xparse_grab_E_long:w #1#2 \__xparse_run_code: { - \__xparse_grab_E:nnNn {#1} {#2} + \__xparse_grab_E:nnNN {#1} {#2} \cs_set_protected:Npn - { _ignore_spaces } + \__xparse_peek_nonspace_remove:NTF } -\cs_new_protected:Npn \__xparse_grab_E_ignore_spaces:w #1#2 \__xparse_run_code: +\cs_new_protected:Npn \__xparse_grab_E_obey_spaces:w #1#2 \__xparse_run_code: { - \__xparse_grab_E:nnNn {#1} {#2} + \__xparse_grab_E:nnNN {#1} {#2} \cs_set_protected_nopar:Npn - { } + \peek_meaning_remove:NTF } -\cs_new_protected:Npn \__xparse_grab_E_long_ignore_spaces:w #1#2 \__xparse_run_code: +\cs_new_protected:Npn \__xparse_grab_E_long_obey_spaces:w #1#2 \__xparse_run_code: { - \__xparse_grab_E:nnNn {#1} {#2} + \__xparse_grab_E:nnNN {#1} {#2} \cs_set_protected:Npn - { } + \peek_meaning_remove:NTF } -\cs_new_protected:Npn \__xparse_grab_E:nnNn #1#2#3#4 +\cs_new_protected:Npn \__xparse_grab_E:nnNN #1#2#3#4 { \exp_after:wN #3 \l__xparse_fn_tl ##1##2##3 { \prop_put:Nnn \l__xparse_tmp_prop {##1} {##3} - \__xparse_grab_E_loop:nnN {#4} { } ##2 \q_recursion_stop + \__xparse_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop } \prop_clear:N \l__xparse_tmp_prop \tl_set:Nn \l__xparse_signature_tl {#2} @@ -1085,38 +1107,45 @@ } \l__xparse_signature_tl \__xparse_run_code: } - \__xparse_grab_E_loop:nnN {#4} { } #1 \q_recursion_tail \q_recursion_stop + \__xparse_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop } -\cs_new_protected:Npn \__xparse_grab_E_loop:nnN #1#2#3#4 \q_recursion_stop +\cs_new_protected:Npn \__xparse_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop { \cs_if_eq:NNTF #3 \q_recursion_tail { \__xparse_grab_E_finalise: } { - \use:c { peek_meaning_remove #1 :NTF } #3 + #1 #3 { \l__xparse_fn_tl #3 {#2#4} } - { \__xparse_grab_E_loop:nnN {#1} {#2#3} #4 \q_recursion_stop } + { \__xparse_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop } } } \cs_new_protected:Npn \__xparse_grab_E_finalise: { } \cs_new_protected:Npn \__xparse_grab_G:w #1 \__xparse_run_code: { - \__xparse_grab_G_aux:nNn {#1} \cs_set_protected_nopar:Npn - { _ignore_spaces } + \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn + \__xparse_peek_nonspace:NTF } \cs_new_protected:Npn \__xparse_grab_G_long:w #1 \__xparse_run_code: { - \__xparse_grab_G_aux:nNn {#1} \cs_set_protected:Npn { _ignore_spaces } + \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn + \__xparse_peek_nonspace:NTF + } +\cs_new_protected:Npn \__xparse_grab_G_obey_spaces:w #1 \__xparse_run_code: + { + \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn + \peek_meaning:NTF } -\cs_new_protected:Npn \__xparse_grab_G_ignore_spaces:w #1 \__xparse_run_code: - { \__xparse_grab_G_aux:nNn {#1} \cs_set_protected_nopar:Npn { } } -\cs_new_protected:Npn \__xparse_grab_G_long_ignore_spaces:w #1 \__xparse_run_code: - { \__xparse_grab_G_aux:nNn {#1} \cs_set_protected:Npn { } } -\cs_new_protected:Npn \__xparse_grab_G_aux:nNn #1#2#3 +\cs_new_protected:Npn \__xparse_grab_G_long_obey_spaces:w #1 \__xparse_run_code: + { + \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn + \peek_meaning:NTF + } +\cs_new_protected:Npn \__xparse_grab_G_aux:nNN #1#2#3 { \tl_set:Nn \l__xparse_signature_tl {#1} \exp_after:wN #2 \l__xparse_fn_tl ##1 { \__xparse_add_arg:n {##1} } - \use:c { peek_meaning #3 :NTF } \c_group_begin_token + #3 \c_group_begin_token { \l__xparse_fn_tl } { \__xparse_add_arg:o \c_novalue_tl } } @@ -1211,7 +1240,7 @@ \cs_new_protected:Npn \__xparse_grab_R_aux:NNnN #1#2#3#4 { \__xparse_grab_D_aux:NNnN #1 #2 {#3} #4 - \peek_meaning_remove_ignore_spaces:NTF #1 + \__xparse_peek_nonspace_remove:NTF #1 { \__xparse_grab_D_call:Nw #1 } { \__kernel_msg_error:nnxx { xparse } { missing-required } @@ -1221,11 +1250,9 @@ } } \cs_new_protected:Npn \__xparse_grab_t:w - { \__xparse_grab_t_aux:NNw \peek_meaning_remove_ignore_spaces:NTF } -\cs_new_eq:NN \__xparse_grab_t_long:w \__xparse_grab_t:w -\cs_new_protected:Npn \__xparse_grab_t_ignore_spaces:w + { \__xparse_grab_t_aux:NNw \__xparse_peek_nonspace_remove:NTF } +\cs_new_protected:Npn \__xparse_grab_t_obey_spaces:w { \__xparse_grab_t_aux:NNw \peek_meaning_remove:NTF } -\cs_new_eq:NN \__xparse_grab_t_long_ignore_spaces:w \__xparse_grab_t_ignore_spaces:w \cs_new_protected:Npn \__xparse_grab_t_aux:NNw #1#2#3 \__xparse_run_code: { \tl_set:Nn \l__xparse_signature_tl {#3} @@ -1810,6 +1837,16 @@ } } \cs_new:Npn \__xparse_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1} +\cs_new_protected:Npn \__xparse_peek_nonspace:NTF + { \__xparse_peek_nonspace_aux:nNNTF { } \peek_meaning:NTF } +\cs_new_protected:Npn \__xparse_peek_nonspace_remove:NTF + { \__xparse_peek_nonspace_aux:nNNTF { } \peek_meaning_remove:NTF } +\cs_new_protected:Npn \__xparse_peek_nonspace_aux:nNNTF #1#2#3#4#5 + { + \peek_meaning_remove:NTF \c_space_token + { \__xparse_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} } + { #2 #3 { #4 } { #5 #1 } } + } \__kernel_msg_new:nnnn { xparse } { bad-arg-spec } { Bad~argument~specification~'#2'~for~command~'#1'. } { @@ -1898,6 +1935,13 @@ The~current~command~'#1'~expects~an~argument~starting~with~'#2'.~ LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed. } +\__kernel_msg_new:nnnn { xparse } { non-trailing-obey-spaces } + { Prefix~'!'~used~before~mandatory~argument~'#2'~of~command~'#1'. } + { + The~prefix~'!'~can~only~apply~to~trailing~optional~arguments. + \\ \\ + LaTeX~will~ignore~this~entire~definition. + } \__kernel_msg_new:nnnn { xparse } { non-xparse-command } { Command~'#1'~not~defined~using~xparse. } { @@ -1959,6 +2003,12 @@ This~cannot~be~implemented. \\ \\ LaTeX~will~ignore~this~entire~definition. } +\__kernel_msg_new:nnnn { xparse } { two-markers } + { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~command~'#1'. } + { + The~argument~specification~provided~has~two~markers~'#2'~applying~ + to~the~same~argument;~these~are~redundant. + } \__kernel_msg_new:nnnn { xparse } { unknown-argument-type } { Unknown~argument~type~'#2'~for~the~command~'#1'. } { diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty index 912ddd9a897..b233a8b362f 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty @@ -36,7 +36,7 @@ }% \endinput } -\ProvidesExplPackage{xtemplate}{2018-08-23}{} +\ProvidesExplPackage{xtemplate}{2018-09-24}{} {L3 Experimental prototype document functions} \tl_const:Nn \c__xtemplate_code_root_tl { template~code~>~ } \tl_const:Nn \c__xtemplate_defaults_root_tl { template~defaults~>~ } |