summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-02-11 22:09:42 +0000
committerKarl Berry <karl@freefriends.org>2020-02-11 22:09:42 +0000
commitd2da7f5f40ade904cccb2e82630d15bd42520ff5 (patch)
treeaad6865fa239e3ccd680c8d855826f4931653ca0 /Master/texmf-dist/source
parent8787fd9a7c1efeb888b0a6df1c353359091d1ab2 (diff)
dashundergaps (11feb20)
git-svn-id: svn://tug.org/texlive/trunk@53756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx41
1 files changed, 33 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx b/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx
index 9b5fbcc1fd1..5b1f91a45e2 100644
--- a/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx
+++ b/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx
@@ -17,8 +17,8 @@
% for those people who are interested or want to report an issue.
%
-\def\dashundergapsdate {2020-01-22} % don't forget to also adjust build.lua!
-\def\dashundergapsversion{v2.0f}
+\def\dashundergapsdate {2020-02-11} % don't forget to also adjust build.lua!
+\def\dashundergapsversion{v2.0g}
%<*driver>
\let\fmipagebreak\pagebreak
@@ -260,6 +260,14 @@
% in the argument (but then that wouldn't make much sense in a gap,
% would~it?).
%
+% Another important (and sometimes annoying) restriction is that any
+% brace group or command with arguments inside the \pkg{ulem}
+% commands is set as if is is inside an \cs{mbox}, in particular it will
+% not break across lines. For example \verb=\gap{\emph{...}}= will
+% show this behavior. The \pkg{dashundergaps} package tries
+% mediate as best as possible, e.g., \verb=\gap{\mytext}= works,
+% but in other cases you have to live with this limitation.
+%
% \begin{function}{\TeacherModeOn,\TeacherModeOff}
% \begin{syntax}
% \cs{TeacherModeOn} \texttt{\,\% show gap material}
@@ -668,8 +676,20 @@
% \begin{macro}{\gap}
% The \cs{gap} command parses for a star, optional and mandatory
% argument and then calls \cs{@@_gap:nnn} to do the work.
+% \changes{v2.0g}{2020/02/11}{Expand argument up front to work around
+% ulem restrictions if possible (gh/10)}
+% \begin{macrocode}
+\DeclareDocumentCommand \gap { som }
+ {
+% \end{macrocode}
+% We try to expand as much as possible up front to avoid the
+% \pkg{ulem} limitations:
+% \begin{macrocode}
+ \protected@edef\next{#3}
+% \end{macrocode}
+% Use the \enquote{content} of \cs{next} in the processing:
% \begin{macrocode}
-\DeclareDocumentCommand \gap { som } { \@@_gap:nnn {#1}{#2}{#3} }
+ \@@_gap:nno {#1}{#2}{ \next } }
% \end{macrocode}
% \end{macro}
%
@@ -928,11 +948,12 @@
%
%
% \begin{macro}{\@@_gap:nnn}
-% At last, here comes the action. \cs{@@_gap:nn} expects two
-% arguments: |#1| indicates what kind of ``underlining'' is wanted
-% (anything not recognized is ignored, in particular
-% ``--NoValue--'' if \cs{gap} was used without an optional argument)
-% and |#2| is the material to produce a gap for.
+% At last, here comes the action. \cs{@@_gap:nn} expects three
+% arguments: |#1| identifies if a star was present, |#2| indicates
+% what kind of ``underlining'' is wanted (anything not recognized
+% is ignored, in particular ``--NoValue--'' if \cs{gap} was used
+% without an optional argument) and |#3| is the material to produce
+% a gap for.
% \begin{macrocode}
\cs_new:Npn\@@_gap:nnn #1#2#3 {
% \end{macrocode}
@@ -1036,6 +1057,10 @@
\group_end:
}
% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_gap:nnn {nno}
+% \end{macrocode}
% \end{macro}
%
%