diff options
Diffstat (limited to 'macros/latex/contrib')
156 files changed, 1137 insertions, 912 deletions
diff --git a/macros/latex/contrib/bangorcsthesis/README b/macros/latex/contrib/bangorcsthesis/README index 49dd65ea09..78f3da354c 100644 --- a/macros/latex/contrib/bangorcsthesis/README +++ b/macros/latex/contrib/bangorcsthesis/README @@ -1,6 +1,6 @@ Bangor University Computer Science Department Thesis Document Class -Cameron Gray <c.gray@bangor.ac.uk> Octover 5, 2018 +Cameron Gray <c.gray@bangor.ac.uk> November 12, 2021 Abstract @@ -28,6 +28,8 @@ options to be specified, these dictate what type of thesis the document forms; [(msc⟩] - Master of Science (Taught courses) [(ba⟩] - [⟨Bachelor of Arts (Undergraduate courses) [(bsc⟩] - Bachelor of Science (Undergraduate courses) +[(beng)] - Bachelor of Engineering (Undergraduate course) +[(meng)] - Master of Engineering (Integrated masters) For example; an undergraduate dissertation for a Computer Science degree (a B.Sc. course) would start with a document class definition as follows:- diff --git a/macros/latex/contrib/bangorcsthesis/bangorcsthesis.dtx b/macros/latex/contrib/bangorcsthesis/bangorcsthesis.dtx index 603b47f221..c5234e4ed0 100644 --- a/macros/latex/contrib/bangorcsthesis/bangorcsthesis.dtx +++ b/macros/latex/contrib/bangorcsthesis/bangorcsthesis.dtx @@ -40,7 +40,7 @@ \end{document} %</driver> %\fi -%\CheckSum{608} +%\CheckSum{614} %\RecordChanges %\changes{v1.0}{2014/07/01}{Initial version.} %\changes{v1.0.1}{2014/09/01}{Repackaged to remove external logo file.} @@ -51,10 +51,11 @@ %\changes{v1.5.1}{2016/08/24}{Altered fancyfoot options to remove superflous warnings.} %\changes{v1.5.2}{2017/08/10}{Altered heading handling for the references section.} %\changes{v1.5.3}{2018/10/05}{Altered School and College names.} +%\changes{v1.5.4}{2021/11/12}{Added more Engineering degree types.} %\pagestyle{fancy} -%\title{Bangor University Computer Science Department\\ Thesis Document Class} +%\title{Bangor University Computer Science and Electronic Engineering Department\\ Thesis Document Class} %\author{Cameron Gray \texttt{<c.gray@bangor.ac.uk>}} -%\date{October 5, 2018} +%\date{November 12, 2021} %\maketitle % %\begin{abstract} @@ -84,6 +85,8 @@ %\oarg{msc} - Master of Science (Taught courses)\\ %\oarg{ba} - Bachelor of Arts (Undergraduate courses)\\ %\oarg{bsc} - Bachelor of Science (Undergraduate courses)\\ +%\oarg{beng} - Bachelor of Engineering (Undergraduate courses)\\ +%\oarg{meng} - Master of Engineering (Integrated Masters) % %For example; an undergraduate dissertation for a Computer Science degree %(a B.Sc. course) would start with a document class definition as follows:-\\ @@ -263,11 +266,11 @@ % \end{macrocode} %\fi % \begin{macrocode} -\def\version{1.5.3} +\def\version{1.5.4} \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{bangorcsthesis}[2018/10/04 \version C. Gray] +\ProvidesClass{bangorcsthesis}[2021/11/12 \version C. Gray] % Originally inspired by Clean Thesis % - http://cleanthesis.der-ric.de/ @@ -278,6 +281,7 @@ \FSCreate{supervisors}{} \def\supervisor#1{\FSPush{supervisors}{#1}} + \RequirePackage{ifthen} \RequirePackage{xkeyval} \RequirePackage[dvipsnames]{xcolor} @@ -296,9 +300,15 @@ \DeclareOption{ba}{ \newcommand{\degree}{Bachelor of Arts} } +\DeclareOption{beng}{ + \newcommand{\degree}{Bachelor of Engineering} +} \DeclareOption{msc}{ \newcommand{\degree}{Master of Science} } +\DeclareOption{meng}{ + \newcommand{\degree}{Moster of Engineering} +} \DeclareOption{mscres}{ \newcommand{\degree}{Master of Science by Research} } @@ -356,12 +366,12 @@ \ProcessOptions\relax \ifx\degree\undefined - \ClassError{bangorcsthesis}{A degree type option has not been defined; use ba,bsc,msc,mscres,mres,mphil or phd in the class options.} + \ClassError{bangorcsthesis}{A degree type option has not been defined; use ba,bsc,beng,meng,msc,mscres,mres,mphil or phd in the class options.} \fi \LoadClass[12pt]{report} - +\RequirePackage{tocloft} \if@nohyphen \tolerance=1 @@ -637,9 +647,6 @@ singlelinecheck=false % - no centred single-lined captions % the list of figures and the list of tables % % -% The tocloft package enables us to control the typographic design of the -% table of contents, list of figures and list of tables -\RequirePackage{tocloft} % % > adjusts the indention for figure and table entries (lof and lot) % -- \cftsetindents{entry}{indent}{numwidth} sets the entry's indent to diff --git a/macros/latex/contrib/bangorcsthesis/bangorcsthesis.ins b/macros/latex/contrib/bangorcsthesis/bangorcsthesis.ins index 8dbc7f3dfc..cc4664ec66 100644 --- a/macros/latex/contrib/bangorcsthesis/bangorcsthesis.ins +++ b/macros/latex/contrib/bangorcsthesis/bangorcsthesis.ins @@ -3,7 +3,7 @@ \preamble bangorcsthesis.dtx - Copyright 2014-16 Cameron Gray/Bangor University <c.gray@bangor.ac.uk> + Copyright 2014-21 Cameron Gray/Bangor University <c.gray@bangor.ac.uk> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/bangorcsthesis/bangorcsthesis.pdf b/macros/latex/contrib/bangorcsthesis/bangorcsthesis.pdf Binary files differindex 02d95f1a71..c67e163222 100644 --- a/macros/latex/contrib/bangorcsthesis/bangorcsthesis.pdf +++ b/macros/latex/contrib/bangorcsthesis/bangorcsthesis.pdf diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 5ee1eadb0f..14c53c6608 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/11/10}{1.40O} +\ProvidesExplClass{easybook}{2021/11/12}{1.40P} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -325,7 +325,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/11/10}{1.40O} +\ProvidesExplPackage{easybase}{2021/11/12}{1.40P} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -908,14 +908,12 @@ { plain,pifont,pifont*,pifont-sans,pifont-sans* } { \eb_fnmate_normal_label_set:nn {#1} { the@footnote } }, fnmark-num .value_required:n = true, - fnmark-num/unknown .code:n = - { \eb_fnmate_short_label_set:nn {#1} { the@footnote } }, + fnmark-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { the@footnote }, fntext-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } { \eb_fnmate_normal_label_set:nn {#1} { thefootnote } }, fntext-num .value_required:n = true, - fntext-num/unknown .code:n = - { \eb_fnmate_short_label_set:nn {#1} { thefootnote } }, + fntext-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { thefootnote }, fnmate-num .meta:n = { fntext-num = #1,fnmark-num = #1 }, fnmate-num .initial:n = plain, unknown .code:n = \eb_msg_unknown_option:n { hdrset } @@ -1837,8 +1835,7 @@ \newlist{eb@exercise@list}{enumerate}{2} \newlist{eb@eqcomp@list}{description}{1} \setlist[eb@outline@list]{label = outline,itemsep = 0.5ex plus .1ex} -\setlist[eb@exercise@list]{labelsep = 0.5em,nosep} -\setlist[eb@eqcomp@list]{labelsep = 0em,nosep} +\setlist[eb@eqcomp@list]{labelsep = 0em} \cs_new:Npn \setexerlist #1 { \setlist*[eb@exercise@list]{#1} } \cs_new:Npn \seteqcomplist #1 { \setlist*[eb@eqcomp@list]{#1} } \cs_new:Npn \setoutlinelist #1 { \setlist*[eb@outline@list]{#1} } @@ -2404,7 +2401,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/10}{1.40O} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/12}{1.40P} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex 2871a82625..37b9add116 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index 54806dc5a6..cde1c710e8 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -20,8 +20,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.40O, - date = 2021/11/10, + version = v1.40P, + date = 2021/11/12, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = q1jx@foxmail.com, @@ -637,8 +637,8 @@ \label{subsec:page margins} 模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面列举的仅是一小部分选项,其它选项可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。 \begin{options}\noitemsep - \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default* - \keyval-{footruleskip}{页脚线间距}\Default* + \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*{1.5pt} + \keyval-{footruleskip}{页脚线间距}\Default*{0.3\cs*{normalbaselineskip}} \keyval*-{left}{页面左边距}\Default*{3.17cm} \keyval*-{top}{页面上边距}\Default*{2.54cm} \kvsplit{hmargin}{左边距,右边距} @@ -893,7 +893,7 @@ \environment*{description}[\oarg{键值列表}] 已为三种列表各自预置了三个级别,同种列表或不同种列表间的不同级别可相互嵌套,可以使用短编号的形式,带有星号的环境为行内列表。默认列表标签与标准文档类一致,下面举几个更改列表标签以及其它格式的例子: \begin{ctexexam} - \setlist{nosep} % 取消所有列表额外的垂直间距 + \setlist*{wide = 0em} % 取消所有列表的左边距 \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume] \begin{enumerate}[(1)] % 短编号形式 \begin{itemize}[label = \textbullet,labelsep = *] diff --git a/macros/latex/contrib/l3build/CHANGELOG.md b/macros/latex/contrib/l3build/CHANGELOG.md index f5be81a937..c6f67da4b2 100644 --- a/macros/latex/contrib/l3build/CHANGELOG.md +++ b/macros/latex/contrib/l3build/CHANGELOG.md @@ -7,6 +7,14 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-11-12] + +### Changed +- Documentation improvements + +### Fixed +- Allow config names ending with 'lua', as long as they don't end with '.lua' + ## [2021-08-28] ### Fixed @@ -509,7 +517,8 @@ this project uses date-based 'snapshot' version identifiers. - Rationalise short option names: removed `-d`, `-E`, `-r` - Target `cmdcheck`: specific to LaTeX kernel work -[Unreleased]: https://github.com/latex3/l3build/compare/2021-08-28...HEAD +[Unreleased]: https://github.com/latex3/l3build/compare/2021-11-12...HEAD +[2021-11-12]: https://github.com/latex3/l3build/compare/2021-08-28...2021-11-12 [2021-08-28]: https://github.com/latex3/l3build/compare/2021-08-27...2021-08-28 [2021-08-27]: https://github.com/latex3/l3build/compare/2021-05-06...2021-08-27 [2021-05-06]: https://github.com/latex3/l3build/compare/2021-05-05...2021-05-06 diff --git a/macros/latex/contrib/l3build/README.md b/macros/latex/contrib/l3build/README.md index 635693ae9f..f75e873dfd 100644 --- a/macros/latex/contrib/l3build/README.md +++ b/macros/latex/contrib/l3build/README.md @@ -1,7 +1,7 @@ l3build: a testing and building system for LaTeX ================================================= -Release 2021-08-28 +Release 2021-11-12 Overview -------- @@ -31,6 +31,6 @@ The LaTeX kernel is developed by [The LaTeX Project](https://latex-project.org). ----- -<p>Copyright (C) 2014-2020 The LaTeX Project <br /> +<p>Copyright (C) 2014-2021 The LaTeX Project <br /> <a href="http://latex-project.org/">http://latex-project.org/</a> <br /> All rights reserved.</p> diff --git a/macros/latex/contrib/l3build/l3build-arguments.lua b/macros/latex/contrib/l3build/l3build-arguments.lua index 8f62e8b433..470290db56 100644 --- a/macros/latex/contrib/l3build/l3build-arguments.lua +++ b/macros/latex/contrib/l3build/l3build-arguments.lua @@ -1,6 +1,6 @@ --[[ -File l3build-arguments.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-arguments.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -141,7 +141,7 @@ option_list = }, ["show-saves"] = { - desc = "If tests fail, show the l3build save invocation to regenerate the tests", + desc = "Show the invocation to update failing .tlg files", short = "S", type = "boolean" }, diff --git a/macros/latex/contrib/l3build/l3build-aux.lua b/macros/latex/contrib/l3build/l3build-aux.lua index 12fe704af4..42e7f6a53a 100644 --- a/macros/latex/contrib/l3build/l3build-aux.lua +++ b/macros/latex/contrib/l3build/l3build-aux.lua @@ -1,6 +1,6 @@ --[[ -File l3build-aux.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-aux.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-check.lua b/macros/latex/contrib/l3build/l3build-check.lua index f83dee4e44..3e8089970a 100644 --- a/macros/latex/contrib/l3build/l3build-check.lua +++ b/macros/latex/contrib/l3build/l3build-check.lua @@ -1,6 +1,6 @@ --[[ -File l3build-check.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-check.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -548,6 +548,7 @@ local function normalize_pdf(content) not match(line,"^%%%%Invocation") and not match(line,"^%%%%%+") then line = gsub(line,"%/ID( ?)%[<[^>]+><[^>]+>]","/ID%1[<ID-STRING><ID-STRING>]") + line = gsub(line,"%/ID( ?)%[(%b())%2%]","/ID%1[<ID-STRING><ID-STRING>]") new_content = new_content .. line .. os_newline end end diff --git a/macros/latex/contrib/l3build/l3build-clean.lua b/macros/latex/contrib/l3build/l3build-clean.lua index f548a392eb..226650b478 100644 --- a/macros/latex/contrib/l3build/l3build-clean.lua +++ b/macros/latex/contrib/l3build/l3build-clean.lua @@ -1,6 +1,6 @@ --[[ -File l3build-clean.lua Copyright (C) 2018,2020 The LaTeX Project +File l3build-clean.lua Copyright (C) 2018,2020,2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -77,4 +77,3 @@ function bundleclean() + rmdir(ctandir) + rmdir(tdsdir) end - diff --git a/macros/latex/contrib/l3build/l3build-ctan.lua b/macros/latex/contrib/l3build/l3build-ctan.lua index e5b3b7e8f8..1f5aa2bc90 100644 --- a/macros/latex/contrib/l3build/l3build-ctan.lua +++ b/macros/latex/contrib/l3build/l3build-ctan.lua @@ -1,6 +1,6 @@ --[[ -File l3build-ctan.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-ctan.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -160,4 +160,3 @@ function ctan() end return errorlevel end - diff --git a/macros/latex/contrib/l3build/l3build-file-functions.lua b/macros/latex/contrib/l3build/l3build-file-functions.lua index 53364bd301..1fc9e1d47a 100644 --- a/macros/latex/contrib/l3build/l3build-file-functions.lua +++ b/macros/latex/contrib/l3build/l3build-file-functions.lua @@ -1,6 +1,6 @@ --[[ -File l3build-file-functions.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-file-functions.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-help.lua b/macros/latex/contrib/l3build/l3build-help.lua index 6431ac547e..2e7d776a73 100644 --- a/macros/latex/contrib/l3build/l3build-help.lua +++ b/macros/latex/contrib/l3build/l3build-help.lua @@ -1,6 +1,6 @@ --[[ -File l3build-help.lua Copyright (C) 2018,2020 The LaTeX Project +File l3build-help.lua Copyright (C) 2018,2020,2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-install.lua b/macros/latex/contrib/l3build/l3build-install.lua index f4839fdca7..21257aad0d 100644 --- a/macros/latex/contrib/l3build/l3build-install.lua +++ b/macros/latex/contrib/l3build/l3build-install.lua @@ -1,6 +1,6 @@ --[[ -File l3build-install.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-install.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -234,11 +234,11 @@ function install_files(target,full,dry_run) typesetlist = create_file_list(docfiledir,typesetfiles,{sourcefiles}) sourcelist = create_file_list(sourcefiledir,sourcefiles, {bstfiles,installfiles,makeindexfiles,scriptfiles}) - + if dry_run then print("\nFor installation inside " .. target .. ":") - end - + end + errorlevel = create_install_map(sourcefiledir,"source",{sourcelist}) + create_install_map(docfiledir,"doc", {bibfiles,demofiles,docfiles,pdffiles,textfiles,typesetlist}) @@ -290,8 +290,8 @@ function install_files(target,full,dry_run) for _,v in ipairs(installmap) do errorlevel = cp(v.file,v.source,v.dest) if errorlevel ~= 0 then return errorlevel end - end - + end + return 0 end diff --git a/macros/latex/contrib/l3build/l3build-manifest-setup.lua b/macros/latex/contrib/l3build/l3build-manifest-setup.lua index 9fcf493729..f7051dac5c 100644 --- a/macros/latex/contrib/l3build/l3build-manifest-setup.lua +++ b/macros/latex/contrib/l3build/l3build-manifest-setup.lua @@ -1,6 +1,6 @@ --[[ -File l3build-manifest-setup.lua Copyright (C) 2018,2020 The LaTeX Project +File l3build-manifest-setup.lua Copyright (C) 2018,2020,2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-manifest.lua b/macros/latex/contrib/l3build/l3build-manifest.lua index f9b1c4e82e..8f3e5ef421 100644 --- a/macros/latex/contrib/l3build/l3build-manifest.lua +++ b/macros/latex/contrib/l3build/l3build-manifest.lua @@ -1,6 +1,6 @@ --[[ -File l3build-manifest.lua Copyright (C) 2018,2020 The LaTeX Project +File l3build-manifest.lua Copyright (C) 2018,2020,2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-stdmain.lua b/macros/latex/contrib/l3build/l3build-stdmain.lua index 80b5cc84be..4b6da6675e 100644 --- a/macros/latex/contrib/l3build/l3build-stdmain.lua +++ b/macros/latex/contrib/l3build/l3build-stdmain.lua @@ -1,6 +1,6 @@ --[[ -File l3build-stdmain.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-stdmain.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-tagging.lua b/macros/latex/contrib/l3build/l3build-tagging.lua index e255aba5cd..9f39650598 100644 --- a/macros/latex/contrib/l3build/l3build-tagging.lua +++ b/macros/latex/contrib/l3build/l3build-tagging.lua @@ -1,6 +1,6 @@ --[[ -File l3build-tagging.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-tagging.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-typesetting.lua b/macros/latex/contrib/l3build/l3build-typesetting.lua index 716648f7fd..4934c3f497 100644 --- a/macros/latex/contrib/l3build/l3build-typesetting.lua +++ b/macros/latex/contrib/l3build/l3build-typesetting.lua @@ -1,6 +1,6 @@ --[[ -File l3build-typesetting.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-typesetting.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-unpack.lua b/macros/latex/contrib/l3build/l3build-unpack.lua index 7ab21ee09d..a734d4c8ea 100644 --- a/macros/latex/contrib/l3build/l3build-unpack.lua +++ b/macros/latex/contrib/l3build/l3build-unpack.lua @@ -1,6 +1,6 @@ --[[ -File l3build-unpack.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-unpack.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build-upload.lua b/macros/latex/contrib/l3build/l3build-upload.lua index 47268f5b6a..be814ce5ae 100644 --- a/macros/latex/contrib/l3build/l3build-upload.lua +++ b/macros/latex/contrib/l3build/l3build-upload.lua @@ -1,6 +1,6 @@ --[[ -File l3build-upload.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-upload.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -145,9 +145,9 @@ function upload(tagnames) output(curlopt) write(ctan_post) close(curlopt) - + ctan_post=curlexe .. " --config " .. curloptfile - + if options["debug"] then ctan_post = ctan_post .. ' https://httpbin.org/post' @@ -254,7 +254,7 @@ function construct_ctan_post(uploadfile,debug) -- start building the curl command: -- commandline ctan_post = curlexe .. " " ctan_post="" - + -- build up the curl command field-by-field: -- field max desc mandatory multi diff --git a/macros/latex/contrib/l3build/l3build-variables.lua b/macros/latex/contrib/l3build/l3build-variables.lua index f1032004b6..9f2b25b8d2 100644 --- a/macros/latex/contrib/l3build/l3build-variables.lua +++ b/macros/latex/contrib/l3build/l3build-variables.lua @@ -1,6 +1,6 @@ --[[ -File l3build-variables.lua Copyright (C) 2018-2020 The LaTeX Project +File l3build-variables.lua Copyright (C) 2018-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this diff --git a/macros/latex/contrib/l3build/l3build.1 b/macros/latex/contrib/l3build/l3build.1 index 6c2f071a46..3faa8f04b1 100644 --- a/macros/latex/contrib/l3build/l3build.1 +++ b/macros/latex/contrib/l3build/l3build.1 @@ -1,4 +1,4 @@ -.TH l3build 1 "2021-08-28" +.TH l3build 1 "2021-11-12" .SH NAME l3build \- Checking and building packages .SH SYNOPSIS diff --git a/macros/latex/contrib/l3build/l3build.dtx b/macros/latex/contrib/l3build/l3build.dtx index 8d34055227..b0d5aab879 100644 --- a/macros/latex/contrib/l3build/l3build.dtx +++ b/macros/latex/contrib/l3build/l3build.dtx @@ -1,6 +1,6 @@ % \iffalse % -% File l3build.dtx (C) Copyright 2014-2020 The LaTeX Project +% File l3build.dtx (C) Copyright 2014-2021 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -236,7 +236,7 @@ % }^^A % } % -% \date{Released 2021-08-28} +% \date{Released 2021-11-12} % % \maketitle % \tableofcontents @@ -366,7 +366,7 @@ % \item |--first| Name of the first test to run % \item |--force| (|-f|) Force checks to run even if sanity % checks fail, \emph{e.g.}~when |--engine| is not given in -% \luavar{checkengines} +% \var{checkengines} % \item |--full| Instructs the \texttt{install} target to include the % \texttt{doc} and \texttt{source} trees % \item |--halt-on-error| (|-H|) Specifies that checks @@ -1087,7 +1087,7 @@ % % To allow complex set up for tests, a hook |checkinit_hook()| is available % to be executed once all standard set up is complete but before any tests -% are run. +% are run. This should return an integer value: $0$ indicates no error. % % \subsection{Additional test tasks} % @@ -1149,9 +1149,9 @@ % \subsection{Epoch setting} % % To produce predictable output when using dates, the test system offers the -% ability to set the epoch to a known value. The \luavar{epoch} variable may +% ability to set the epoch to a known value. The \var{epoch} variable may % be given as a raw value (a simple integer) or as a date in ISO format. -% The two flags \luavar{forcecheckepoch} and \luavar{forcedocepoch} then +% The two flags \var{forcecheckepoch} and \var{forcedocepoch} then % determine whether this is applied in testing and typesetting, respectively. % % The epoch may also be given as a command line option, |-E|, which again @@ -1309,7 +1309,7 @@ % \end{itemize} % % For more complex set ups, this can be customised using the -% \luavar{tdslocations} table. Each entry there should be a glob specifying the +% \var{tdslocations} table. Each entry there should be a glob specifying the % TDS position of a file or files. Any files not specified in the table % will use the standard locations above. For example, to place some files % in the generic tree, some in the plain \TeX{} tree and some in the \LaTeX{} @@ -1383,8 +1383,8 @@ % As part of the overall build process, \pkg{l3build} will create PDF % documentation as described earlier. The standard build process for PDFs % will attempt to run Biber, \BibTeX{} and MakeIndex as appropriate -% (the exact binaries used are defined by \luavar{biberexe}, \luavar{bibtexexe} -% and \luavar{makeindexexe}). However, there is no attempt to create an entire +% (the exact binaries used are defined by \var{biberexe}, \var{bibtexexe} +% and \var{makeindexexe}). However, there is no attempt to create an entire % PDF creation system in the style of \texttt{latexmk} or similar. % % For package authors who have more complex requirements than those covered @@ -1828,7 +1828,7 @@ % Rather than use this function, we recommend the replacement construct % \begin{verbatim} % io.popen(<cmd>,"w"):write(string.rep("y\n", 300)):close() -% \end{verbatim} +% \end{verbatim} % \end{variable} % % \subsection{Components of \texttt{l3build}} diff --git a/macros/latex/contrib/l3build/l3build.lua b/macros/latex/contrib/l3build/l3build.lua index 51b7a493e3..b48aa306f7 100755 --- a/macros/latex/contrib/l3build/l3build.lua +++ b/macros/latex/contrib/l3build/l3build.lua @@ -2,7 +2,7 @@ --[[ -File l3build.lua Copyright (C) 2014-2020 The LaTeX Project +File l3build.lua Copyright (C) 2014-2021 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2021-08-28" +release_date = "2021-11-12" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") @@ -201,7 +201,7 @@ end if #checkconfigs == 1 and checkconfigs[1] ~= "build" and (options["target"] == "check" or options["target"] == "save" or options["target"] == "clean") then - local config = "./" .. gsub(checkconfigs[1],".lua$","") .. ".lua" + local config = "./" .. gsub(checkconfigs[1],"%.lua$","") .. ".lua" if fileexists(config) then local savedtestfiledir = testfiledir dofile(config) diff --git a/macros/latex/contrib/l3build/l3build.pdf b/macros/latex/contrib/l3build/l3build.pdf Binary files differindex fe2778114f..7c23434947 100644 --- a/macros/latex/contrib/l3build/l3build.pdf +++ b/macros/latex/contrib/l3build/l3build.pdf diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md index 4e557273ea..42e0fe6dc8 100644 --- a/macros/latex/contrib/l3experimental/CHANGELOG.md +++ b/macros/latex/contrib/l3experimental/CHANGELOG.md @@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-11-12] + +### Added +- `\draw_point_intersect_line_circle:nnnnn` + ## [2021-08-27] ### Changed @@ -226,7 +231,8 @@ this project uses date-based 'snapshot' version identifiers. - New `l3color` module using `xcolor`-like expression syntax - New `l3draw` module, based on `pgf` layer of the TikZ system -[Unreleased]: https://github.com/latex3/latex3/compare/2021-08-27...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-11-12...HEAD +[2021-11-12]: https://github.com/latex3/latex3/compare/2021-08-27...2021-11-12 [2021-08-27]: https://github.com/latex3/latex3/compare/2021-08-04...2021-08-27 [2021-08-04]: https://github.com/latex3/latex3/compare/2021-07-12...2021-08-04 [2021-07-12]: https://github.com/latex3/latex3/compare/2021-05-27...2021-07-12 diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md index 38eff7cf66..0a8c1f250d 100644 --- a/macros/latex/contrib/l3experimental/README.md +++ b/macros/latex/contrib/l3experimental/README.md @@ -1,7 +1,7 @@ Experimental LaTeX3 Concepts ============================ -Release 2021-08-27 +Release 2021-11-12 Overview -------- diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx index d5ba6349ab..5a868d830e 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.dtx +++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -122,7 +122,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3benchmark}{2021-08-27}{} +\ProvidesExplPackage{l3benchmark}{2021-11-12}{} {L3 Experimental benchmarking} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf Binary files differindex 157e2cf3a7..55a39d0fc5 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.pdf +++ b/macros/latex/contrib/l3experimental/l3benchmark.pdf diff --git a/macros/latex/contrib/l3experimental/l3bitset.dtx b/macros/latex/contrib/l3experimental/l3bitset.dtx index 517cab5815..21a5f550b8 100644 --- a/macros/latex/contrib/l3experimental/l3bitset.dtx +++ b/macros/latex/contrib/l3experimental/l3bitset.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % \begin{documentation} @@ -264,7 +264,7 @@ %<@@=bitset> % \end{macrocode} % \begin{macrocode} -\ProvidesExplPackage{l3bitset}{2021-08-27}{} +\ProvidesExplPackage{l3bitset}{2021-11-12}{} {L3 Experimental bitset support} % \end{macrocode} % A bitset is a string variable. diff --git a/macros/latex/contrib/l3experimental/l3bitset.pdf b/macros/latex/contrib/l3experimental/l3bitset.pdf Binary files differindex 9b4fadc6ca..e46962b6fd 100644 --- a/macros/latex/contrib/l3experimental/l3bitset.pdf +++ b/macros/latex/contrib/l3experimental/l3bitset.pdf diff --git a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx index 817db2e90f..d3a474abda 100644 --- a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf Binary files differindex ac7276ee1e..98b2d5625e 100644 --- a/macros/latex/contrib/l3experimental/l3draw-code.pdf +++ b/macros/latex/contrib/l3experimental/l3draw-code.pdf diff --git a/macros/latex/contrib/l3experimental/l3draw-layers.dtx b/macros/latex/contrib/l3experimental/l3draw-layers.dtx index bab6d5d014..8c8bcea84b 100644 --- a/macros/latex/contrib/l3experimental/l3draw-layers.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-layers.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx index 9f49558bc2..ad09f0a605 100644 --- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx index 2e17871c40..82629b5053 100644 --- a/macros/latex/contrib/l3experimental/l3draw-points.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -477,6 +477,137 @@ % \end{macro} % \end{macro} % +% \begin{macro}[EXP]{\draw_point_intersect_line_circle:nnnnn} +% \begin{macro}[EXP]{\@@_point_intersect_line_circle_auxi:nnnnnnnn} +% \begin{macro}[EXP] +% { +% \@@_point_intersect_line_circle_auxii:nnnnnnnn, +% \@@_point_intersect_line_circle_auxii:fnnnnnnn, +% \@@_point_intersect_line_circle_auxiii:nnnnnnnn, +% \@@_point_intersect_line_circle_auxiii:fffnnnnn +% } +% \begin{macro}[EXP] +% { +% \@@_point_intersect_line_circle_auxiv:nnnnnnnn, +% \@@_point_intersect_line_circle_auxiv:ffnnnnnn +% } +% \begin{macro}[EXP] +% { +% \@@_point_intersect_line_circle_auxv:nnnnn, +% \@@_point_intersect_line_circle_auxv:fnnnn +% } +% The intersection points~$P_{1}$ and~$P_{2}$ between +% a line joining points $(x_{1}, y_{1})$ and $(x_{2}, y_{2})$ +% and a circle with center $(x_{3}, y_{3})$ and radius~$r$. +% We use the intermediate +% values +% \begin{align*} +% a &= (x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} \\ +% b &= 2 \times ((x_{2} - x_{1}) \times (x_{1} - x_{3}) + (y_{2} - y_{1}) \times (y_{1} - y_{3})) \\ +% c &= x_{3}^{2} + y_{3}^{2} + x_{1}^{2} + y_{1}^{2} +% - 2\times(x_{3} \times x_{1} + y_{3} \times y_{1}) - r^{2} \\ +% d &= b^{2} - 4\times a \times c \\ +% \mu_{1} &= \frac{-b + \sqrt{d}}{2 \times a}\\ +% \mu_{2} &= \frac{-b - \sqrt{d}}{2 \times a} +% \end{align*} +% in either +% \begin{align*} +% P_{1x} &= x_{1} + \mu_{1}\times (x_{2} - x_{1}) \\ +% P_{1y} &= y_{1} + \mu_{1}\times (y_{2} - y_{1}) +% \end{align*} +% or +% \begin{align*} +% P_{2x} &= x_{1} + \mu_{2}\times (x_{2} - x_{1}) \\ +% P_{2y} &= y_{1} + \mu_{2}\times (y_{2} - y_{1}) +% \end{align*} +% depending on which solution is required. The rest of the work is simply +% forcing the appropriate expansion and shuffling arguments. +% \begin{macrocode} +\cs_new:Npn \draw_point_intersect_line_circle:nnnnn #1#2#3#4#5 + { + \@@_point_process:nnnn + { \@@_point_intersect_line_circle_auxi:nnnnnnnn {#4} {#5} } + {#1} {#2} {#3} + } +\cs_new:Npn \@@_point_intersect_line_circle_auxi:nnnnnnnn #1#2#3#4#5#6#7#8 + { + \@@_point_intersect_line_circle_auxii:fnnnnnnn + { \fp_eval:n {#1} } {#3} {#4} {#5} {#6} {#7} {#8} {#2} + } +% \end{macrocode} +% At this stage we have all of the information we need, fully expanded: +% \begin{enumerate}[label = \#\arabic*, font = \ttfamily] +% \item $r$ +% \item $x_{1}$ +% \item $y_{1}$ +% \item $x_{2}$ +% \item $y_{2}$ +% \item $x_{3}$ +% \item $y_{3}$ +% \item $n$ +% \end{enumerate} +% Once we evaluate $a$, $b$ and $c$, the co-ordinate $(x_{3},y_{3})$ +% and $r$ are no longer required: handy as we will need various +% intermediate values in the following. +% \begin{macrocode} +\cs_new:Npn \@@_point_intersect_line_circle_auxii:nnnnnnnn #1#2#3#4#5#6#7#8 + { + \@@_point_intersect_line_circle_auxiii:fffnnnnn + { \fp_eval:n { (#4-#2)*(#4-#2)+(#5-#3)*(#5-#3) } } + { \fp_eval:n { 2*((#4-#2)*(#2-#6)+(#5-#3)*(#3-#7)) } } + { \fp_eval:n { (#6*#6+#7*#7)+(#2*#2+#3*#3)-(2*(#6*#2+#7*#3))-(#1*#1) } } + {#2} {#3} {#4} {#5} {#8} + } +\cs_generate_variant:Nn \@@_point_intersect_line_circle_auxii:nnnnnnnn { f } +% \end{macrocode} +% then we can get $d = b^{2} - 4\times a \times c$ and the usage of $n$. +% \begin{macrocode} +\cs_new:Npn \@@_point_intersect_line_circle_auxiii:nnnnnnnn #1#2#3#4#5#6#7#8 + { + \@@_point_intersect_line_circle_auxiv:ffnnnnnn + { \fp_eval:n { #2 * #2 - 4 * #1 * #3 } } + { \int_if_odd:nTF {#8} { 1 } { -1 } } + {#1} {#2} {#4} {#5} {#6} {#7} + } +\cs_generate_variant:Nn \@@_point_intersect_line_circle_auxiii:nnnnnnnn { fff } +% \end{macrocode} +% We now have all of the intermediate values we require, with one division +% carried out up-front to avoid doing this expensive step twice: +% \begin{enumerate}[label = \#\arabic*, font = \ttfamily] +% \item $a$ +% \item $b$ +% \item $c$ +% \item $d$ +% \item $\pm$(the usage of $n$) +% \item $x_{1}$ +% \item $y_{1}$ +% \item $x_{2}$ +% \item $y_{2}$ +% \end{enumerate} +% There are some final pre-calculations, +% $\mu = \frac{-b \pm \sqrt{d}}{2 \times a}$ +% then, we can yield a result. +% \begin{macrocode} +\cs_new:Npn \@@_point_intersect_line_circle_auxiv:nnnnnnnn #1#2#3#4#5#6#7#8 + { + \@@_point_intersect_line_circle_auxv:fnnnn + { \fp_eval:n { (-1 * #4 + #2 * sqrt(#1)) / (2 * #3) } } + {#5} {#6} {#7} {#8} + } +\cs_generate_variant:Nn \@@_point_intersect_line_circle_auxiv:nnnnnnnn { ff } +\cs_new:Npn \@@_point_intersect_line_circle_auxv:nnnnn #1#2#3#4#5 + { + \draw_point:n + { #2 + #1 * (#4 - #2), #3 + #1 * (#5 - #3) } + } +\cs_generate_variant:Nn \@@_point_intersect_line_circle_auxv:nnnnn { f } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \subsection{Interpolation on a line (vector) or arc} % % \begin{macro}[EXP]{\draw_point_interpolate_line:nnn} diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx index 174764e29d..e20f31bf81 100644 --- a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx index c0e748f262..64aeec907d 100644 --- a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx index 6158be04a3..fc08e1b510 100644 --- a/macros/latex/contrib/l3experimental/l3draw-state.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-state.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx index 5c25b61c35..82be9368a6 100644 --- a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx index bda53293c7..9fd88f8c7f 100644 --- a/macros/latex/contrib/l3experimental/l3draw.dtx +++ b/macros/latex/contrib/l3experimental/l3draw.dtx @@ -110,7 +110,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -528,6 +528,17 @@ % \pkg{pgf}, which has the two centers then the two radii. % \end{function} % +% \begin{function}[EXP]{\draw_point_intersect_line_circle:nnnnn} +% \begin{syntax} +% \cs{draw_point_intersect_line_circle:nnnnn} +% \Arg{point1} \Arg{point2} \Arg{center} \Arg{radius} \Arg{root} +% \end{syntax} +% Evaluates the point at the intersection of one line, joining +% \meta{point1} and \meta{point2}, and a circle with \meta{center} +% and \meta{radius}. If the lines and circle do not intersect and +% error will occur. +% \end{function} +% % \subsubsection{Interpolations} % % \begin{function}[EXP]{\draw_point_interpolate_line:nnn} @@ -1162,7 +1173,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3draw}{2021-08-27}{} +\ProvidesExplPackage{l3draw}{2021-11-12}{} {L3 Experimental core drawing support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf Binary files differindex 42e86d08cc..63b74dc9fd 100644 --- a/macros/latex/contrib/l3experimental/l3draw.pdf +++ b/macros/latex/contrib/l3experimental/l3draw.pdf diff --git a/macros/latex/contrib/l3experimental/l3galley.dtx b/macros/latex/contrib/l3experimental/l3galley.dtx index 877e39b3da..7ce0c01784 100644 --- a/macros/latex/contrib/l3experimental/l3galley.dtx +++ b/macros/latex/contrib/l3experimental/l3galley.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -686,7 +686,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3galley}{2021-08-27}{} +\ProvidesExplPackage{l3galley}{2021-11-12}{} {L3 Experimental galley code} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf Binary files differindex 61a9667c91..8f756538d1 100644 --- a/macros/latex/contrib/l3experimental/l3galley.pdf +++ b/macros/latex/contrib/l3experimental/l3galley.pdf diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx index a3691ae327..9b7860425c 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.dtx +++ b/macros/latex/contrib/l3experimental/l3graphics.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -240,7 +240,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3graphics}{2021-08-27}{} +\ProvidesExplPackage{l3graphics}{2021-11-12}{} {L3 Experimental graphics inclusion support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf Binary files differindex a920bded0a..845356b86c 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.pdf +++ b/macros/latex/contrib/l3experimental/l3graphics.pdf diff --git a/macros/latex/contrib/l3experimental/l3opacity.dtx b/macros/latex/contrib/l3experimental/l3opacity.dtx index e2e518fffe..fcbfb83f0f 100644 --- a/macros/latex/contrib/l3experimental/l3opacity.dtx +++ b/macros/latex/contrib/l3experimental/l3opacity.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -97,7 +97,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3opacity}{2021-08-27}{} +\ProvidesExplPackage{l3opacity}{2021-11-12}{} {L3 Experimental opacity support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3opacity.pdf b/macros/latex/contrib/l3experimental/l3opacity.pdf Binary files differindex cc30509499..16c5c6d756 100644 --- a/macros/latex/contrib/l3experimental/l3opacity.pdf +++ b/macros/latex/contrib/l3experimental/l3opacity.pdf diff --git a/macros/latex/contrib/l3experimental/l3str-format.dtx b/macros/latex/contrib/l3experimental/l3str-format.dtx index 5da80c3a74..0ecbb95c3f 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.dtx +++ b/macros/latex/contrib/l3experimental/l3str-format.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3str-format}{2021-08-27}{} +\ProvidesExplPackage{l3str-format}{2021-11-12}{} {L3 Experimental string formatting} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf Binary files differindex 07dc9eea04..1041b445b6 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.pdf +++ b/macros/latex/contrib/l3experimental/l3str-format.pdf diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.dtx b/macros/latex/contrib/l3experimental/l3sys-shell.dtx index 3ba357ee7c..50424a6685 100644 --- a/macros/latex/contrib/l3experimental/l3sys-shell.dtx +++ b/macros/latex/contrib/l3experimental/l3sys-shell.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -151,7 +151,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3sys-shell}{2021-08-27}{} +\ProvidesExplPackage{l3sys-shell}{2021-11-12}{} {L3 Experimental system shell functions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf Binary files differindex 41b79767a8..91ded20b12 100644 --- a/macros/latex/contrib/l3experimental/l3sys-shell.pdf +++ b/macros/latex/contrib/l3experimental/l3sys-shell.pdf diff --git a/macros/latex/contrib/l3experimental/xcoffins.dtx b/macros/latex/contrib/l3experimental/xcoffins.dtx index 61a6009c9e..f167302265 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.dtx +++ b/macros/latex/contrib/l3experimental/xcoffins.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -672,7 +672,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xcoffins}{2021-08-27}{} +\ProvidesExplPackage{xcoffins}{2021-11-12}{} {L3 Experimental design level coffins} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf Binary files differindex ae301c7c8b..0902947178 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.pdf +++ b/macros/latex/contrib/l3experimental/xcoffins.pdf diff --git a/macros/latex/contrib/l3experimental/xgalley.dtx b/macros/latex/contrib/l3experimental/xgalley.dtx index 64fafabdcb..659ddb2751 100644 --- a/macros/latex/contrib/l3experimental/xgalley.dtx +++ b/macros/latex/contrib/l3experimental/xgalley.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -731,7 +731,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2021-08-27}{} +\ProvidesExplPackage{xgalley}{2021-11-12}{} {L3 Experimental galley} \RequirePackage{xtemplate,l3galley} % \end{macrocode} diff --git a/macros/latex/contrib/l3experimental/xgalley.pdf b/macros/latex/contrib/l3experimental/xgalley.pdf Binary files differindex 2d685ddcca..a0ed251a18 100644 --- a/macros/latex/contrib/l3experimental/xgalley.pdf +++ b/macros/latex/contrib/l3experimental/xgalley.pdf diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index 82782d208d..a889c04c8c 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,6 +7,19 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-11-12] + +### Fixed +- DeviceN colorspace conversions with alternative model RGB + +### Added +- `.str_set:N`, etc., key properties (issue #1007) +- `\bool_to_str:n` (issue #1010) + +### Changed +- `\prop_..._from_keyval:Nn` functions now support active comma or + equal sign (pull #1012) + ## [2021-10-18] ### Added @@ -971,7 +984,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/2021-10-18...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-11-12...HEAD +[2021-11-12]: https://github.com/latex3/latex3/compare/2021-10-18...2021-11-12 [2021-10-18]: https://github.com/latex3/latex3/compare/2021-10-17...2021-10-18 [2021-10-17]: https://github.com/latex3/latex3/compare/2021-10-12...2021-10-17 [2021-10-12]: https://github.com/latex3/latex3/compare/2021-08-27...2021-10-12 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index 0ceca4ca19..027c1c9636 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2021-10-18 +Release 2021-11-12 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index 24246f1ace..01a2dbf0fb 100644 --- a/macros/latex/contrib/l3kernel/expl3.dtx +++ b/macros/latex/contrib/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> %</driver|generic|package|2ekernel> -\def\ExplFileDate{2021-10-18}% +\def\ExplFileDate{2021-11-12}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf Binary files differindex 60e57d4148..92b32349e6 100644 --- a/macros/latex/contrib/l3kernel/expl3.pdf +++ b/macros/latex/contrib/l3kernel/expl3.pdf diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf Binary files differindex 19980978f9..eee082fa60 100644 --- a/macros/latex/contrib/l3kernel/interface3.pdf +++ b/macros/latex/contrib/l3kernel/interface3.pdf diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex index b2c52db293..f64cd3abbb 100644 --- a/macros/latex/contrib/l3kernel/interface3.tex +++ b/macros/latex/contrib/l3kernel/interface3.tex @@ -54,7 +54,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-18} +\date{Released 2021-11-12} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index d54bc9a70a..5b810b393d 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -1203,7 +1203,7 @@ % Tests whether the \meta{control sequence} is currently free to % be defined. This test is \texttt{false} if the % \meta{control sequence} currently exists (as defined by -% \cs{cs_if_exist:N}). +% \cs{cs_if_exist:NTF}). % \end{function} % % \subsection{Primitive conditionals} diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index c0c676dd9f..7cf40957e7 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index 8e000f70f5..c71f489712 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index e0787f1a0e..ebfb71b81e 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index 0d53ada539..4669bcc875 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -699,7 +699,7 @@ % % \subsection{Category code table conditionals} % -% \begin{macro}{\cctab_if_exist:N,\cctab_if_exist:c} +% \begin{macro}[pTF]{\cctab_if_exist:N,\cctab_if_exist:c} % Checks whether a \meta{cctab~var} is defined. % \begin{macrocode} \prg_new_eq_conditional:NNn \cctab_if_exist:N \cs_if_exist:N diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index 8ca665469b..718c75d07a 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index 1a47fa6b73..ca112398ab 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx index cef2e7bef1..b3f10132d3 100644 --- a/macros/latex/contrib/l3kernel/l3color.dtx +++ b/macros/latex/contrib/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -654,20 +654,20 @@ \tl_set:Nx #4 { \cs_if_exist:cTF { @@_convert_ #1 _ #2 :w } - { \use:c { @@_convert_ #1 _ #2 :w } #3 ~ 0 ~ 0 ~ 0 \s_@@_stop } + { \use:c { @@_convert_ #1 _ #2 :w } #3 \s_@@_stop } { \use:c { c_@@_fallback_ #2 _tl } } } } \cs_generate_variant:Nn \@@_convert:nnnN { nV , nnV } -\cs_new:Npn \@@_convert_gray_rgb:w #1 ~ #2 \s_@@_stop +\cs_new:Npn \@@_convert_gray_rgb:w #1 \s_@@_stop { #1 ~ #1 ~ #1 } -\cs_new:Npn \@@_convert_gray_cmyk:w #1 ~ #2 \s_@@_stop +\cs_new:Npn \@@_convert_gray_cmyk:w #1 \s_@@_stop { 0 ~ 0 ~ 0 ~ \fp_eval:n { 1 - #1 } } % \end{macrocode} % These rather odd values are based on \textsc{ntsc} television: the set are % used for the |cmyk| conversion. % \begin{macrocode} -\cs_new:Npn \@@_convert_rgb_gray:w #1 ~ #2 ~ #3 ~ #4 \s_@@_stop +\cs_new:Npn \@@_convert_rgb_gray:w #1 ~ #2 ~ #3 \s_@@_stop { \fp_eval:n { 0.3 * #1 + 0.59 * #2 + 0.11 * #3 } } % \end{macrocode} % The conversion from |rgb| to |cmyk| is the most complex: a two-step @@ -677,7 +677,7 @@ % Moreover, as the likelihood of anyone using a non-unitary matrix here is % tiny, we simplify and treat those two concepts as no-ops. % \begin{macrocode} -\cs_new:Npn \@@_convert_rgb_cmyk:w #1 ~ #2 ~ #3 ~ #4 \s_@@_stop +\cs_new:Npn \@@_convert_rgb_cmyk:w #1 ~ #2 ~ #3 \s_@@_stop { \exp_args:Nf \@@_convert_rgb_cmyk:nnnn { \fp_eval:n { min ( 1 - #1 , 1 - #2 , 1 - #3 ) } } {#1} {#2} {#3} @@ -689,9 +689,9 @@ \fp_eval:n { min ( 1 , max ( 0 , 1 - #4 - #1 ) ) } \c_space_tl #1 } -\cs_new:Npn \@@_convert_cmyk_gray:w #1 ~ #2 ~ #3 ~ #4 ~ #5 \s_@@_stop +\cs_new:Npn \@@_convert_cmyk_gray:w #1 ~ #2 ~ #3 ~ #4 \s_@@_stop { \fp_eval:n { 1 - min ( 1 , 0.3 * #1 + 0.59 * #2 + 0.11 * #3 + #4 ) } } -\cs_new:Npn \@@_convert_cmyk_rgb:w #1 ~ #2 ~ #3 ~ #4 ~ #5 \s_@@_stop +\cs_new:Npn \@@_convert_cmyk_rgb:w #1 ~ #2 ~ #3 ~ #4 \s_@@_stop { \fp_eval:n { 1 - min ( 1 , #1 + #4 ) } \c_space_tl \fp_eval:n { 1 - min ( 1 , #2 + #4 ) } \c_space_tl @@ -1664,7 +1664,10 @@ { \fp_compare:nNnTF {#1} = { 0 } { 00 } - { \int_to_Hex:n { \fp_to_int:n { #1 * 255 } } } + { + \fp_compare:nNnT { #1 * 255 } < { 16 } { 0 } + \int_to_Hex:n { \fp_to_int:n { #1 * 255 } } + } } \cs_new_protected:cpn { @@_export_space-sep-rgb:Nw } #1#2 \s_@@_stop { \tl_set:Nn #1 {#2} } @@ -1930,7 +1933,7 @@ } \cs_new_protected:Npn \@@_model_separation_cmyk:nnnnnn #1#2#3#4#5#6 { - \cs_new:cpn { @@_convert_ #1 _cmyk:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #1 _cmyk:w } ##1 \s_@@_stop { \fp_eval:n {##1 * #3} ~ \fp_eval:n {##1 * #4} ~ @@ -1945,7 +1948,7 @@ } \cs_new_protected:Npn \@@_model_separation_rgb:nnnnnn #1#2#3#4#5#6 { - \cs_new:cpn { @@_convert_ #1 _rgb:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #1 _rgb:w } ##1 \s_@@_stop { \fp_eval:n {##1 * #3} ~ \fp_eval:n {##1 * #4} ~ @@ -1959,16 +1962,16 @@ } \cs_new_protected:Npn \@@_model_separation_gray:nnnnnn #1#2#3#4#5#6 { - \cs_new:cpn { @@_convert_ #1 _cmyk:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #1 _cmyk:w } ##1 \s_@@_stop { \fp_eval:n {##1 * #3} ~ \fp_eval:n {##1 * #3} ~ \fp_eval:n {##1 * #3} ~ \fp_eval:n {##1 * #3} } - \cs_new:cpn { @@_convert_ #1 _gray:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #1 _gray:w } ##1 \s_@@_stop { \fp_eval:n {##1 * #3} } - \cs_new:cpn { @@_convert_ #1 _rgb:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #1 _rgb:w } ##1 \s_@@_stop { \fp_eval:n {##1 * #3} ~ \fp_eval:n {##1 * #3} ~ @@ -1982,11 +1985,11 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_model_convert:nnn #1#2#3 { - \cs_new:cpx { @@_convert_ #1 _ #3 :w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpx { @@_convert_ #1 _ #3 :w } ##1 \s_@@_stop { \exp_not:N \exp_args:NNe \exp_not:N \use:nn \exp_not:c { @@_convert_ #2 _ #3 :w } - { \exp_not:c { @@_convert_ #1 _ #2 :w } ##1 ~ ##2 \s_@@_stop } + { \exp_not:c { @@_convert_ #1 _ #2 :w } ##1 \s_@@_stop } \c_space_tl \exp_not:N \s_@@_stop } } @@ -2018,11 +2021,11 @@ \tl_if_exist:cTF { c_@@_model_whitepoint_CIELAB_ #1 _tl } { \@@_backend_separation_init_CIELAB:nnn {#1} {#3} { #4 ~ #5 ~ #6 } - \cs_new:cpn { @@_convert_ #2 _cmyk:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #2 _cmyk:w } ##1 \s_@@_stop { 0 ~ 0 ~ 0 ~ 1 } - \cs_new:cpn { @@_convert_ #2 _rgb:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #2 _rgb:w } ##1 \s_@@_stop { 1 ~ 1 ~ 1 } - \cs_new:cpn { @@_convert_ #2 _gray:w } ##1 ~ ##2 \s_@@_stop + \cs_new:cpn { @@_convert_ #2 _gray:w } ##1 \s_@@_stop { 1 } } { @@ -2311,7 +2314,7 @@ \prop_get:NnN \g_@@_alternative_values_prop {##1} \l_@@_value_tl \exp_after:wN \@@_model_devicen_transform:w - \l_@@_value_tl , 0 , 0 , 0 \s_@@_stop {#1} {#2} + \l_@@_value_tl , 0 , 0 , 0 , \s_@@_stop {#1} {#2} } \tl_put_right:Nx \l_@@_internal_tl { @@ -2349,7 +2352,7 @@ { \@@_model_devicen_transform:nnn {#5} { 1 } {#1} } \cs_new_protected:cpn { @@_model_devicen_transform_3:nnnnn } #1#2#3#4#5 { - \clist_map_inline { #1 , #2 , #3 } + \clist_map_inline:nn { #1 , #2 , #3 } { \@@_model_devicen_transform:nnn {#5} { 3 } {##1} } } \cs_new_protected:cpn { @@_model_devicen_transform_4:nnnnn } #1#2#3#4#5 @@ -2407,8 +2410,9 @@ { \exp_not:c { @@_convert_devicen_ #2 : \prg_replicate:nn {#3} { n } w } \prg_replicate:nn {#3} { { 1 } } - ##1 \exp_not:N \s_@@_mark + ##1 ~ \exp_not:N \s_@@_mark \clist_map_function:nN {#4} \@@_model_devicen_convert:n + {} \exp_not:N \s_@@_stop } } @@ -2490,7 +2494,7 @@ \cs_new:Npn \@@_convert_devicen_rgb:nnnw #1#2#3#4 ~ #5 \s_@@_mark #6#7 \s_@@_stop { - \@@_convert_devicen_cmyk:nnnnnn {#4} {#1} {#2} {#3} #6 + \@@_convert_devicen_rgb:nnnnnnn {#4} {#1} {#2} {#3} #6 #5 \s_@@_mark #7 \s_@@_stop } \cs_new:Npn \@@_convert_devicen_rgb:nnnnnnn #1#2#3#4#5#6#7 diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index cbc2ba0dd3..39c210f013 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index 118446f74d..c4ac6b343f 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index f8ddfd6744..3926f4298b 100644 --- a/macros/latex/contrib/l3kernel/l3doc.dtx +++ b/macros/latex/contrib/l3kernel/l3doc.dtx @@ -79,7 +79,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % \maketitle % \tableofcontents % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx index 77b11bec37..56d569dc86 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf Binary files differindex 62968c5aa0..2a9399305e 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.pdf +++ b/macros/latex/contrib/l3kernel/l3docstrip.pdf diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx index de04809b76..ff7dafb094 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index e2c608cdfc..59322d5c92 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -876,8 +876,8 @@ % \cs{file_if_exist_input:nF} \Arg{file name} \Arg{false code} % \end{syntax} % Searches for \meta{file name} using the current \TeX{} search -% path and the additional paths controlled by -% \cs{file_path_include:n}. If found then +% path and the additional paths included in \cs{l_file_search_path_seq}. +% If found then % reads in the file as additional \LaTeX{} source as described for % \cs{file_input:n}, otherwise inserts the \meta{false code}. % Note that these functions do not raise diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index 7a6712d474..86e6f65a9b 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 357481da6b..18ed230b7f 100644 --- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index e735876dd4..edae5678c2 100644 --- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index bb869cd5ca..759a6e1c92 100644 --- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index b113e024f7..0ae265ad82 100644 --- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index f5f58acbe6..89769f7ad8 100644 --- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -1000,8 +1000,7 @@ \cs_new:Npn \@@_pow_normal_o:ww \s_@@ \@@_chk:w 1 #1#2#3; \s_@@ \@@_chk:w #4#5 { - \if_int_compare:w \@@_str_if_eq:nn { #2 #3 } - { 1 {1000} {0000} {0000} {0000} } = \c_zero_int + \if:w 0 \@@_str_if_eq:nn { #2 #3 } { 1 {1000} {0000} {0000} {0000} } \if_int_compare:w #4 #1 = 32 \exp_stop_f: \exp_after:wN \@@_case_return_ii_o:ww \fi: diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index 820faac536..ee1a7dfbed 100644 --- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index 254983bcad..64f25bcd70 100644 --- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index c07bbc130f..e2648f74fa 100644 --- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -1755,9 +1755,7 @@ { \if_catcode:w \scan_stop: \exp_not:N #1 \if_meaning:w \scan_stop: #1 - \if_int_compare:w - \@@_str_if_eq:nn { \s_@@ } { \exp_not:N #1 } - = \c_zero_int + \if:w 0 \@@_str_if_eq:nn { \s_@@ } { \exp_not:N #1 } 0 \msg_expandable_error:nnn { fp } { after-e } { floating~point~ } @@ -1769,9 +1767,7 @@ \prg_return_false: \fi: \else: - \if_int_compare:w - \@@_str_if_eq:nn { \int_value:w #1 } { \tex_the:D #1 } - = \c_zero_int + \if:w 0 \@@_str_if_eq:nn { \int_value:w #1 } { \tex_the:D #1 } \int_value:w #1 \else: 0 @@ -2263,9 +2259,7 @@ \cs_new:Npn \@@_parse_infix:NN #1 #2 { \if_catcode:w \scan_stop: \exp_not:N #2 - \if_int_compare:w - \@@_str_if_eq:nn { \s_@@_expr_mark } { \exp_not:N #2 } - = \c_zero_int + \if:w 0 \@@_str_if_eq:nn { \s_@@_expr_mark } { \exp_not:N #2 } \exp_after:wN \exp_after:wN \exp_after:wN \@@_parse_infix_mark:NNN \else: @@ -2315,9 +2309,7 @@ \cs_new:Npn \@@_parse_infix_after_paren:NN #1 #2 { \if_catcode:w \scan_stop: \exp_not:N #2 - \if_int_compare:w - \@@_str_if_eq:nn { \s_@@_expr_mark } { \exp_not:N #2 } - = \c_zero_int + \if:w 0 \@@_str_if_eq:nn { \s_@@_expr_mark } { \exp_not:N #2 } \exp_after:wN \exp_after:wN \exp_after:wN \@@_parse_infix_mark:NNN \else: diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index 8defd82e8a..2edef81d72 100644 --- a/macros/latex/contrib/l3kernel/l3fp-random.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index 4669afeff6..f261a87690 100644 --- a/macros/latex/contrib/l3kernel/l3fp-round.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index d12dfb5e9f..41736a6c92 100644 --- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index e7147443b1..4ae3c33f4b 100644 --- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index eef38c230f..ed3468a076 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index 9646b84a94..5afd5f774a 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index 1e5ded3b6b..749de68557 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 13ba3a394c..3d95e6e04b 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index bdc195d0a1..e9da0d7e8c 100644 --- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index e85bbc1d97..355de420bd 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -178,10 +178,10 @@ % \begin{function}[updated = 2013-07-08] % {.bool_set:N, .bool_set:c, .bool_gset:N, .bool_gset:c} % \begin{syntax} -% \meta{key} .bool_set:N = \meta{boolean} +% \meta{key} .bool_set:N = \meta{boolean variable} % \end{syntax} -% Defines \meta{key} to set \meta{boolean} to \meta{value} (which -% must be either \texttt{true} or \texttt{false}). If the variable +% Defines \meta{key} to set \meta{boolean variable} to \meta{value} (which +% must be either \enquote{\texttt{true}} or \enquote{\texttt{false}}). If the variable % does not exist, it will be created globally at the point that % the key is set up. % \end{function} @@ -192,12 +192,12 @@ % .bool_gset_inverse:N, .bool_gset_inverse:c % } % \begin{syntax} -% \meta{key} .bool_set_inverse:N = \meta{boolean} +% \meta{key} .bool_set_inverse:N = \meta{boolean variable} % \end{syntax} -% Defines \meta{key} to set \meta{boolean} to the logical -% inverse of \meta{value} (which must be either \texttt{true} or -% \texttt{false}). -% If the \meta{boolean} does not exist, it will be created globally +% Defines \meta{key} to set \meta{boolean variable} to the logical +% inverse of \meta{value} (which must be either \enquote{\texttt{true}} or +% \enquote{\texttt{false}}). +% If the \meta{boolean variable} does not exist, it will be created globally % at the point that the key is set up. % \end{function} % @@ -435,6 +435,27 @@ % require a value at point-of-use unless a default is set. % \end{function} % +% \begin{function}[added = 2021-10-30] +% {.str_set:N, .str_set:c, .str_gset:N, .str_gset:c} +% \begin{syntax} +% \meta{key} .str_set:N = \meta{string variable} +% \end{syntax} +% Defines \meta{key} to set \meta{string variable} to \meta{value}. +% If the variable does not exist, it is created globally +% at the point that the key is set up. +% \end{function} +% +% \begin{function}[added = 2021-10-30] +% {.str_set_x:N, .str_set_x:c, .str_gset_x:N, .str_gset_x:c} +% \begin{syntax} +% \meta{key} .str_set_x:N = \meta{string variable} +% \end{syntax} +% Defines \meta{key} to set \meta{string variable} to \meta{value}, +% which will be subjected to an \texttt{x}-type expansion +% (\emph{i.e.}~using \cs{str_set:Nx}). If the variable does not exist, +% it is created globally at the point that the key is set up. +% \end{function} +% % \begin{function}{.tl_set:N, .tl_set:c, .tl_gset:N, .tl_gset:c} % \begin{syntax} % \meta{key} .tl_set:N = \meta{token list variable} @@ -467,7 +488,7 @@ % \end{syntax} % Specifies that \meta{key} cannot receive a \meta{value} when used. % If a \meta{value} is given then an error will be issued. Setting -% the property \texttt{false} cancels the restriction. +% the property \enquote{\texttt{false}} cancels the restriction. % \end{function} % % \begin{function}[added = 2015-07-14]{.value_required:n} @@ -476,7 +497,7 @@ % \end{syntax} % Specifies that \meta{key} must receive a \meta{value} when used. % If a \meta{value} is not given then an error will be issued. Setting -% the property \texttt{false} cancels the restriction. +% the property \enquote{\texttt{false}} cancels the restriction. % \end{function} % % \section{Sub-dividing keys} @@ -1001,6 +1022,16 @@ % \end{macrocode} % \end{variable} % +% \begin{variable}{\l__kernel_keyval_allow_blank_keys_bool} +% The general behavior of the \pkg{l3keys} module is to throw an error on +% blank key names. However to support the usage of \cs{keyval_parse:nnn} in +% the \pkg{l3prop} module we allow this error to be switched off temporarily +% and just ignore blank names. +% \begin{macrocode} +\bool_new:N \l__kernel_keyval_allow_blank_keys_bool +% \end{macrocode} +% \end{variable} +% % This temporary macro will be used since some of the definitions will need an % active comma or equals sign. Inside of this macro |#1| will be the active % comma and |#2| will be the active equals sign. @@ -1343,9 +1374,11 @@ % \begin{macrocode} \cs_new:Npn \@@_blank_true:w \s_@@_mark \s_@@_stop \@@_trim:nN #1 \@@_key:nn { \@@_loop_other:nnw } -\cs_new:Npn \@@_blank_key_error:w #1 \@@_loop_other:nnw +\cs_new:Npn \@@_blank_key_error:w \s_@@_mark \s_@@_stop #1 \@@_loop_other:nnw { - \msg_expandable_error:nn { keyval } { blank-key-name } + \bool_if:NTF \l__kernel_keyval_allow_blank_keys_bool + { #1 } + { \msg_expandable_error:nn { keyval } { blank-key-name } } \@@_loop_other:nnw } % \end{macrocode} @@ -2052,7 +2085,7 @@ } { \msg_error:nnx { keys } - { property-boolean-values-only } + { boolean-values-only } { .value_ #1 :n } } } @@ -2398,6 +2431,34 @@ % \end{macro} % \end{macro} % +% \begin{macro}{.str_set:N, .str_set:c} +% \begin{macro}{.str_gset:N, .str_gset:c} +% \begin{macro}{.str_set_x:N, .str_set_x:c} +% \begin{macro}{.str_gset_x:N, .str_gset_x:c} +% Setting a variable is very easy: just pass the data along. +% \begin{macrocode} +\cs_new_protected:cpn { \c_@@_props_root_str .str_set:N } #1 + { \@@_variable_set:NnnN #1 { str } { } n } +\cs_new_protected:cpn { \c_@@_props_root_str .str_set:c } #1 + { \@@_variable_set:cnnN {#1} { str } { } n } +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:N } #1 + { \@@_variable_set:NnnN #1 { str } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:c } #1 + { \@@_variable_set:cnnN {#1} { str } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset:N } #1 + { \@@_variable_set:NnnN #1 { str } { g } n } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset:c } #1 + { \@@_variable_set:cnnN {#1} { str } { g } n } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:N } #1 + { \@@_variable_set:NnnN #1 { str } { g } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:c } #1 + { \@@_variable_set:cnnN {#1} { str } { g } x } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \begin{macro}{.tl_set:N, .tl_set:c} % \begin{macro}{.tl_gset:N, .tl_gset:c} % \begin{macro}{.tl_set_x:N, .tl_set_x:c} diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index 29872a655f..c04f318fad 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index f95ddecc82..ac63d0f89a 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index 722f902e29..5804d528ca 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -1979,7 +1979,7 @@ \msg_new:nnn { prg } { negative-replication } { Negative~argument~for~\iow_char:N\\prg_replicate:nn. } \msg_new:nnn { prop } { prop-keyval } - { Missing/extra~'='~in~'#1'~(in~'..._keyval:Nn') } + { Missing~'='~in~'#1'~(in~'..._keyval:Nn') } \msg_new:nnn { kernel } { unknown-comparison } { Relation~'#1'~not~among~=,<,>,==,!=,<=,>=. } \msg_new:nnn { kernel } { zero-step } diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index 9a34a74d24..2f3c8460ca 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf Binary files differindex aea97df6cd..e1c52b5cc3 100644 --- a/macros/latex/contrib/l3kernel/l3news.pdf +++ b/macros/latex/contrib/l3kernel/l3news.pdf diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf Binary files differindex 8ca02b765d..1b6dc0fbe3 100644 --- a/macros/latex/contrib/l3kernel/l3news01.pdf +++ b/macros/latex/contrib/l3kernel/l3news01.pdf diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf Binary files differindex d4f88d8113..28c7194858 100644 --- a/macros/latex/contrib/l3kernel/l3news02.pdf +++ b/macros/latex/contrib/l3kernel/l3news02.pdf diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf Binary files differindex 6ff2937537..a52b994d20 100644 --- a/macros/latex/contrib/l3kernel/l3news03.pdf +++ b/macros/latex/contrib/l3kernel/l3news03.pdf diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf Binary files differindex 42b13884be..dcaa766fd7 100644 --- a/macros/latex/contrib/l3kernel/l3news04.pdf +++ b/macros/latex/contrib/l3kernel/l3news04.pdf diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf Binary files differindex 87426871bc..5110b7df1a 100644 --- a/macros/latex/contrib/l3kernel/l3news05.pdf +++ b/macros/latex/contrib/l3kernel/l3news05.pdf diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf Binary files differindex 825152e720..7f5bd08342 100644 --- a/macros/latex/contrib/l3kernel/l3news06.pdf +++ b/macros/latex/contrib/l3kernel/l3news06.pdf diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf Binary files differindex 3309098d71..57e35fbd7c 100644 --- a/macros/latex/contrib/l3kernel/l3news07.pdf +++ b/macros/latex/contrib/l3kernel/l3news07.pdf diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf Binary files differindex beed982815..28c0de51a5 100644 --- a/macros/latex/contrib/l3kernel/l3news08.pdf +++ b/macros/latex/contrib/l3kernel/l3news08.pdf diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf Binary files differindex 4e7870ec4e..571f491b28 100644 --- a/macros/latex/contrib/l3kernel/l3news09.pdf +++ b/macros/latex/contrib/l3kernel/l3news09.pdf diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf Binary files differindex 6c12559b81..d0239237a2 100644 --- a/macros/latex/contrib/l3kernel/l3news10.pdf +++ b/macros/latex/contrib/l3kernel/l3news10.pdf diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf Binary files differindex 36b254b236..e5cc04782c 100644 --- a/macros/latex/contrib/l3kernel/l3news11.pdf +++ b/macros/latex/contrib/l3kernel/l3news11.pdf diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf Binary files differindex b199276937..b619536016 100644 --- a/macros/latex/contrib/l3kernel/l3news12.pdf +++ b/macros/latex/contrib/l3kernel/l3news12.pdf diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx index 0ccb6817f1..8a4b70eb16 100644 --- a/macros/latex/contrib/l3kernel/l3pdf.dtx +++ b/macros/latex/contrib/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf Binary files differindex cdaa3fe63b..06fe96aef0 100644 --- a/macros/latex/contrib/l3kernel/l3prefixes.pdf +++ b/macros/latex/contrib/l3kernel/l3prefixes.pdf diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx index ae119af206..4a91ce9a8a 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -313,6 +313,16 @@ % based on this result. % \end{function} % +% \begin{function}[EXP, added = 2021-11-01]{\bool_to_str:N, \bool_to_str:c, \bool_to_str:n} +% \begin{syntax} +% \cs{bool_to_str:N} \meta{boolean} +% \cs{bool_to_str:n} \meta{boolean expression} +% \end{syntax} +% Expands to the letters \texttt{true} or \texttt{false} depending on +% the logical truth of the \meta{boolean} or \meta{boolean +% expression}. +% \end{function} +% % \begin{function}[added = 2012-02-09, updated = 2021-04-29]{\bool_show:N, \bool_show:c} % \begin{syntax} % \cs{bool_show:N} \meta{boolean} @@ -961,20 +971,24 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP]{\bool_to_str:N, \bool_to_str:c, \bool_to_str:n} +% Expands to \texttt{true} or \texttt{false} with category code letter. +% \begin{macrocode} +\cs_new:Npn \bool_to_str:N #1 { \bool_if:NTF #1 { true } { false } } +\cs_generate_variant:Nn \bool_to_str:N { c } +\cs_new:Npn \bool_to_str:n #1 { \bool_if:nTF {#1} { true } { false } } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\bool_show:n, \bool_log:n} -% \begin{macro}{\@@_to_str:n} -% Show the truth value of the boolean, as \texttt{true} or -% \texttt{false}. +% Show the truth value of the boolean. % \begin{macrocode} \cs_new_protected:Npn \bool_show:n - { \msg_show_eval:Nn \@@_to_str:n } + { \msg_show_eval:Nn \bool_to_str:n } \cs_new_protected:Npn \bool_log:n - { \msg_log_eval:Nn \@@_to_str:n } -\cs_new:Npn \@@_to_str:n #1 - { \bool_if:nTF {#1} { true } { false } } + { \msg_log_eval:Nn \bool_to_str:n } % \end{macrocode} % \end{macro} -% \end{macro} % % \begin{macro}{\bool_show:N, \bool_show:c, \bool_log:N, \bool_log:c, \@@_show:NN} % Show the truth value of the boolean, as \texttt{true} or diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index df20a5c02c..ca6f9a3467 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -52,10 +52,10 @@ % \LaTeX3 implements a \enquote{property list} data type, which contain % an unordered list of entries each of which consists of a \meta{key} and % an associated \meta{value}. The \meta{key} and \meta{value} may both -% be any \meta{balanced text}, but the \meta{key} is processed using -% \cs{tl_to_str:n}, meaning that category codes are ignored. It is -% possible to map functions to property lists such that the function is -% applied to every key--value pair within the list. +% be any \meta{balanced text}, the \meta{key} is processed using +% \cs{tl_to_str:n}, meaning that category codes are ignored. It is possible to +% map functions to property lists such that the function is applied to every +% key--value pair within the list. % % Each entry in a property list must have a unique \meta{key}: if an entry is % added to a property list which already contains the \meta{key} then the new @@ -111,7 +111,7 @@ % \meta{property list_2}. % \end{function} % -% \begin{function}[added = 2017-11-28, updated = 2019-08-25] +% \begin{function}[added = 2017-11-28, updated = 2021-11-07] % { % \prop_set_from_keyval:Nn, \prop_set_from_keyval:cn, % \prop_gset_from_keyval:Nn, \prop_gset_from_keyval:cn, @@ -131,9 +131,11 @@ % group then a set of outer braces is removed. This enables both the % \meta{key} and the \meta{value} to contain spaces, commas or equal % signs. The \meta{key} is then processed by \cs{tl_to_str:n}. +% This function correctly detects the |=| and |,| signs provided they +% have the standard category code~$12$ or they are active. % \end{function} % -% \begin{function}[added = 2017-11-28, updated = 2019-08-25] +% \begin{function}[added = 2017-11-28, updated = 2021-11-07] % {\prop_const_from_keyval:Nn, \prop_const_from_keyval:cn} % \begin{syntax} % \cs{prop_const_from_keyval:Nn} \meta{prop~var} @@ -147,6 +149,8 @@ % contain key--value pairs given in the second argument, processed in % the way described for \cs{prop_set_from_keyval:Nn}. If duplicate % keys appear only the last of the values is kept. +% This function correctly detects the |=| and |,| signs provided they +% have the standard category code~$12$ or they are active. % \end{function} % % \section{Adding and updating property list entries} @@ -205,7 +209,7 @@ % last value, namely the value in \meta{prop~var_3} is kept. % \end{function} % -% \begin{function}[added = 2021-05-16] +% \begin{function}[added = 2021-05-16, updated = 2021-11-07] % { % \prop_put_from_keyval:Nn, \prop_put_from_keyval:cn, % \prop_gput_from_keyval:Nn, \prop_gput_from_keyval:cn, @@ -230,6 +234,8 @@ % \cs{prop_concat:NNN}. In particular, the \meta{keys} and % \meta{values} are space-trimmed and unbraced as described in % \cs{prop_set_from_keyval:Nn}. +% This function correctly detects the |=| and |,| signs provided they +% have the standard category code~$12$ or they are active. % \end{function} % % \section{Recovering values from property lists} @@ -793,7 +799,7 @@ \cs_new_protected:Npn \@@_concat:NNNN #1#2#3#4 { \prop_set_eq:NN \l_@@_internal_prop #3 - \prop_map_tokens:Nn #4 { \prop_put:Nnn \l_@@_internal_prop } + \prop_map_inline:Nn #4 { \prop_put:Nnn \l_@@_internal_prop {##1} {##2} } #1 #2 \l_@@_internal_prop } % \end{macrocode} @@ -804,16 +810,7 @@ % \begin{macro}{\prop_const_from_keyval:Nn, \prop_const_from_keyval:cn} % \begin{macro}{\prop_put_from_keyval:Nn, \prop_put_from_keyval:cn} % \begin{macro}{\prop_gput_from_keyval:Nn, \prop_gput_from_keyval:cn} -% \begin{macro} -% { -% \@@_from_keyval:n, -% \@@_from_keyval_loop:w, -% \@@_from_keyval_split:Nw, -% \@@_from_keyval_key:n, -% \@@_from_keyval_key:w, -% \@@_from_keyval_value:n, -% \@@_from_keyval_value:w -% } +% \begin{macro}{\@@_missing_eq:n} % To avoid tracking throughout the loop the variable name and whether % the assignment is local/global, do everything in a scratch variable % and empty it afterwards to avoid wasting memory. Loop through items @@ -832,80 +829,48 @@ % output one key--value pair for the property list; otherwise complain % about a missing or extra~|=|. % \begin{macrocode} -\cs_new_protected:Npn \prop_set_from_keyval:Nn #1#2 +\cs_new_protected:Npn \prop_set_from_keyval:Nn #1 { - \prop_clear:N \l_@@_internal_prop - \@@_from_keyval:n {#2} - \prop_set_eq:NN #1 \l_@@_internal_prop - \prop_clear:N \l_@@_internal_prop + \prop_clear:N #1 + \prop_put_from_keyval:Nn #1 } \cs_generate_variant:Nn \prop_set_from_keyval:Nn { c } -\cs_new_protected:Npn \prop_gset_from_keyval:Nn #1#2 +\cs_new_protected:Npn \prop_gset_from_keyval:Nn #1 { - \prop_clear:N \l_@@_internal_prop - \@@_from_keyval:n {#2} - \prop_gset_eq:NN #1 \l_@@_internal_prop - \prop_clear:N \l_@@_internal_prop + \prop_gclear:N #1 + \prop_gput_from_keyval:Nn #1 } \cs_generate_variant:Nn \prop_gset_from_keyval:Nn { c } \cs_new_protected:Npn \prop_const_from_keyval:Nn #1#2 { - \prop_clear:N \l_@@_internal_prop - \@@_from_keyval:n {#2} + \prop_set_from_keyval:Nn \l_@@_internal_prop {#2} \tl_const:Nx #1 { \exp_not:o \l_@@_internal_prop } \prop_clear:N \l_@@_internal_prop } \cs_generate_variant:Nn \prop_const_from_keyval:Nn { c } -\cs_new_protected:Npn \prop_put_from_keyval:Nn #1#2 +\cs_new_protected:Npn \prop_put_from_keyval:Nn { - \prop_set_eq:NN \l_@@_internal_prop #1 - \@@_from_keyval:n {#2} - \prop_set_eq:NN #1 \l_@@_internal_prop - \prop_clear:N \l_@@_internal_prop + \bool_if:NTF \l__kernel_keyval_allow_blank_keys_bool + { \@@_keyval_parse:NNNn \c_true_bool } + { \@@_keyval_parse:NNNn \c_false_bool } + \prop_put:Nnn } \cs_generate_variant:Nn \prop_put_from_keyval:Nn { c } -\cs_new_protected:Npn \prop_gput_from_keyval:Nn #1#2 +\cs_new_protected:Npn \prop_gput_from_keyval:Nn { - \prop_set_eq:NN \l_@@_internal_prop #1 - \@@_from_keyval:n {#2} - \prop_gset_eq:NN #1 \l_@@_internal_prop - \prop_clear:N \l_@@_internal_prop + \bool_if:NTF \l__kernel_keyval_allow_blank_keys_bool + { \@@_keyval_parse:NNNn \c_true_bool } + { \@@_keyval_parse:NNNn \c_false_bool } + \prop_gput:Nnn } \cs_generate_variant:Nn \prop_gput_from_keyval:Nn { c } -\cs_new_protected:Npn \@@_from_keyval:n #1 - { - \@@_from_keyval_loop:w \prg_do_nothing: #1 , - \q_@@_recursion_tail , \q_@@_recursion_stop - } -\cs_new_protected:Npn \@@_from_keyval_loop:w #1 , - { - \@@_if_recursion_tail_stop:o {#1} - \@@_from_keyval_split:Nw \@@_from_keyval_key:n - #1 = = \s_@@_stop {#1} - \@@_from_keyval_loop:w \prg_do_nothing: - } -\cs_new_protected:Npn \@@_from_keyval_split:Nw #1#2 = - { \tl_trim_spaces_apply:oN {#2} #1 } -\cs_new_protected:Npn \@@_from_keyval_key:n #1 - { \@@_from_keyval_key:w #1 \s_@@_mark } -\cs_new_protected:Npn \@@_from_keyval_key:w #1 \s_@@_mark #2 \s_@@_stop +\cs_new_protected:Npn \@@_missing_eq:n + { \msg_error:nnn { prop } { prop-keyval } } +\cs_new_protected:Npn \@@_keyval_parse:NNNn #1#2#3#4 { - \@@_from_keyval_split:Nw \@@_from_keyval_value:n - \prg_do_nothing: #2 \s_@@_stop {#1} - } -\cs_new_protected:Npn \@@_from_keyval_value:n #1 - { \@@_from_keyval_value:w #1 \s_@@_mark } -\cs_new_protected:Npn \@@_from_keyval_value:w #1 \s_@@_mark #2 \s_@@_stop #3#4 - { - \tl_if_single:nTF {#2} - { \prop_put:Nnn \l_@@_internal_prop {#3} {#1} } - { - \tl_if_empty:nF { #3 #1 #2 } - { - \msg_error:nnx { prop } { prop-keyval } - { \exp_not:o {#4} } - } - } + \bool_set_eq:NN \l__kernel_keyval_allow_blank_keys_bool \c_true_bool + \keyval_parse:nnn \@@_missing_eq:n { #2 #3 } {#4} + \bool_set_eq:NN \l__kernel_keyval_allow_blank_keys_bool #1 } % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index a2d1080356..907bd9453e 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index db1ddee245..ac70e76eea 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -83,11 +83,12 @@ % % If a regular expression is to be used several times, % it can be compiled once, and stored in a regex -% variable using \cs{regex_const:Nn}. For example, +% variable using \cs{regex_set:Nn}. For example, % \begin{verbatim} -% \regex_const:Nn \c_foo_regex { \c{begin} \cB. (\c[^BE].*) \cE. } +% \regex_new:N \l_foo_regex +% \regex_set:Nn \l_foo_regex { \c{begin} \cB. (\c[^BE].*) \cE. } % \end{verbatim} -% stores in \cs[no-index]{c_foo_regex} a regular expression which matches the +% stores in \cs[no-index]{l_foo_regex} a regular expression which matches the % starting marker for an environment: \cs[no-index]{begin}, followed by a % begin-group token (|\cB.|), then any number of tokens which are % neither begin-group nor end-group character tokens (|\c[^BE].*|), @@ -164,7 +165,7 @@ % |\A|, |\B|, \ldots{} have special meanings; % \item non-alphanumeric printable ascii characters can (and should) % always be escaped: many of them have special meanings (\emph{e.g.}, -% use |\(|, |\)|, |\?|, |\.|); +% use |\(|, |\)|, |\?|, |\.|, |\^|); % \item spaces should always be escaped (even in character % classes); % \item any other character may be escaped or not, without any @@ -335,11 +336,14 @@ % \meta{regex}, anchored at the beginning and end, so that |\c{begin}| % matches exactly \cs[no-index]{begin}, and nothing else. % \item[\\cX] Applies to the next object, which can be a character, -% character property, class, or group, and forces this object to -% only match tokens with category |X| (any of |CBEMTPUDSLOA|. For -% instance, |\cL[A-Z\d]| matches uppercase letters and digits of -% category code letter, |\cC.| matches any control sequence, and -% |\cO(abc)| matches |abc| where each character has category other. +% escape character sequence such as |\x{0A}|, character class, or +% group, and forces this object to only match tokens with category +% |X| (any of |CBEMTPUDSLOA|. For instance, |\cL[A-Z\d]| matches +% uppercase letters and digits of category code letter, |\cC.| +% matches any control sequence, and |\cO(abc)| matches |abc| where +% each character has category other.\footnote{This last example also +% captures \enquote{\texttt{abc}} as a regex group; to avoid this +% use a non-capturing group \texttt{\textbackslash cO(?:abc)}.} % \item[{\\c[XYZ]}] Applies to the next object, and forces it to only % match tokens with category |X|, |Y|, or |Z| (each being any of % |CBEMTPUDSLOA|). For instance, |\c[LSO](..)| matches two tokens of @@ -531,21 +535,27 @@ % \meta{regex~var} is initially such that it never matches. % \end{function} % -% \begin{function}[added = 2017-05-26] -% {\regex_set:Nn, \regex_gset:Nn, \regex_const:Nn} +% \begin{function}[added = 2017-05-26]{\regex_set:Nn, \regex_gset:Nn} % \begin{syntax} % \cs{regex_set:Nn} \meta{regex~var} \Arg{regex} % \end{syntax} -% Stores a compiled version of the \meta{regular expression} -% in the \meta{regex~var}. For instance, this function can be used -% as +% Stores a compiled version of the \meta{regular expression} in the +% \meta{regex~var}. The assignment is local for \cs{regex_set:Nn} and +% global for \cs{regex_gset:Nn}. For instance, this function can be +% used as % \begin{verbatim} % \regex_new:N \l_my_regex % \regex_set:Nn \l_my_regex { my\ (simple\ )? reg(ex|ular\ expression) } % \end{verbatim} -% The assignment is local for \cs{regex_set:Nn} and global for -% \cs{regex_gset:Nn}. Use \cs{regex_const:Nn} for compiled expressions -% which never change. +% \end{function} +% +% \begin{function}[added = 2017-05-26]{\regex_const:Nn} +% \begin{syntax} +% \cs{regex_const:Nn} \meta{regex~var} \Arg{regex} +% \end{syntax} +% Creates a new constant \meta{regex~var} or raises an error if the name +% is already taken. The value of the \meta{regex~var} is set +% globally to the compiled version of the \meta{regular expression}. % \end{function} % % \begin{function}[added = 2021-04-26, updated = 2021-04-29] @@ -722,7 +732,7 @@ % locally to \meta{tl~var}. % \end{function} % -% \section{Constants and variables} +% \section{Scratch regular expressions} % % \begin{variable}[added = 2017-12-11]{\l_tmpa_regex, \l_tmpb_regex} % Scratch regex for local assignment. These are never used by diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index 5585aa3ddb..5420a6df3e 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index 1556f14ed8..ef814af3f9 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index 8261afa088..6315417c35 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 72c260cdc0..edc2dd3cf5 100644 --- a/macros/latex/contrib/l3kernel/l3str-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index e84e2162a2..40fd7437f0 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -95,7 +95,7 @@ % appropriately. % \end{itemize} % -% \section{Building strings} +% \section{Creating and initialising string variables} % % \begin{function}[added = 2015-09-18]{\str_new:N, \str_new:c} % \begin{syntax} @@ -164,6 +164,16 @@ % this function does not convert their contents to a string. % \end{function} % +% \begin{function}[EXP, pTF, added = 2015-09-18] +% {\str_if_exist:N, \str_if_exist:c} +% \begin{syntax} +% \cs{str_if_exist_p:N} \meta{str~var} +% \cs{str_if_exist:NTF} \meta{str~var} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests whether the \meta{str~var} is currently defined. This does not +% check that the \meta{str~var} really is a string. +% \end{function} +% % \section{Adding data to string variables} % % \begin{function}[added = 2015-09-18, updated = 2018-07-28] @@ -210,84 +220,8 @@ % var} are not automatically converted to a string. % \end{function} % -% \section{Modifying string variables} -% -% \begin{function}[added = 2017-10-08] -% { -% \str_replace_once:Nnn, \str_replace_once:cnn, -% \str_greplace_once:Nnn, \str_greplace_once:cnn -% } -% \begin{syntax} -% \cs{str_replace_once:Nnn} \meta{str~var} \Arg{old} \Arg{new} -% \end{syntax} -% Converts the \meta{old} and \meta{new} token lists to strings, then -% replaces the first (leftmost) occurrence of \meta{old string} in the -% \meta{str~var} with \meta{new string}. -% \end{function} -% -% \begin{function}[added = 2017-10-08] -% { -% \str_replace_all:Nnn, \str_replace_all:cnn, -% \str_greplace_all:Nnn, \str_greplace_all:cnn -% } -% \begin{syntax} -% \cs{str_replace_all:Nnn} \meta{str~var} \Arg{old} \Arg{new} -% \end{syntax} -% Converts the \meta{old} and \meta{new} token lists to strings, then -% replaces all occurrences of \meta{old string} in the -% \meta{str~var} with \meta{new string}. -% As this function -% operates from left to right, the pattern \meta{old string} -% may remain after the replacement (see \cs{str_remove_all:Nn} -% for an example). -% \end{function} -% -% \begin{function}[added = 2017-10-08] -% { -% \str_remove_once:Nn, \str_remove_once:cn, -% \str_gremove_once:Nn, \str_gremove_once:cn -% } -% \begin{syntax} -% \cs{str_remove_once:Nn} \meta{str~var} \Arg{token list} -% \end{syntax} -% Converts the \meta{token list} to a \meta{string} then -% removes the first (leftmost) occurrence of \meta{string} from the -% \meta{str~var}. -% \end{function} -% -% \begin{function}[added = 2017-10-08] -% { -% \str_remove_all:Nn, \str_remove_all:cn, -% \str_gremove_all:Nn, \str_gremove_all:cn -% } -% \begin{syntax} -% \cs{str_remove_all:Nn} \meta{str~var} \Arg{token list} -% \end{syntax} -% Converts the \meta{token list} to a \meta{string} then -% removes all occurrences of \meta{string} from the -% \meta{str~var}. -% As this function -% operates from left to right, the pattern \meta{string} -% may remain after the removal, for instance, -% \begin{quote} -% \cs{str_set:Nn} \cs{l_tmpa_str} |{abbccd}| -% \cs{str_remove_all:Nn} \cs{l_tmpa_str} |{bc}| -% \end{quote} -% results in \cs{l_tmpa_str} containing \texttt{abcd}. -% \end{function} -% % \section{String conditionals} % -% \begin{function}[EXP, pTF, added = 2015-09-18] -% {\str_if_exist:N, \str_if_exist:c} -% \begin{syntax} -% \cs{str_if_exist_p:N} \meta{str~var} -% \cs{str_if_exist:NTF} \meta{str~var} \Arg{true code} \Arg{false code} -% \end{syntax} -% Tests whether the \meta{str~var} is currently defined. This does not -% check that the \meta{str~var} really is a string. -% \end{function} -% % \begin{function}[EXP,pTF, added = 2015-09-18] % {\str_if_empty:N, \str_if_empty:c} % \begin{syntax} @@ -459,6 +393,19 @@ % receives the \meta{character} as |#1|. % \end{function} % +% \begin{function}[rEXP, added = 2021-05-05] +% {\str_map_tokens:nn, \str_map_tokens:Nn, \str_map_tokens:cn} +% \begin{syntax} +% \cs{str_map_tokens:nn} \Arg{token list} \Arg{code} +% \cs{str_map_tokens:Nn} \meta{str~var} \Arg{code} +% \end{syntax} +% Converts the \meta{token list} to a \meta{string} then applies +% \meta{code} to every \meta{character} in the \meta{string} including +% spaces. The \meta{code} receives each character as a trailing brace +% group. This is equivalent to \cs{str_map_function:nN} if the +% \meta{code} consists of a single function. +% \end{function} +% % \begin{function}[added = 2017-11-14] % {\str_map_variable:nNn, \str_map_variable:NNn, \str_map_variable:cNn} % \begin{syntax} @@ -475,19 +422,6 @@ % \meta{string} is empty. See also \cs{str_map_inline:Nn}. % \end{function} % -% \begin{function}[rEXP, added = 2021-05-05] -% {\str_map_tokens:nn, \str_map_tokens:Nn, \str_map_tokens:cn} -% \begin{syntax} -% \cs{str_map_tokens:nn} \Arg{token list} \Arg{code} -% \cs{str_map_tokens:Nn} \meta{str~var} \Arg{code} -% \end{syntax} -% Converts the \meta{token list} to a \meta{string} then applies -% \meta{code} to every \meta{character} in the \meta{string} including -% spaces. The \meta{code} receives each character as a trailing brace -% group. This is equivalent to \cs{str_map_function:nN} if the -% \meta{code} consists of a single function. -% \end{function} -% % \begin{function}[added = 2017-10-08, rEXP]{\str_map_break:} % \begin{syntax} % \cs{str_map_break:} @@ -698,6 +632,72 @@ % instances of |bcde|. % ^^A\end{function} % +% \section{Modifying string variables} +% +% \begin{function}[added = 2017-10-08] +% { +% \str_replace_once:Nnn, \str_replace_once:cnn, +% \str_greplace_once:Nnn, \str_greplace_once:cnn +% } +% \begin{syntax} +% \cs{str_replace_once:Nnn} \meta{str~var} \Arg{old} \Arg{new} +% \end{syntax} +% Converts the \meta{old} and \meta{new} token lists to strings, then +% replaces the first (leftmost) occurrence of \meta{old string} in the +% \meta{str~var} with \meta{new string}. +% \end{function} +% +% \begin{function}[added = 2017-10-08] +% { +% \str_replace_all:Nnn, \str_replace_all:cnn, +% \str_greplace_all:Nnn, \str_greplace_all:cnn +% } +% \begin{syntax} +% \cs{str_replace_all:Nnn} \meta{str~var} \Arg{old} \Arg{new} +% \end{syntax} +% Converts the \meta{old} and \meta{new} token lists to strings, then +% replaces all occurrences of \meta{old string} in the +% \meta{str~var} with \meta{new string}. +% As this function +% operates from left to right, the pattern \meta{old string} +% may remain after the replacement (see \cs{str_remove_all:Nn} +% for an example). +% \end{function} +% +% \begin{function}[added = 2017-10-08] +% { +% \str_remove_once:Nn, \str_remove_once:cn, +% \str_gremove_once:Nn, \str_gremove_once:cn +% } +% \begin{syntax} +% \cs{str_remove_once:Nn} \meta{str~var} \Arg{token list} +% \end{syntax} +% Converts the \meta{token list} to a \meta{string} then +% removes the first (leftmost) occurrence of \meta{string} from the +% \meta{str~var}. +% \end{function} +% +% \begin{function}[added = 2017-10-08] +% { +% \str_remove_all:Nn, \str_remove_all:cn, +% \str_gremove_all:Nn, \str_gremove_all:cn +% } +% \begin{syntax} +% \cs{str_remove_all:Nn} \meta{str~var} \Arg{token list} +% \end{syntax} +% Converts the \meta{token list} to a \meta{string} then +% removes all occurrences of \meta{string} from the +% \meta{str~var}. +% As this function +% operates from left to right, the pattern \meta{string} +% may remain after the removal, for instance, +% \begin{quote} +% \cs{str_set:Nn} \cs{l_tmpa_str} |{abbccd}| +% \cs{str_remove_all:Nn} \cs{l_tmpa_str} |{bc}| +% \end{quote} +% results in \cs{l_tmpa_str} containing \texttt{abcd}. +% \end{function} +% % \section{String manipulation} % % \begin{function}[EXP, added = 2019-11-26] @@ -1163,22 +1163,23 @@ % \str_if_eq:ee % } % Modern engines provide a direct way of comparing two token lists, -% but returning a number. This set of conditionals therefore make life -% a bit clearer. The \texttt{nn} and \texttt{xx} versions are created -% directly as this is most efficient. +% but returning a number. This set of conditionals therefore makes life +% a bit clearer. The \texttt{nn} and \texttt{ee} versions are created +% directly as this is most efficient. Since \cs{@@_if_eq:nn} will expand to +% |0| as an explicit character with category 12 if the two lists match (and +% either |-1| or |1| if they don't) we can use \cs{if:w} here which is faster +% than using \cs{if_int_compare:w}. % \begin{macrocode} \prg_new_conditional:Npnn \str_if_eq:nn #1#2 { p , T , F , TF } { - \if_int_compare:w - \@@_if_eq:nn { \exp_not:n {#1} } { \exp_not:n {#2} } - = \c_zero_int + \if:w 0 \@@_if_eq:nn { \exp_not:n {#1} } { \exp_not:n {#2} } \prg_return_true: \else: \prg_return_false: \fi: } \prg_generate_conditional_variant:Nnn \str_if_eq:nn { V , v , o , nV , no , VV , nv } { p , T , F , TF } \prg_new_conditional:Npnn \str_if_eq:ee #1#2 { p , T , F , TF } { - \if_int_compare:w \@@_if_eq:nn {#1} {#2} = \c_zero_int + \if:w 0 \@@_if_eq:nn {#1} {#2} \prg_return_true: \else: \prg_return_false: \fi: } % \end{macrocode} @@ -1186,14 +1187,13 @@ % % \begin{macro}[EXP, pTF] % {\str_if_eq:NN, \str_if_eq:Nc, \str_if_eq:cN, \str_if_eq:cc} -% Note that \cs{str_if_eq:NN} is different from -% \cs{tl_if_eq:NN} because it needs to ignore category codes. +% Note that \cs{str_if_eq:NNTF} is different from +% \cs{tl_if_eq:NNTF} because it needs to ignore category codes. % \begin{macrocode} \prg_new_conditional:Npnn \str_if_eq:NN #1#2 { p , TF , T , F } { - \if_int_compare:w - \@@_if_eq:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 } - = \c_zero_int \prg_return_true: \else: \prg_return_false: \fi: + \if:w 0 \@@_if_eq:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 } + \prg_return_true: \else: \prg_return_false: \fi: } \prg_generate_conditional_variant:Nnn \str_if_eq:NN { c , Nc , cc } { T , F , TF , p } diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf Binary files differindex 4589d6a2d2..e8ec9a0b73 100644 --- a/macros/latex/contrib/l3kernel/l3styleguide.pdf +++ b/macros/latex/contrib/l3kernel/l3styleguide.pdf diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex index 3b3ec1b3bf..07f8105824 100644 --- a/macros/latex/contrib/l3kernel/l3styleguide.tex +++ b/macros/latex/contrib/l3kernel/l3styleguide.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-18} +\date{Released 2021-11-12} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf Binary files differindex 55d08cee70..c0043ad4b1 100644 --- a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf +++ b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex index 882304511f..035b9117fc 100644 --- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex +++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-18} +\date{Released 2021-11-12} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index 6aab0ca25f..39b091d7df 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf Binary files differindex 51c0c6d52c..33d947829f 100644 --- a/macros/latex/contrib/l3kernel/l3term-glossary.pdf +++ b/macros/latex/contrib/l3kernel/l3term-glossary.pdf diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex index 8e289903b6..88221a01da 100644 --- a/macros/latex/contrib/l3kernel/l3term-glossary.tex +++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-18} +\date{Released 2021-11-12} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 4647339a81..d27bae37d2 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index 5655cc757c..f1ad3be0fc 100644 --- a/macros/latex/contrib/l3kernel/l3text-purify.dtx +++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index defd0585f4..0fa054ccee 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index 84d740e6df..70522a9aac 100644 --- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index 13625c2542..bda39b5cf0 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -205,159 +205,6 @@ % \meta{tl~var}. % \end{function} % -% \section{Modifying token list variables} -% -% \begin{function}[updated = 2011-08-11] -% { -% \tl_replace_once:Nnn, \tl_replace_once:cnn, -% \tl_greplace_once:Nnn, \tl_greplace_once:cnn -% } -% \begin{syntax} -% \cs{tl_replace_once:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens} -% \end{syntax} -% Replaces the first (leftmost) occurrence of \meta{old tokens} in the -% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens} -% cannot contain |{|, |}| or |#| -% (more precisely, explicit character tokens with category code $1$ -% (begin-group) or $2$ (end-group), and tokens with category code $6$). -% \end{function} -% -% \begin{function}[updated = 2011-08-11] -% { -% \tl_replace_all:Nnn, \tl_replace_all:cnn, -% \tl_greplace_all:Nnn, \tl_greplace_all:cnn -% } -% \begin{syntax} -% \cs{tl_replace_all:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens} -% \end{syntax} -% Replaces all occurrences of \meta{old tokens} in the -% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens} -% cannot contain |{|, |}| or |#| -% (more precisely, explicit character tokens with category code $1$ -% (begin-group) or $2$ (end-group), and tokens with category code $6$). -% As this function -% operates from left to right, the pattern \meta{old tokens} -% may remain after the replacement (see \cs{tl_remove_all:Nn} -% for an example). -% \end{function} -% -% \begin{function}[updated = 2011-08-11] -% { -% \tl_remove_once:Nn, \tl_remove_once:cn, -% \tl_gremove_once:Nn, \tl_gremove_once:cn -% } -% \begin{syntax} -% \cs{tl_remove_once:Nn} \meta{tl~var} \Arg{tokens} -% \end{syntax} -% Removes the first (leftmost) occurrence of \meta{tokens} from the -% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#| -% (more precisely, explicit character tokens with category code $1$ -% (begin-group) or $2$ (end-group), and tokens with category code $6$). -% \end{function} -% -% \begin{function}[updated = 2011-08-11] -% { -% \tl_remove_all:Nn, \tl_remove_all:cn, -% \tl_gremove_all:Nn, \tl_gremove_all:cn -% } -% \begin{syntax} -% \cs{tl_remove_all:Nn} \meta{tl~var} \Arg{tokens} -% \end{syntax} -% Removes all occurrences of \meta{tokens} from the -% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#| -% (more precisely, explicit character tokens with category code $1$ -% (begin-group) or $2$ (end-group), and tokens with category code $6$). -% As this function -% operates from left to right, the pattern \meta{tokens} -% may remain after the removal, for instance, -% \begin{quote} -% \cs{tl_set:Nn} \cs{l_tmpa_tl} |{abbccd}| -% \cs{tl_remove_all:Nn} \cs{l_tmpa_tl} |{bc}| -% \end{quote} -% results in \cs{l_tmpa_tl} containing \texttt{abcd}. -% \end{function} -% -% \section{Reassigning token list category codes} -% -% These functions allow the rescanning of tokens: re-apply \TeX{}'s -% tokenization process to apply category codes different from those -% in force when the tokens were absorbed. Whilst this functionality is -% supported, it is often preferable to find alternative approaches -% to achieving outcomes rather than rescanning tokens (for example -% construction of token lists token-by-token with intervening category -% code changes or using \cs{char_generate:nn}). -% -% \begin{function}[updated = 2015-08-11] -% { -% \tl_set_rescan:Nnn, \tl_set_rescan:Nno, \tl_set_rescan:Nnx, -% \tl_set_rescan:cnn, \tl_set_rescan:cno, \tl_set_rescan:cnx, -% \tl_gset_rescan:Nnn, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx, -% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx -% } -% \begin{syntax} -% \cs{tl_set_rescan:Nnn} \meta{tl~var} \Arg{setup} \Arg{tokens} -% \end{syntax} -% Sets \meta{tl~var} to contain \meta{tokens}, applying the category -% code r\'{e}gime specified in the \meta{setup} before carrying out -% the assignment. (Category codes applied to tokens not explicitly covered -% by the \meta{setup} are those in force at the point of use of -% \cs{tl_set_rescan:Nnn}.) -% This allows the \meta{tl~var} to contain material -% with category codes other than those that apply when \meta{tokens} -% are absorbed. The \meta{setup} is run within a group and may -% contain any valid input, although only changes in category codes, -% such as uses of \cs{cctab_select:N}, -% are relevant. See also \cs{tl_rescan:nn}. -% \begin{texnote} -% The \meta{tokens} are first turned into a string (using -% \cs{tl_to_str:n}). If the string contains one or more characters -% with character code \tn{newlinechar} (set equal to -% \tn{endlinechar} unless that is equal to $32$, before the user -% \meta{setup}), then it is split into lines at these characters, -% then read as if reading multiple lines from a file, ignoring -% spaces (catcode $10$) at the beginning and spaces and tabs -% (character code $32$ or $9$) at the end of every line. -% Otherwise, spaces (and tabs) are retained at both ends of the -% single-line string, as if it appeared in the middle of a line -% read from a file. -% \end{texnote} -% \end{function} -% -% \begin{function}[updated = 2015-08-11]{\tl_rescan:nn} -% \begin{syntax} -% \cs{tl_rescan:nn} \Arg{setup} \Arg{tokens} -% \end{syntax} -% Rescans \meta{tokens} applying the category code r\'{e}gime -% specified in the \meta{setup}, and leaves the resulting tokens in -% the input stream. (Category codes applied to tokens not explicitly covered -% by the \meta{setup} are those in force at the point of use of -% \cs{tl_rescan:nn}.) -% The \meta{setup} is run within a group and may -% contain any valid input, although only changes in category codes, -% such as uses of \cs{cctab_select:N}, -% are relevant. See also \cs{tl_set_rescan:Nnn}, which is more -% robust than using \cs{tl_set:Nn} in the \meta{tokens} argument of -% \cs{tl_rescan:nn}. -% \begin{texnote} -% The \meta{tokens} are first turned into a string (using -% \cs{tl_to_str:n}). If the string contains one or more characters -% with character code \tn{newlinechar} (set equal to -% \tn{endlinechar} unless that is equal to $32$, before the user -% \meta{setup}), then it is split into lines at these characters, -% then read as if reading multiple lines from a file, ignoring -% spaces (catcode $10$) at the beginning and spaces and tabs -% (character code $32$ or $9$) at the end of every line. -% Otherwise, spaces (and tabs) are retained at both ends of the -% single-line string, as if it appeared in the middle of a line -% read from a file. -% -% Contrarily to the \tn{scantokens} primitive, \cs{tl_rescan:nn} -% tokenizes the whole string in the same category code regime rather -% than one token at a time, so that directives such as \tn{verb} -% that rely on changing category codes will not function properly. -% \end{texnote} -% \end{function} -% % \section{Token list conditionals} % % \begin{function}[EXP,pTF, updated = 2019-09-04] @@ -473,7 +320,7 @@ % \cs{tl_if_single_p:N} \meta{tl~var} % \cs{tl_if_single:NTF} \meta{tl~var} \Arg{true code} \Arg{false code} % \end{syntax} -% Tests if the content of the \meta{tl~var} consists of a single item, +% Tests if the content of the \meta{tl~var} consists of a single \meta{item}, % \emph{i.e.}~is a single normal token (neither an explicit space % character nor a begin-group character) or a single brace group, % surrounded by optional spaces on both sides. In other words, such a @@ -485,7 +332,7 @@ % \cs{tl_if_single_p:n} \Arg{token list} % \cs{tl_if_single:nTF} \Arg{token list} \Arg{true code} \Arg{false code} % \end{syntax} -% Tests if the \meta{token list} has exactly one item, \emph{i.e.}~is +% Tests if the \meta{token list} has exactly one \meta{item}, \emph{i.e.}~is % a single normal token (neither an explicit space character nor a % begin-group character) or a single brace group, surrounded by % optional spaces on both sides. In other words, such a token list has @@ -498,7 +345,7 @@ % \cs{tl_if_single_token:nTF} \Arg{token list} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the token list consists of exactly one token, \emph{i.e.}~is -% either a single space character or a single \enquote{normal} token. +% either a single space character or a single normal token. % Token groups (|{|\ldots|}|) are not single tokens. % \end{function} % @@ -526,152 +373,93 @@ % available. % \end{function} % -% \section{Mapping over token lists} +% \subsection{Testing the first token} % -% All mappings are done at the current group level, \emph{i.e.}~any -% local assignments made by the \meta{function} or \meta{code} discussed -% below remain in effect after the loop. -% -% \begin{function}[updated = 2012-06-29, rEXP] -% {\tl_map_function:NN, \tl_map_function:cN} -% \begin{syntax} -% \cs{tl_map_function:NN} \meta{tl~var} \meta{function} -% \end{syntax} -% Applies \meta{function} to every \meta{item} in the \meta{tl~var}. -% The \meta{function} receives one argument for each iteration. -% This may be a number of tokens if the \meta{item} was stored within -% braces. Hence the \meta{function} should anticipate receiving -% \texttt{n}-type arguments. See also \cs{tl_map_function:nN}. -% \end{function} -% -% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_function:nN} -% \begin{syntax} -% \cs{tl_map_function:nN} \Arg{token list} \meta{function} -% \end{syntax} -% Applies \meta{function} to every \meta{item} in the \meta{token list}, -% The \meta{function} receives one argument for each iteration. -% This may be a number of tokens if the \meta{item} was stored within -% braces. Hence the \meta{function} should anticipate receiving -% \texttt{n}-type arguments. See also \cs{tl_map_function:NN}. -% \end{function} -% -% \begin{function}[updated = 2012-06-29] -% {\tl_map_inline:Nn, \tl_map_inline:cn} +% \begin{function}[updated = 2012-07-09, EXP, pTF] +% {\tl_if_head_eq_catcode:nN, \tl_if_head_eq_catcode:oN} % \begin{syntax} -% \cs{tl_map_inline:Nn} \meta{tl~var} \Arg{inline function} +% \cs{tl_if_head_eq_catcode_p:nN} \Arg{token list} \meta{test token} +% \cs{tl_if_head_eq_catcode:nNTF} \Arg{token list} \meta{test token} +% ~~\Arg{true code} \Arg{false code} % \end{syntax} -% Applies the \meta{inline function} to every \meta{item} stored within the -% \meta{tl~var}. The \meta{inline function} should consist of code which -% receives the \meta{item} as |#1|. See also \cs{tl_map_function:NN}. +% Tests if the first \meta{token} in the \meta{token list} has the +% same category code as the \meta{test token}. In the case where the +% \meta{token list} is empty, the test is always \texttt{false}. % \end{function} % -% \begin{function}[updated = 2012-06-29]{\tl_map_inline:nn} +% \begin{function}[updated = 2012-07-09, EXP, pTF] +% {\tl_if_head_eq_charcode:nN, \tl_if_head_eq_charcode:fN} % \begin{syntax} -% \cs{tl_map_inline:nn} \Arg{token list} \Arg{inline function} +% \cs{tl_if_head_eq_charcode_p:nN} \Arg{token list} \meta{test token} +% \cs{tl_if_head_eq_charcode:nNTF} \Arg{token list} \meta{test token} +% ~~\Arg{true code} \Arg{false code} % \end{syntax} -% Applies the \meta{inline function} to every \meta{item} stored within the -% \meta{token list}. The \meta{inline function} should consist of code which -% receives the \meta{item} as |#1|. See also \cs{tl_map_function:nN}. +% Tests if the first \meta{token} in the \meta{token list} has the +% same character code as the \meta{test token}. In the case where the +% \meta{token list} is empty, the test is always \texttt{false}. % \end{function} % -% \begin{function}[rEXP, added = 2019-09-02] -% {\tl_map_tokens:Nn, \tl_map_tokens:cn, \tl_map_tokens:nn} +% \begin{function}[updated = 2012-07-09, EXP, pTF]{\tl_if_head_eq_meaning:nN} % \begin{syntax} -% \cs{tl_map_tokens:Nn} \meta{tl~var} \Arg{code} -% \cs{tl_map_tokens:nn} \Arg{tokens} \Arg{code} +% \cs{tl_if_head_eq_meaning_p:nN} \Arg{token list} \meta{test token} +% \cs{tl_if_head_eq_meaning:nNTF} \Arg{token list} \meta{test token} +% ~~\Arg{true code} \Arg{false code} % \end{syntax} -% Analogue of \cs{tl_map_function:NN} which maps several tokens -% instead of a single function. The \meta{code} receives each item in -% the \meta{tl~var} or in \meta{tokens} as a trailing brace group. For -% instance, -% \begin{verbatim} -% \tl_map_tokens:Nn \l_my_tl { \prg_replicate:nn { 2 } } -% \end{verbatim} -% expands to twice each item in the \meta{tl~var}: for each item in -% \cs[no-index]{l_my_tl} the function \cs{prg_replicate:nn} receives |2| and -% \meta{item} as its two arguments. The function -% \cs{tl_map_inline:Nn} is typically faster but is not expandable. +% Tests if the first \meta{token} in the \meta{token list} has the +% same meaning as the \meta{test token}. In the case where +% \meta{token list} is empty, the test is always \texttt{false}. % \end{function} % -% \begin{function}[updated = 2012-06-29] -% {\tl_map_variable:NNn, \tl_map_variable:cNn} +% \begin{function}[added = 2012-07-08, EXP, pTF]{\tl_if_head_is_group:n} % \begin{syntax} -% \cs{tl_map_variable:NNn} \meta{tl~var} \meta{variable} \Arg{code} +% \cs{tl_if_head_is_group_p:n} \Arg{token list} +% \cs{tl_if_head_is_group:nTF} \Arg{token list} \Arg{true code} \Arg{false code} % \end{syntax} -% Stores each \meta{item} of the \meta{tl~var} in turn in the (token -% list) \meta{variable} and applies the \meta{code}. The \meta{code} -% will usually make use of the \meta{variable}, but this is not -% enforced. The assignments to the \meta{variable} are local. Its -% value after the loop is the last \meta{item} in the \meta{tl~var}, -% or its original value if the \meta{tl~var} is blank. See also -% \cs{tl_map_inline:Nn}. +% Tests if the first \meta{token} in the \meta{token list} +% is an explicit begin-group character (with category code~$1$ +% and any character code), in other words, if the \meta{token list} +% starts with a brace group. In particular, the test is \texttt{false} +% if the \meta{token list} starts with an implicit token such as +% \cs{c_group_begin_token}, or if it is empty. +% This function is useful to implement actions on token lists on +% a token by token basis. % \end{function} % -% \begin{function}[updated = 2012-06-29]{\tl_map_variable:nNn} +% \begin{function}[added = 2012-07-08, EXP, pTF]{\tl_if_head_is_N_type:n} % \begin{syntax} -% \cs{tl_map_variable:nNn} \Arg{token list} \meta{variable} \Arg{code} +% \cs{tl_if_head_is_N_type_p:n} \Arg{token list} +% \cs{tl_if_head_is_N_type:nTF} \Arg{token list} \Arg{true code} \Arg{false code} % \end{syntax} -% Stores each \meta{item} of the \meta{token list} in turn in the -% (token list) \meta{variable} and applies the \meta{code}. The -% \meta{code} will usually make use of the \meta{variable}, but this -% is not enforced. The assignments to the \meta{variable} are local. -% Its value after the loop is the last \meta{item} in the -% \meta{tl~var}, or its original value if the \meta{tl~var} is blank. -% See also \cs{tl_map_inline:nn}. +% Tests if the first \meta{token} in the \meta{token list} +% is a normal \texttt{N}-type argument. In other words, +% it is neither an explicit space character +% (explicit token with character code~$32$ and category code~$10$) +% nor an explicit begin-group character +% (with category code~1 and any character code). An empty +% argument yields \texttt{false}, as it does not have a normal +% first token. +% This function is useful to implement actions on token lists on +% a token by token basis. % \end{function} % -% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_break:} +% \begin{function}[updated = 2012-07-08, EXP, pTF]{\tl_if_head_is_space:n} % \begin{syntax} -% \cs{tl_map_break:} +% \cs{tl_if_head_is_space_p:n} \Arg{token list} +% \cs{tl_if_head_is_space:nTF} \Arg{token list} \Arg{true code} \Arg{false code} % \end{syntax} -% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all -% entries in the \meta{token list variable} have been processed. This -% normally takes place within a conditional statement, for example -% \begin{verbatim} -% \tl_map_inline:Nn \l_my_tl -% { -% \str_if_eq:nnT { #1 } { bingo } { \tl_map_break: } -% % Do something useful -% } -% \end{verbatim} -% See also \cs{tl_map_break:n}. -% Use outside of a \cs[no-index]{tl_map_\ldots} scenario leads to low -% level \TeX{} errors. -% \begin{texnote} -% When the mapping is broken, additional tokens may be inserted -% before the \meta{tokens} are -% inserted into the input stream. -% This depends on the design of the mapping function. -% \end{texnote} +% Tests if the first \meta{token} in the \meta{token list} +% is an explicit space character +% (explicit token with character code~$12$ and category code~$10$). +% In particular, the test is \texttt{false} if the \meta{token list} +% starts with an implicit token such as \cs{c_space_token}, or if it +% is empty. +% This function is useful to implement actions on token lists on +% a token by token basis. % \end{function} % -% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_break:n} -% \begin{syntax} -% \cs{tl_map_break:n} \Arg{code} -% \end{syntax} -% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all -% entries in the \meta{token list variable} have been processed, inserting -% the \meta{code} after the mapping has ended. This -% normally takes place within a conditional statement, for example -% \begin{verbatim} -% \tl_map_inline:Nn \l_my_tl -% { -% \str_if_eq:nnT { #1 } { bingo } -% { \tl_map_break:n { <code> } } -% % Do something useful -% } -% \end{verbatim} -% Use outside of a \cs[no-index]{tl_map_\ldots} scenario leads to low -% level \TeX{} errors. -% \begin{texnote} -% When the mapping is broken, additional tokens may be inserted -% before the \meta{code} is -% inserted into the input stream. -% This depends on the design of the mapping function. -% \end{texnote} -% \end{function} +% \section{Working with token lists as a whole} % -% \section{Using token lists} +% \subsection{Using token lists} % % \begin{function}[EXP]{\tl_to_str:n, \tl_to_str:V} % \begin{syntax} @@ -733,7 +521,7 @@ % a \meta{tl~var} directly without an accessor function. % \end{function} % -% \section{Working with the content of token lists} +% \subsection{Counting and reversing token lists} % % \begin{function}[added = 2012-05-13, EXP] % {\tl_count:n, \tl_count:V, \tl_count:o} @@ -752,7 +540,7 @@ % \begin{syntax} % \cs{tl_count:N} \meta{tl~var} % \end{syntax} -% Counts the number of token groups in the \meta{tl~var} +% Counts the number of \meta{items} in the \meta{tl~var} % and leaves this information in the input stream. Unbraced tokens % count as one element as do each token group (|{|\ldots|}|). This % process ignores any unprotected spaces within the \meta{tl~var}. @@ -867,36 +655,194 @@ % \emph{resets} the content of the variable. % \end{function} % -% \begin{function}[added = 2017-02-06] -% {\tl_sort:Nn, \tl_sort:cn, \tl_gsort:Nn, \tl_gsort:cn} +% \subsection{Viewing token lists} +% +% \begin{function}[updated = 2021-04-29]{\tl_show:N, \tl_show:c} % \begin{syntax} -% \cs{tl_sort:Nn} \meta{tl var} \Arg{comparison code} +% \cs{tl_show:N} \meta{tl~var} % \end{syntax} -% Sorts the items in the \meta{tl var} according to the -% \meta{comparison code}, and assigns the result to -% \meta{tl var}. The details of sorting comparison are -% described in Section~\ref{sec:l3sort:mech}. +% Displays the content of the \meta{tl~var} on the terminal. +% \begin{texnote} +% This is similar to the \TeX{} primitive \tn{show}, wrapped to a +% fixed number of characters per line. +% \end{texnote} % \end{function} % -% \begin{function}[added = 2017-02-06, EXP]{\tl_sort:nN} +% \begin{function}[updated = 2015-08-07]{\tl_show:n} % \begin{syntax} -% \cs{tl_sort:nN} \Arg{token list} \meta{conditional} +% \cs{tl_show:n} \Arg{token list} % \end{syntax} -% Sorts the items in the \meta{token list}, using the -% \meta{conditional} to compare items, and leaves the result in the -% input stream. The \meta{conditional} should have signature |:nnTF|, -% and return \texttt{true} if the two items being compared should be -% left in the same order, and \texttt{false} if the items should be -% swapped. The details of sorting comparison are -% described in Section~\ref{sec:l3sort:mech}. +% Displays the \meta{token list} on the terminal. % \begin{texnote} -% The result is returned within \cs{exp_not:n}, which means that the -% token list does not expand further when appearing in an -% \texttt{x}-type or \texttt{e}-type argument expansion. +% This is similar to the \eTeX{} primitive \tn{showtokens}, wrapped +% to a fixed number of characters per line. +% \end{texnote} +% \end{function} +% +% \begin{function}[added = 2014-08-22, updated = 2021-04-29]{\tl_log:N, \tl_log:c} +% \begin{syntax} +% \cs{tl_log:N} \meta{tl~var} +% \end{syntax} +% Writes the content of the \meta{tl~var} in the log file. See also +% \cs{tl_show:N} which displays the result in the terminal. +% \end{function} +% +% \begin{function}[added = 2014-08-22, updated = 2015-08-07]{\tl_log:n} +% \begin{syntax} +% \cs{tl_log:n} \Arg{token list} +% \end{syntax} +% Writes the \meta{token list} in the log file. See also +% \cs{tl_show:n} which displays the result in the terminal. +% \end{function} +% +% \section{Manipulating items in token lists} +% +% \subsection{Mapping over token lists} +% +% All mappings are done at the current group level, \emph{i.e.}~any +% local assignments made by the \meta{function} or \meta{code} discussed +% below remain in effect after the loop. +% +% \begin{function}[updated = 2012-06-29, rEXP] +% {\tl_map_function:NN, \tl_map_function:cN} +% \begin{syntax} +% \cs{tl_map_function:NN} \meta{tl~var} \meta{function} +% \end{syntax} +% Applies \meta{function} to every \meta{item} in the \meta{tl~var}. +% The \meta{function} receives one argument for each iteration. +% This may be a number of tokens if the \meta{item} was stored within +% braces. Hence the \meta{function} should anticipate receiving +% \texttt{n}-type arguments. See also \cs{tl_map_function:nN}. +% \end{function} +% +% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_function:nN} +% \begin{syntax} +% \cs{tl_map_function:nN} \Arg{token list} \meta{function} +% \end{syntax} +% Applies \meta{function} to every \meta{item} in the \meta{token list}, +% The \meta{function} receives one argument for each iteration. +% This may be a number of tokens if the \meta{item} was stored within +% braces. Hence the \meta{function} should anticipate receiving +% \texttt{n}-type arguments. See also \cs{tl_map_function:NN}. +% \end{function} +% +% \begin{function}[updated = 2012-06-29] +% {\tl_map_inline:Nn, \tl_map_inline:cn} +% \begin{syntax} +% \cs{tl_map_inline:Nn} \meta{tl~var} \Arg{inline function} +% \end{syntax} +% Applies the \meta{inline function} to every \meta{item} stored within the +% \meta{tl~var}. The \meta{inline function} should consist of code which +% receives the \meta{item} as |#1|. See also \cs{tl_map_function:NN}. +% \end{function} +% +% \begin{function}[updated = 2012-06-29]{\tl_map_inline:nn} +% \begin{syntax} +% \cs{tl_map_inline:nn} \Arg{token list} \Arg{inline function} +% \end{syntax} +% Applies the \meta{inline function} to every \meta{item} stored within the +% \meta{token list}. The \meta{inline function} should consist of code which +% receives the \meta{item} as |#1|. See also \cs{tl_map_function:nN}. +% \end{function} +% +% \begin{function}[rEXP, added = 2019-09-02] +% {\tl_map_tokens:Nn, \tl_map_tokens:cn, \tl_map_tokens:nn} +% \begin{syntax} +% \cs{tl_map_tokens:Nn} \meta{tl~var} \Arg{code} +% \cs{tl_map_tokens:nn} \Arg{tokens} \Arg{code} +% \end{syntax} +% Analogue of \cs{tl_map_function:NN} which maps several tokens +% instead of a single function. The \meta{code} receives each \meta{item} in +% the \meta{tl~var} or in \meta{tokens} as a trailing brace group. For +% instance, +% \begin{verbatim} +% \tl_map_tokens:Nn \l_my_tl { \prg_replicate:nn { 2 } } +% \end{verbatim} +% expands to twice each \meta{item} in the \meta{tl~var}: for each \meta{item} in +% \cs[no-index]{l_my_tl} the function \cs{prg_replicate:nn} receives |2| and +% \meta{item} as its two arguments. The function +% \cs{tl_map_inline:Nn} is typically faster but is not expandable. +% \end{function} +% +% \begin{function}[updated = 2012-06-29] +% {\tl_map_variable:NNn, \tl_map_variable:cNn} +% \begin{syntax} +% \cs{tl_map_variable:NNn} \meta{tl~var} \meta{variable} \Arg{code} +% \end{syntax} +% Stores each \meta{item} of the \meta{tl~var} in turn in the (token +% list) \meta{variable} and applies the \meta{code}. The \meta{code} +% will usually make use of the \meta{variable}, but this is not +% enforced. The assignments to the \meta{variable} are local. Its +% value after the loop is the last \meta{item} in the \meta{tl~var}, +% or its original value if the \meta{tl~var} is blank. See also +% \cs{tl_map_inline:Nn}. +% \end{function} +% +% \begin{function}[updated = 2012-06-29]{\tl_map_variable:nNn} +% \begin{syntax} +% \cs{tl_map_variable:nNn} \Arg{token list} \meta{variable} \Arg{code} +% \end{syntax} +% Stores each \meta{item} of the \meta{token list} in turn in the +% (token list) \meta{variable} and applies the \meta{code}. The +% \meta{code} will usually make use of the \meta{variable}, but this +% is not enforced. The assignments to the \meta{variable} are local. +% Its value after the loop is the last \meta{item} in the +% \meta{tl~var}, or its original value if the \meta{tl~var} is blank. +% See also \cs{tl_map_inline:nn}. +% \end{function} +% +% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_break:} +% \begin{syntax} +% \cs{tl_map_break:} +% \end{syntax} +% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all +% entries in the \meta{token list variable} have been processed. This +% normally takes place within a conditional statement, for example +% \begin{verbatim} +% \tl_map_inline:Nn \l_my_tl +% { +% \str_if_eq:nnT { #1 } { bingo } { \tl_map_break: } +% % Do something useful +% } +% \end{verbatim} +% See also \cs{tl_map_break:n}. +% Use outside of a \cs[no-index]{tl_map_\ldots} scenario leads to low +% level \TeX{} errors. +% \begin{texnote} +% When the mapping is broken, additional tokens may be inserted +% before the \meta{tokens} are +% inserted into the input stream. +% This depends on the design of the mapping function. % \end{texnote} % \end{function} % -% \section{The first token from a token list} +% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_break:n} +% \begin{syntax} +% \cs{tl_map_break:n} \Arg{code} +% \end{syntax} +% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all +% entries in the \meta{token list variable} have been processed, inserting +% the \meta{code} after the mapping has ended. This +% normally takes place within a conditional statement, for example +% \begin{verbatim} +% \tl_map_inline:Nn \l_my_tl +% { +% \str_if_eq:nnT { #1 } { bingo } +% { \tl_map_break:n { <code> } } +% % Do something useful +% } +% \end{verbatim} +% Use outside of a \cs[no-index]{tl_map_\ldots} scenario leads to low +% level \TeX{} errors. +% \begin{texnote} +% When the mapping is broken, additional tokens may be inserted +% before the \meta{code} is +% inserted into the input stream. +% This depends on the design of the mapping function. +% \end{texnote} +% \end{function} +% +% \subsection{Head and tail of token lists} % % Functions which deal with either only the very first item (balanced % text or single normal token) in a token list, or the remaining tokens. @@ -979,89 +925,7 @@ % \end{texnote} % \end{function} % -% \begin{function}[updated = 2012-07-09, EXP, pTF] -% {\tl_if_head_eq_catcode:nN, \tl_if_head_eq_catcode:oN} -% \begin{syntax} -% \cs{tl_if_head_eq_catcode_p:nN} \Arg{token list} \meta{test token} -% \cs{tl_if_head_eq_catcode:nNTF} \Arg{token list} \meta{test token} -% ~~\Arg{true code} \Arg{false code} -% \end{syntax} -% Tests if the first \meta{token} in the \meta{token list} has the -% same category code as the \meta{test token}. In the case where the -% \meta{token list} is empty, the test is always \texttt{false}. -% \end{function} -% -% \begin{function}[updated = 2012-07-09, EXP, pTF] -% {\tl_if_head_eq_charcode:nN, \tl_if_head_eq_charcode:fN} -% \begin{syntax} -% \cs{tl_if_head_eq_charcode_p:nN} \Arg{token list} \meta{test token} -% \cs{tl_if_head_eq_charcode:nNTF} \Arg{token list} \meta{test token} -% ~~\Arg{true code} \Arg{false code} -% \end{syntax} -% Tests if the first \meta{token} in the \meta{token list} has the -% same character code as the \meta{test token}. In the case where the -% \meta{token list} is empty, the test is always \texttt{false}. -% \end{function} -% -% \begin{function}[updated = 2012-07-09, EXP, pTF]{\tl_if_head_eq_meaning:nN} -% \begin{syntax} -% \cs{tl_if_head_eq_meaning_p:nN} \Arg{token list} \meta{test token} -% \cs{tl_if_head_eq_meaning:nNTF} \Arg{token list} \meta{test token} -% ~~\Arg{true code} \Arg{false code} -% \end{syntax} -% Tests if the first \meta{token} in the \meta{token list} has the -% same meaning as the \meta{test token}. In the case where -% \meta{token list} is empty, the test is always \texttt{false}. -% \end{function} -% -% \begin{function}[added = 2012-07-08, EXP, pTF]{\tl_if_head_is_group:n} -% \begin{syntax} -% \cs{tl_if_head_is_group_p:n} \Arg{token list} -% \cs{tl_if_head_is_group:nTF} \Arg{token list} \Arg{true code} \Arg{false code} -% \end{syntax} -% Tests if the first \meta{token} in the \meta{token list} -% is an explicit begin-group character (with category code~$1$ -% and any character code), in other words, if the \meta{token list} -% starts with a brace group. In particular, the test is \texttt{false} -% if the \meta{token list} starts with an implicit token such as -% \cs{c_group_begin_token}, or if it is empty. -% This function is useful to implement actions on token lists on -% a token by token basis. -% \end{function} -% -% \begin{function}[added = 2012-07-08, EXP, pTF]{\tl_if_head_is_N_type:n} -% \begin{syntax} -% \cs{tl_if_head_is_N_type_p:n} \Arg{token list} -% \cs{tl_if_head_is_N_type:nTF} \Arg{token list} \Arg{true code} \Arg{false code} -% \end{syntax} -% Tests if the first \meta{token} in the \meta{token list} -% is a normal \texttt{N}-type argument. In other words, -% it is neither an explicit space character -% (explicit token with character code~$32$ and category code~$10$) -% nor an explicit begin-group character -% (with category code~1 and any character code). An empty -% argument yields \texttt{false}, as it does not have a \enquote{normal} -% first token. -% This function is useful to implement actions on token lists on -% a token by token basis. -% \end{function} -% -% \begin{function}[updated = 2012-07-08, EXP, pTF]{\tl_if_head_is_space:n} -% \begin{syntax} -% \cs{tl_if_head_is_space_p:n} \Arg{token list} -% \cs{tl_if_head_is_space:nTF} \Arg{token list} \Arg{true code} \Arg{false code} -% \end{syntax} -% Tests if the first \meta{token} in the \meta{token list} -% is an explicit space character -% (explicit token with character code~$12$ and category code~$10$). -% In particular, the test is \texttt{false} if the \meta{token list} -% starts with an implicit token such as \cs{c_space_token}, or if it -% is empty. -% This function is useful to implement actions on token lists on -% a token by token basis. -% \end{function} -% -% \section{Using a single item} +% \subsection{Items and ranges in token lists} % % \begin{function}[added = 2014-07-17, EXP] % {\tl_item:nn, \tl_item:Nn, \tl_item:cn} @@ -1172,44 +1036,190 @@ % \end{texnote} % \end{function} % -% \section{Viewing token lists} +% \subsection{Sorting token lists} % -% \begin{function}[updated = 2021-04-29]{\tl_show:N, \tl_show:c} +% \begin{function}[added = 2017-02-06] +% {\tl_sort:Nn, \tl_sort:cn, \tl_gsort:Nn, \tl_gsort:cn} % \begin{syntax} -% \cs{tl_show:N} \meta{tl~var} +% \cs{tl_sort:Nn} \meta{tl var} \Arg{comparison code} % \end{syntax} -% Displays the content of the \meta{tl~var} on the terminal. -% \begin{texnote} -% This is similar to the \TeX{} primitive \tn{show}, wrapped to a -% fixed number of characters per line. -% \end{texnote} +% Sorts the items in the \meta{tl var} according to the +% \meta{comparison code}, and assigns the result to +% \meta{tl var}. The details of sorting comparison are +% described in Section~\ref{sec:l3sort:mech}. % \end{function} % -% \begin{function}[updated = 2015-08-07]{\tl_show:n} +% \begin{function}[added = 2017-02-06, EXP]{\tl_sort:nN} % \begin{syntax} -% \cs{tl_show:n} \Arg{token list} +% \cs{tl_sort:nN} \Arg{token list} \meta{conditional} % \end{syntax} -% Displays the \meta{token list} on the terminal. +% Sorts the items in the \meta{token list}, using the +% \meta{conditional} to compare items, and leaves the result in the +% input stream. The \meta{conditional} should have signature |:nnTF|, +% and return \texttt{true} if the two items being compared should be +% left in the same order, and \texttt{false} if the items should be +% swapped. The details of sorting comparison are +% described in Section~\ref{sec:l3sort:mech}. % \begin{texnote} -% This is similar to the \eTeX{} primitive \tn{showtokens}, wrapped -% to a fixed number of characters per line. +% The result is returned within \cs{exp_not:n}, which means that the +% token list does not expand further when appearing in an +% \texttt{x}-type or \texttt{e}-type argument expansion. % \end{texnote} % \end{function} % -% \begin{function}[added = 2014-08-22, updated = 2021-04-29]{\tl_log:N, \tl_log:c} +% \section{Manipulating tokens in token lists} +% +% \subsection{Replacing tokens} +% +% \begin{function}[updated = 2011-08-11] +% { +% \tl_replace_once:Nnn, \tl_replace_once:cnn, +% \tl_greplace_once:Nnn, \tl_greplace_once:cnn +% } % \begin{syntax} -% \cs{tl_log:N} \meta{tl~var} +% \cs{tl_replace_once:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens} % \end{syntax} -% Writes the content of the \meta{tl~var} in the log file. See also -% \cs{tl_show:N} which displays the result in the terminal. +% Replaces the first (leftmost) occurrence of \meta{old tokens} in the +% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens} +% cannot contain |{|, |}| or |#| +% (more precisely, explicit character tokens with category code $1$ +% (begin-group) or $2$ (end-group), and tokens with category code $6$). % \end{function} % -% \begin{function}[added = 2014-08-22, updated = 2015-08-07]{\tl_log:n} +% \begin{function}[updated = 2011-08-11] +% { +% \tl_replace_all:Nnn, \tl_replace_all:cnn, +% \tl_greplace_all:Nnn, \tl_greplace_all:cnn +% } % \begin{syntax} -% \cs{tl_log:n} \Arg{token list} +% \cs{tl_replace_all:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens} % \end{syntax} -% Writes the \meta{token list} in the log file. See also -% \cs{tl_show:n} which displays the result in the terminal. +% Replaces all occurrences of \meta{old tokens} in the +% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens} +% cannot contain |{|, |}| or |#| +% (more precisely, explicit character tokens with category code $1$ +% (begin-group) or $2$ (end-group), and tokens with category code $6$). +% As this function +% operates from left to right, the pattern \meta{old tokens} +% may remain after the replacement (see \cs{tl_remove_all:Nn} +% for an example). +% \end{function} +% +% \begin{function}[updated = 2011-08-11] +% { +% \tl_remove_once:Nn, \tl_remove_once:cn, +% \tl_gremove_once:Nn, \tl_gremove_once:cn +% } +% \begin{syntax} +% \cs{tl_remove_once:Nn} \meta{tl~var} \Arg{tokens} +% \end{syntax} +% Removes the first (leftmost) occurrence of \meta{tokens} from the +% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#| +% (more precisely, explicit character tokens with category code $1$ +% (begin-group) or $2$ (end-group), and tokens with category code $6$). +% \end{function} +% +% \begin{function}[updated = 2011-08-11] +% { +% \tl_remove_all:Nn, \tl_remove_all:cn, +% \tl_gremove_all:Nn, \tl_gremove_all:cn +% } +% \begin{syntax} +% \cs{tl_remove_all:Nn} \meta{tl~var} \Arg{tokens} +% \end{syntax} +% Removes all occurrences of \meta{tokens} from the +% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#| +% (more precisely, explicit character tokens with category code $1$ +% (begin-group) or $2$ (end-group), and tokens with category code $6$). +% As this function +% operates from left to right, the pattern \meta{tokens} +% may remain after the removal, for instance, +% \begin{quote} +% \cs{tl_set:Nn} \cs{l_tmpa_tl} |{abbccd}| +% \cs{tl_remove_all:Nn} \cs{l_tmpa_tl} |{bc}| +% \end{quote} +% results in \cs{l_tmpa_tl} containing \texttt{abcd}. +% \end{function} +% +% \subsection{Reassigning category codes} +% +% These functions allow the rescanning of tokens: re-apply \TeX{}'s +% tokenization process to apply category codes different from those +% in force when the tokens were absorbed. Whilst this functionality is +% supported, it is often preferable to find alternative approaches +% to achieving outcomes rather than rescanning tokens (for example +% construction of token lists token-by-token with intervening category +% code changes or using \cs{char_generate:nn}). +% +% \begin{function}[updated = 2015-08-11] +% { +% \tl_set_rescan:Nnn, \tl_set_rescan:Nno, \tl_set_rescan:Nnx, +% \tl_set_rescan:cnn, \tl_set_rescan:cno, \tl_set_rescan:cnx, +% \tl_gset_rescan:Nnn, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx, +% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx +% } +% \begin{syntax} +% \cs{tl_set_rescan:Nnn} \meta{tl~var} \Arg{setup} \Arg{tokens} +% \end{syntax} +% Sets \meta{tl~var} to contain \meta{tokens}, applying the category +% code r\'{e}gime specified in the \meta{setup} before carrying out +% the assignment. (Category codes applied to tokens not explicitly covered +% by the \meta{setup} are those in force at the point of use of +% \cs{tl_set_rescan:Nnn}.) +% This allows the \meta{tl~var} to contain material +% with category codes other than those that apply when \meta{tokens} +% are absorbed. The \meta{setup} is run within a group and may +% contain any valid input, although only changes in category codes, +% such as uses of \cs{cctab_select:N}, +% are relevant. See also \cs{tl_rescan:nn}. +% \begin{texnote} +% The \meta{tokens} are first turned into a string (using +% \cs{tl_to_str:n}). If the string contains one or more characters +% with character code \tn{newlinechar} (set equal to +% \tn{endlinechar} unless that is equal to $32$, before the user +% \meta{setup}), then it is split into lines at these characters, +% then read as if reading multiple lines from a file, ignoring +% spaces (catcode $10$) at the beginning and spaces and tabs +% (character code $32$ or $9$) at the end of every line. +% Otherwise, spaces (and tabs) are retained at both ends of the +% single-line string, as if it appeared in the middle of a line +% read from a file. +% \end{texnote} +% \end{function} +% +% \begin{function}[updated = 2015-08-11]{\tl_rescan:nn} +% \begin{syntax} +% \cs{tl_rescan:nn} \Arg{setup} \Arg{tokens} +% \end{syntax} +% Rescans \meta{tokens} applying the category code r\'{e}gime +% specified in the \meta{setup}, and leaves the resulting tokens in +% the input stream. (Category codes applied to tokens not explicitly covered +% by the \meta{setup} are those in force at the point of use of +% \cs{tl_rescan:nn}.) +% The \meta{setup} is run within a group and may +% contain any valid input, although only changes in category codes, +% such as uses of \cs{cctab_select:N}, +% are relevant. See also \cs{tl_set_rescan:Nnn}, which is more +% robust than using \cs{tl_set:Nn} in the \meta{tokens} argument of +% \cs{tl_rescan:nn}. +% \begin{texnote} +% The \meta{tokens} are first turned into a string (using +% \cs{tl_to_str:n}). If the string contains one or more characters +% with character code \tn{newlinechar} (set equal to +% \tn{endlinechar} unless that is equal to $32$, before the user +% \meta{setup}), then it is split into lines at these characters, +% then read as if reading multiple lines from a file, ignoring +% spaces (catcode $10$) at the beginning and spaces and tabs +% (character code $32$ or $9$) at the end of every line. +% Otherwise, spaces (and tabs) are retained at both ends of the +% single-line string, as if it appeared in the middle of a line +% read from a file. +% +% Contrarily to the \tn{scantokens} primitive, \cs{tl_rescan:nn} +% tokenizes the whole string in the same category code regime rather +% than one token at a time, so that directives such as \tn{verb} +% that rely on changing category codes will not function properly. +% \end{texnote} % \end{function} % % \section{Constant token lists} @@ -1442,7 +1452,7 @@ % By using \cs{exp_not:n} token list variables can contain |#| tokens, % which makes the token list registers provided by \TeX{} % more or less redundant. The \cs{tl_set:No} version is done -% \enquote{by hand} as it is used quite a lot. +% by hand as it is used quite a lot. % \begin{macrocode} \cs_new_protected:Npn \tl_set:Nn #1#2 { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w {#2} } } @@ -2289,7 +2299,7 @@ % The \cs{if_false:} constructions are a faster way to do % \cs{group_align_safe_begin:} and \cs{group_align_safe_end:}. % The \cs{scan_stop:} ensures that \texttt{f}-expanding -% \cs{tl_if_in:nn} does not lead to unbalanced braces. +% \cs{tl_if_in:nnTF} does not lead to unbalanced braces. % \begin{macrocode} \prg_new_protected_conditional:Npnn \tl_if_in:nn #1#2 { T , F , TF } { @@ -2335,7 +2345,7 @@ % \end{macro} % % \begin{macro}[EXP,pTF]{\tl_if_single:N} -% Expand the token list and feed it to \cs{tl_if_single:n}. +% Expand the token list and feed it to \cs{tl_if_single:nTF}. % \begin{macrocode} \cs_new:Npn \tl_if_single_p:N { \exp_args:No \tl_if_single_p:n } \cs_new:Npn \tl_if_single:NT { \exp_args:No \tl_if_single:nT } diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index 33960f4ec0..527ce36e08 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % @@ -541,7 +541,7 @@ % \begin{function}[EXP,pTF]{\token_if_parameter:N} % \begin{syntax} % \cs{token_if_parameter_p:N} \meta{token} \\ -% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code} \Arg{false code} +% \cs{token_if_parameter:NTF} \meta{token} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if \meta{token} has the category code of a macro parameter token % (|#| when normal \TeX{} category codes are in force). diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index 38f142f04f..5aa2987d19 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-18} +% \date{Released 2021-11-12} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf Binary files differindex 9884bf29d1..8d919c1a26 100644 --- a/macros/latex/contrib/l3kernel/source3.pdf +++ b/macros/latex/contrib/l3kernel/source3.pdf diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex index 7910459271..56c5f487d7 100644 --- a/macros/latex/contrib/l3kernel/source3.tex +++ b/macros/latex/contrib/l3kernel/source3.tex @@ -53,7 +53,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-18} +\date{Released 2021-11-12} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3packages/CHANGELOG.md b/macros/latex/contrib/l3packages/CHANGELOG.md index 9b7487dc51..a5a54eeed0 100644 --- a/macros/latex/contrib/l3packages/CHANGELOG.md +++ b/macros/latex/contrib/l3packages/CHANGELOG.md @@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-11-12] + +### Added +- Added `\NewCommandCopy` support for deprecated argument types. + ## [2021-08-27] ### Changed @@ -159,7 +164,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/2021-08-27...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-11-12...HEAD +[2021-11-12]: https://github.com/latex3/latex3/compare/2021-08-27...2021-11-12 [2021-08-27]: https://github.com/latex3/latex3/compare/2021-08-04...2021-08-27 [2021-08-04]: https://github.com/latex3/latex3/compare/2021-06-18...2021-08-04 [2021-06-18]: https://github.com/latex3/latex3/compare/2021-06-01...2021-06-18 diff --git a/macros/latex/contrib/l3packages/README.md b/macros/latex/contrib/l3packages/README.md index d20f9f83be..d71cfcc584 100644 --- a/macros/latex/contrib/l3packages/README.md +++ b/macros/latex/contrib/l3packages/README.md @@ -1,7 +1,7 @@ LaTeX3 High-Level Concepts ========================== -Release 2021-08-27 +Release 2021-11-12 Overview -------- diff --git a/macros/latex/contrib/l3packages/l3keys2e.dtx b/macros/latex/contrib/l3packages/l3keys2e.dtx index f10eb7e8ce..6aeaba3229 100644 --- a/macros/latex/contrib/l3packages/l3keys2e.dtx +++ b/macros/latex/contrib/l3packages/l3keys2e.dtx @@ -62,7 +62,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -139,7 +139,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3keys2e}{2021-08-27}{} +\ProvidesExplPackage{l3keys2e}{2021-11-12}{} {LaTeX2e option processing using LaTeX3 keys} % \end{macrocode} % diff --git a/macros/latex/contrib/l3packages/l3keys2e.pdf b/macros/latex/contrib/l3packages/l3keys2e.pdf Binary files differindex 587e3201c2..8cece1c69c 100644 --- a/macros/latex/contrib/l3packages/l3keys2e.pdf +++ b/macros/latex/contrib/l3packages/l3keys2e.pdf diff --git a/macros/latex/contrib/l3packages/xfp.dtx b/macros/latex/contrib/l3packages/xfp.dtx index cef3891fe2..c3ba90bb14 100644 --- a/macros/latex/contrib/l3packages/xfp.dtx +++ b/macros/latex/contrib/l3packages/xfp.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfp}{2021-08-27}{} +\ProvidesExplPackage{xfp}{2021-11-12}{} {L3 Floating point unit} % \end{macrocode} % diff --git a/macros/latex/contrib/l3packages/xfp.pdf b/macros/latex/contrib/l3packages/xfp.pdf Binary files differindex cd5a23f601..0e0dc875b7 100644 --- a/macros/latex/contrib/l3packages/xfp.pdf +++ b/macros/latex/contrib/l3packages/xfp.pdf diff --git a/macros/latex/contrib/l3packages/xfrac.dtx b/macros/latex/contrib/l3packages/xfrac.dtx index 2840b4318a..efe75c161a 100644 --- a/macros/latex/contrib/l3packages/xfrac.dtx +++ b/macros/latex/contrib/l3packages/xfrac.dtx @@ -65,7 +65,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -535,7 +535,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfrac}{2021-08-27}{} +\ProvidesExplPackage{xfrac}{2021-11-12}{} {L3 Experimental split-level fractions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3packages/xfrac.pdf b/macros/latex/contrib/l3packages/xfrac.pdf Binary files differindex 2895df4613..b5b461116e 100644 --- a/macros/latex/contrib/l3packages/xfrac.pdf +++ b/macros/latex/contrib/l3packages/xfrac.pdf diff --git a/macros/latex/contrib/l3packages/xparse.dtx b/macros/latex/contrib/l3packages/xparse.dtx index fd4b615e15..f601bd9c5f 100644 --- a/macros/latex/contrib/l3packages/xparse.dtx +++ b/macros/latex/contrib/l3packages/xparse.dtx @@ -67,7 +67,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -1064,7 +1064,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xparse}{2021-08-27}{} +\ProvidesExplPackage{xparse}{2021-11-12}{} {L3 Experimental document command parser} % \end{macrocode} % @@ -1249,6 +1249,39 @@ % \end{macrocode} % \end{macro} % +% \subsection{Copying a command and its internal structure} +% +% The apparatus for copying commands is almost entirely in |ltcmd.dtx|, +% preloaded in the \LaTeXe{} kernel. The missing parts, regarding +% copying the deprecated argument types |G|, |l| and |u| boil down to +% copying the expandable grabber for |u|. +% +% \begin{macro}{\@@_copy_grabber_u:w} +% An expandable |u|-type uses a dedicated grabber just like a +% |D|-type, except that both its delimiter tokens are omitted, so to +% copy that we just copy a |D|-type and leave the last two arguments +% empty: +% \begin{macrocode} +\cs_new_protected:Npn \@@_copy_grabber_u:w #1 #2 #3 + { \@@_copy_grabber_D:w {#1} {#2} {#3} { } { } } +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Showing the definition of a command} +% +% \begin{macro}{\c_@@_show_type_u_tl,\c_@@_show_type_G_tl} +% Same as for copying, only small bits are missing here. Namely, two +% token lists that tell the \pkg{ltcmd} mechanism how to deal with the +% argument types defined here. Both |G| and |u| are classified +% as~|3|: commands that take a default value. That's not really true +% for~|u|, but it's a close enough approximation to get the output we +% want. +% \begin{macrocode} +\tl_const:Nn \c_@@_show_type_u_tl { 3 } +\tl_const:Nn \c_@@_show_type_G_tl { 3 } +% \end{macrocode} +% \end{macro} +% % \subsection{Grabbing arguments} % % \begin{macro}{\@@_grab_G:w} diff --git a/macros/latex/contrib/l3packages/xparse.pdf b/macros/latex/contrib/l3packages/xparse.pdf Binary files differindex 139e90a873..f7075f0b22 100644 --- a/macros/latex/contrib/l3packages/xparse.pdf +++ b/macros/latex/contrib/l3packages/xparse.pdf diff --git a/macros/latex/contrib/l3packages/xtemplate.dtx b/macros/latex/contrib/l3packages/xtemplate.dtx index 9c038494f3..8dfe79ec34 100644 --- a/macros/latex/contrib/l3packages/xtemplate.dtx +++ b/macros/latex/contrib/l3packages/xtemplate.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-08-27} +% \date{Released 2021-11-12} % % \maketitle % @@ -682,7 +682,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xtemplate}{2021-08-27}{} +\ProvidesExplPackage{xtemplate}{2021-11-12}{} {L3 Experimental prototype document functions} % \end{macrocode} % @@ -1280,7 +1280,7 @@ \seq_put_right:No \l_@@_key_order_seq \l_@@_key_name_tl \str_if_eq:onT \l_@@_keytype_tl { choice } { - \clist_if_in:NnT \l_@@_keytype_arg_tl { unknown } + \exp_args:No \clist_if_in:nnT \l_@@_keytype_arg_tl { unknown } { \msg_error:nn { xtemplate } { choice-unknown-reserved } } } } @@ -1446,95 +1446,50 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_store_value_code:n} -% \begin{macro}{\@@_store_value_choice:n} -% \begin{macro}{\@@_store_value_commalist:n} -% \begin{macro}{\@@_store_value_function:n} -% \begin{macro}{\@@_store_value_instance:n} -% \begin{macro}{\@@_store_value_real:n} -% \begin{macro}{\@@_store_value_tokenlist:n} +% \begin{macro}{\@@_store_value_code:n, \@@_store_value_choice:n, +% \@@_store_value_function:n, \@@_store_value_instance:n} % With no need to worry about delayed evaluation, these keytypes all % just store the input directly. % \begin{macrocode} \cs_new_protected:Npn \@@_store_value_code:n #1 { \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1} } \cs_new_eq:NN \@@_store_value_choice:n \@@_store_value_code:n -\cs_new_eq:NN \@@_store_value_commalist:n \@@_store_value_code:n \cs_new_eq:NN \@@_store_value_function:n \@@_store_value_code:n \cs_new_eq:NN \@@_store_value_instance:n \@@_store_value_code:n -\cs_new_eq:NN \@@_store_value_real:n \@@_store_value_code:n -\cs_new_eq:NN \@@_store_value_tokenlist:n \@@_store_value_code:n % \end{macrocode} % \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} % -% \begin{macro}{\@@_store_value_integer:n} -% \begin{macro}{\@@_store_value_length:n} -% \begin{macro}{\@@_store_value_muskip:n} -% \begin{macro}{\@@_store_value_skip:n} -% Storing the value of a number is in all cases more or less the same. -% If evaluation is taking place now, assignment is made to a scratch -% variable, and this result is then stored. On the other hand, if -% evaluation is delayed the current data is simply stored \enquote{as is}. +% \begin{macro}{\@@_store_value_aux:Nn, \@@_store_value_integer:n, +% \@@_store_value_length:n, \@@_store_value_muskip:n, +% \@@_store_value_real:n, \@@_store_value_skip:n, +% \@@_store_value_tokenlist:n, \@@_store_value_commalist:n} +% Storing values in \cs{l_@@_values_prop} is in most cases the same. +% If evaluation is taking place now, one \texttt{x}-expands an +% evaluation function and the result is then stored. On the other +% hand, if evaluation is delayed the current data is simply stored +% \enquote{as is}. % \begin{macrocode} -\cs_new_protected:Npn \@@_store_value_integer:n #1 - { - \@@_if_eval_now:nTF {#1} - { - \int_set:Nn \l_@@_tmp_int {#1} - \prop_put:NVV \l_@@_values_prop \l_@@_key_name_int - \l_@@_tmp_int - } - { - \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1} - } - } -\cs_new_protected:Npn \@@_store_value_length:n #1 - { - \@@_if_eval_now:nTF {#1} - { - \dim_set:Nn \l_@@_tmp_dim {#1} - \prop_put:NVV \l_@@_values_prop \l_@@_key_name_tl - \l_@@_tmp_dim - } - { - \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1} - } - } -\cs_new_protected:Npn \@@_store_value_muskip:n #1 - { - \@@_if_eval_now:nTF {#1} - { - \muskip_set:Nn \l_@@_tmp_muskip {#1} - \prop_put:NVV \l_@@_values_prop \l_@@_key_name_tl - \l_@@_tmp_muskip - } - { - \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1} - } - } -\cs_new_protected:Npn \@@_store_value_skip:n #1 +\cs_new_protected:Npn \@@_store_value_aux:Nn #1#2 { - \@@_if_eval_now:nTF {#1} - { - \skip_set:Nn \l_@@_tmp_skip {#1} - \prop_put:NVV \l_@@_values_prop \l_@@_key_name_tl - \l_@@_tmp_skip - } - { - \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#1} - } + \@@_if_eval_now:nTF {#2} + { \prop_put:NVx \l_@@_values_prop \l_@@_key_name_tl { #1 {#2} } } + { \prop_put:Non \l_@@_values_prop \l_@@_key_name_tl {#2} } } +\cs_new_protected:Npn \@@_store_value_integer:n + { \@@_store_value_aux:Nn \int_eval:n } +\cs_new_protected:Npn \@@_store_value_length:n + { \@@_store_value_aux:Nn \dim_eval:n } +\cs_new_protected:Npn \@@_store_value_muskip:n + { \@@_store_value_aux:Nn \muskip_eval:n } +\cs_new_protected:Npn \@@_store_value_real:n + { \@@_store_value_aux:Nn \fp_eval:n } +\cs_new_protected:Npn \@@_store_value_skip:n + { \@@_store_value_aux:Nn \skip_eval:n } +\cs_new_protected:Npn \@@_store_value_tokenlist:n + { \@@_store_value_aux:Nn \use:n } +\cs_new_eq:NN \@@_store_value_commalist:n \@@_store_value_tokenlist:n % \end{macrocode} % \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} % % \subsection{Implementation part of template declaration} % @@ -1713,7 +1668,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_implement_choices:n #1 { - \clist_set_eq:NN \l_@@_tmp_clist \l_@@_keytype_arg_tl + \clist_set:No \l_@@_tmp_clist { \l_@@_keytype_arg_tl } \prop_put:Non \l_@@_vars_prop \l_@@_key_name_tl { } \keyval_parse:NNn \@@_implement_choice_elt:n \@@_implement_choice_elt:nn diff --git a/macros/latex/contrib/l3packages/xtemplate.pdf b/macros/latex/contrib/l3packages/xtemplate.pdf Binary files differindex dd14606df0..10bea564f7 100644 --- a/macros/latex/contrib/l3packages/xtemplate.pdf +++ b/macros/latex/contrib/l3packages/xtemplate.pdf |