[latex3-commits] [latex3/latex2e] protected-tilde: Add a code comment (c8dcd451)
github at latex-project.org
github at latex-project.org
Thu Oct 26 18:52:21 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : protected-tilde
Link : https://github.com/latex3/latex2e/commit/c8dcd451f4d84264ade95c7cdfd8a7a8a433c552
>---------------------------------------------------------------
commit c8dcd451f4d84264ade95c7cdfd8a7a8a433c552
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Oct 26 17:52:21 2023 +0100
Add a code comment
>---------------------------------------------------------------
c8dcd451f4d84264ade95c7cdfd8a7a8a433c552
base/ltspace.dtx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/base/ltspace.dtx b/base/ltspace.dtx
index 0c08ab52..59b7744b 100644
--- a/base/ltspace.dtx
+++ b/base/ltspace.dtx
@@ -1214,13 +1214,17 @@
% We need to keep \cs{@xobeysp} as it is widely used; so here it is
% let to the non-robust command \cs{nobreakspace }.
%
+% The fragile version of |~| needs a brace group after \cs{nobreakspace}
+% to prevent loss of spaces if it occurs in an expansion context. That's
+% not an issue with the updated \cs{protected} definition, so we keep the
+% code shorter and avoid that.
% \begin{macrocode}
\DeclareRobustCommand{\nobreakspace}{%
\leavevmode\nobreak\ }
\catcode `\~=13
%</2ekernel>
%<latexrelease>\IncludeInRelease{2023/11/01}%
-%<latexrelease> {[tilde]}{Protected tilde}%
+%<latexrelease> {\tilde}{Protected tilde}%
%<*2ekernel|latexrelease>
\protected\edef~{%
\noexpand\ifincsname\noexpand\expandafter\string~%
More information about the latex3-commits
mailing list.