[latex3-commits] [git/LaTeX3-latex3-latex3] master: xbox: Add \clap (dd3d9e8e5)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Aug 25 16:53:41 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/dd3d9e8e5280c35232b9f1129f9ca364ba9060ed
>---------------------------------------------------------------
commit dd3d9e8e5280c35232b9f1129f9ca364ba9060ed
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Aug 25 15:53:41 2020 +0100
xbox: Add \clap
>---------------------------------------------------------------
dd3d9e8e5280c35232b9f1129f9ca364ba9060ed
l3trial/xbox/xbox.dtx | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/l3trial/xbox/xbox.dtx b/l3trial/xbox/xbox.dtx
index 8b5265da1..e4bfb5a58 100644
--- a/l3trial/xbox/xbox.dtx
+++ b/l3trial/xbox/xbox.dtx
@@ -313,13 +313,15 @@
%
% \section{Plain \TeX{} commands inherited by \LaTeX{}}
%
-% \begin{function}{\llap, \rlap}
+% \begin{function}{\clap, \llap, \rlap}
% \begin{syntax}
+% \cs{clap} \Arg{content}
% \cs{llap} \Arg{content}
% \cs{rlap} \Arg{content}
% \end{syntax}
% Typesets the \meta{content} in a horizontal box of zero width such that
-% it protrudes to the left (\cs{llap}) or right (\cs{rlap}) of the current
+% it protrudes to the center (\cs{clap}), left (\cs{llap})
+% or right (\cs{rlap}) of the current
% insertion point. The \meta{content} will overlap any other material due
% to the fact it is treated as having zero width.
% \begin{texnote}
@@ -940,6 +942,7 @@
% \begin{macro}{\xbox_minipage_end:nn}
% \begin{macro}{\xbox_minipage_end:nnnn}
% \begin{macro}{\@@_minipage_end:}
+% Most of this is setup to hand over the the same internals as \cs{parbox}.
% \begin{macrocode}
\cs_new_protected:Npn \xbox_minipage_begin:n #1
{
@@ -1467,11 +1470,16 @@
% These are inherited from plain \TeX{}, and are therefore potentially
% to be removed.
%
-% \begin{macro}{\llap, \rlap}
+% \begin{macro}{\clap, \llap, \rlap}
% These macros place text to the left or right of the current reference point
% without taking up space. Unlike the plain \TeX{} versions, these correctly
% leave vertical mode.
% \begin{macrocode}
+\RenewDocumentCommand \clap { m }
+ {
+ \mode_leave_vertical:
+ \hbox_overlap_center:n {#1}
+ }
\RenewDocumentCommand \llap { m }
{
\mode_leave_vertical:
More information about the latex3-commits
mailing list.