Skip to content

Commit

Permalink
more docu
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Jan 6, 2025
1 parent 0e10f72 commit ee2f7f0
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions required/latex-lab/latex-lab-block.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%
% https://www.latex-project.org/lppl.txt
%
\def\ltlabblockdate{2024-12-01}
\def\ltlabblockdate{2025-01-06}
\def\ltlabblockversion{0.8x}
%<*driver>
\documentclass[kernel]{l3doc}
Expand Down Expand Up @@ -1749,7 +1749,7 @@
% \end{macrocode}
% We start by looking at the user supplied keys in \texttt{\#1}. If
% there aren't any we reset \cs{@@_evaluate_saved_user_keys:nn} to
% do nothing. Otherwise we evaluate and set the keys in the contect
% do nothing. Otherwise we evaluate and set the keys in the context
% of the current list template. In addition we prepare
% \cs{@@_evaluate_saved_user_keys:nn} for execution in the
% template for \tn{item}.
Expand All @@ -1760,8 +1760,25 @@
{ \cs_set_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn }
{
\SetTemplateKeys{list}{std}{#1}
% \end{macrocode}
% The setup for \cs{@@_evaluate_saved_user_keys:nn} is a bit trcky

This comment has been minimized.

Copy link
@muzimuzhi

muzimuzhi Jan 7, 2025

Contributor

trcky -> tricky

% and has to be done with \cs{cs_set:Npe} even though we don't want
% to expand anything and therefore use \cs{exp_not:n} inside. All
% this does is that any \texttt{\#} passed in via \texttt{\#1} is
% doubled (e.g., from \verb/label-format=\fbox{#1}/ which is
% represented as \verb/...\fbox{##1}/). Otherwise, we would end up
% with a replacement text like
%\begin{verbatim}
% \SetTemplateKeys {#1}{#2}{label-format=\fbox {#1}}
%\end{verbatim}
% instead of
%\begin{verbatim}
% \SetTemplateKeys {#1}{#2}{label-format=\fbox {##1}}
%\end{verbatim}
% resulting in very odd and puzzling behavior.
% \begin{macrocode}
\cs_set:Npe \@@_evaluate_saved_user_keys:nn ##1##2
{ \SetTemplateKeys{##1}{##2}{ \exp_not:n{#1} } }
{ \SetTemplateKeys{##1}{##2}{ \exp_not:n{ #1 } } }
}
% \end{macrocode}
% Has this list a counter name defined in the instance?
Expand Down

0 comments on commit ee2f7f0

Please sign in to comment.