Skip to content

Commit

Permalink
Initial notes no drop vs clear [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Jan 17, 2019
1 parent 8bef7f1 commit bbeb289
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions l3kernel/l3box.dtx
Expand Up @@ -637,6 +637,32 @@
% \end{texnote}
% \end{function}
%
% \section{Using boxes efficiently}
%
% The functions above for using box contents work in exactly the same
% way as for any other \pkg{expl3} variable. However, for efficiency
% reasons, it is also useful to have functions which \emph{drop} box
% contents on use. This consideration \emph{only applies to local boxes}.
% When such a box is dropped, the box becomes empty at the group level
% \emph{where the box was originally set} rather than necessarily
% \emph{at the current group level}. For example, with
% \begin{verbatim}
% \hbox_set:Nn \l_tmpa_box { A }
% \group_begin:
% \hbox_set:Nn \l_tmpa_box { B }
% \group_begin:
% \box_use_drop:N \l_tmpa_box
% \group_end:
% \box_show:N \l_tmpa_box
% \group_end:
% \box_show:N \l_tmpa_box
% \end{verbatim}
% the first use of \cs{box_show:N} will show an entirely cleared (void) box, and the
% second will show the letter |A| in the box.
%
% These functions should be preferred when the content of the box is no
% longer required after use.
%
% \section{Affine transformations}
%
% Affine transformations are changes which (informally) preserve straight
Expand Down

0 comments on commit bbeb289

Please sign in to comment.