[latex3-commits] [git/LaTeX3-latex3-latex2e] IfBlank: Merge branch 'develop' into IfBlank (201dcdb2)
Frank Mittelbach
frank.mittelbach at latex-project.org
Tue Mar 8 21:55:35 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : IfBlank
Link : https://github.com/latex3/latex2e/commit/201dcdb2c2198d592037d59f3c2379acae1e2708
>---------------------------------------------------------------
commit 201dcdb2c2198d592037d59f3c2379acae1e2708
Merge: 3a2cda1f 67603137
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Tue Mar 8 21:55:35 2022 +0100
Merge branch 'develop' into IfBlank
# Conflicts:
# base/changes.txt
# base/doc/ltnews35.tex
>---------------------------------------------------------------
201dcdb2c2198d592037d59f3c2379acae1e2708
base/changes.txt | 7 +-
base/doc/ltnews35.tex | 50 +++++++++++-
base/ltkeys.dtx | 9 +--
base/testfiles-lthooks/ltcmdhooks-001.tlg | 9 +--
base/testfiles-lthooks/lthooks-000.tlg | 7 --
base/testfiles-lthooks/lthooks-001.tlg | 15 ----
base/testfiles-lthooks/lthooks-002.tlg | 15 ----
base/testfiles-lthooks/lthooks-003.tlg | 8 --
base/testfiles-lthooks/lthooks-004.tlg | 8 --
base/testfiles-lthooks/lthooks-005.tlg | 8 --
base/testfiles-lthooks/lthooks-006.tlg | 8 --
base/testfiles-lthooks/lthooks-007.tlg | 15 ----
base/testfiles-lthooks/lthooks-008.tlg | 8 --
base/testfiles-lthooks/lthooks-009.tlg | 7 --
base/testfiles-lthooks/lthooks-011.tlg | 28 -------
base/testfiles-lthooks/lthooks-013.tlg | 7 --
base/testfiles-lthooks/lthooks-021.tlg | 7 --
base/testfiles-lthooks/lthooks-legacy.tlg | 7 --
base/testfiles-lthooks2/lthooks2-002.tlg | 7 --
base/testfiles-lthooks2/lthooks2-005.tlg | 14 ----
base/testfiles/tlb-rollback-005.luatex.tlg | 4 +-
base/testfiles/tlb-rollback-005.tlg | 4 +-
base/testfiles/tlb-rollback-005.xetex.tlg | 4 +-
required/firstaid/changes.txt | 5 ++
.../latex2e-first-aid-for-external-files.dtx | 33 ++++----
.../firstaid/testfiles-TU/firstaid-bidi.luatex.tlg | 12 +--
required/firstaid/testfiles-TU/firstaid-bidi.tlg | 12 +--
required/graphics/changes.txt | 6 ++
required/graphics/graphics.dtx | 8 +-
required/graphics/testfiles/github-0776.lvt | 18 +++++
.../graphics/testfiles/github-0776.tlg | 4 +-
.../testfiles/support/{miau => folder-a/meow.ps} | 0
.../graphics/testfiles/support/folder-b/meow.tex | 66 ++++++++++++++++
required/graphics/testfiles/utf8-filenames-002.lvt | 0
texmf/tex/latex/l3kernel/expl3-code.tex | 92 +++++++++++++---------
texmf/tex/latex/l3kernel/expl3-generic.tex | 2 +-
texmf/tex/latex/l3kernel/expl3.ltx | 2 +-
texmf/tex/latex/l3kernel/expl3.sty | 2 +-
38 files changed, 247 insertions(+), 271 deletions(-)
diff --cc base/changes.txt
index be7ab3cb,927da9cb..87bd4dd4
--- a/base/changes.txt
+++ b/base/changes.txt
@@@ -6,22 -7,11 +6,27 @@@ completeness or accuracy and it contain
are not part of the distribution.
================================================================================
+2022-02-28 Phelype Oleinik <phelype.oleinik at latex-project.org>
+
+ * ltvers.dtx (subsection{Declaring an all-new module}):
+ Detect a missing \IncludeInRelease{0000/00/00} in a new module.
+
+2022-02-28 Phelype Oleinik <phelype.oleinik at latex-project.org>
+
+ * latexrelease.dtx, ltexpl.dtx, ltcmd.dtx:
- Move most make-harmless redefinitions to right after ltexpl.dtx.
++ Move most make-harmless redefinitions right after ltexpl.dtx.
++
+ 2022-02-21 Joseph Wright <Joseph.Wright at latex-project.org>
+
+ * ltkeys.dtx:
+ More efficient module expansion
+2022-02-19 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltcmd.dtx (subsection{User functions}):
+ Added \IfBlankTF and friends to test if a received argument
+ is empty or contains only normal space characters.
+
2022-02-16 Joseph Wright <Joseph.Wright at latex-project.org>
* ltkeys.dtx:
diff --cc base/doc/ltnews35.tex
index 723b3c5c,f87d5c55..872103e0
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@@ -315,24 -315,41 +315,56 @@@ layer)) which was also used in the exam
\githubissue{735}
-
+\subsection{Testing for (nearly) empty arguments}
+%
+In addition to \cs{IfNoValueTF} to test if an optional argument was
+provided or not, there is now also \cs{IfBlankTF}, which tests if the
+argument is empty or contains only blanks. Based on the result it
+selects a true or false code branch. As usual, the variants
+\cs{IfBlankT} and \cs{IfBlankF} are also provided for use when only one
+branch leads to some action. Further details and examples are given
+in \file{usrguide3.pdf}.
+
+This test can also be useful if you set up key/value options and want
+to test if a key was specified without giving a value or through
+specifying \enquote{\textit{key}\texttt{ = ,}}.
+
+ \subsection{Better allocator for Lua command ids}
+
+ In \LuaTeX\ we already had the \cs{newluafunction} macro which allocates
+ a Lua function identifier which can be used to define commands
+ with \cs{luadef}. But this always required two steps: \cs{newluafunction}
+ defines the passed control sequence as an integer, which then has to be used
+ to define the actual Lua command with \cs{luadef}. After that, the integer is
+ no longer needed. This was inconsistent with other allocators. Therefore we
+ added two new allocators \cs{newluacmd} and \cs{newexpandableluacmd} which
+ directly define a control sequences invoking the allocated Lua function.
+ The first one defines a non-expandable Lua command, the second one an expandable
+ one. Of course, the associated Lua function still has to be defined by assigning
+ a function to the \verb|lua.get_functions_table()| table. The required index is
+ available in \cs{allocationnumber}.
+
+ An example could be
+ \begin{verbatim}
+ \newluacmd \greeting
+ \directlua {
+ lua.get_functions_table()
+ [tex.count.allocationnumber]
+ = function()
+ local name = token.scan_argument()
+ tex.sprint('Hello ', name, '!')
+ end
+ }
+
+ \greeting{world}
+ \end{verbatim}
+ %
+ \githubissue{536}
+
+
+
\subsection{???}
%
\githubissue{???}
More information about the latex3-commits
mailing list.