summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/dashundergaps
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-12 03:02:18 +0000
committerNorbert Preining <norbert@preining.info>2020-02-12 03:02:18 +0000
commit2dbfa6c67f1c50ff228326c6ec6cccfdecb61735 (patch)
tree87c6ec630935bf7ad88d9704cb38c13c828d4263 /macros/latex/contrib/dashundergaps
parenta2dd5021cc27056722b5f2159abdcff8d4f75399 (diff)
CTAN sync 202002120302
Diffstat (limited to 'macros/latex/contrib/dashundergaps')
-rw-r--r--macros/latex/contrib/dashundergaps/changes.txt5
-rw-r--r--macros/latex/contrib/dashundergaps/dashundergaps-code.pdfbin597014 -> 597925 bytes
-rw-r--r--macros/latex/contrib/dashundergaps/dashundergaps-doc.pdfbin466392 -> 467798 bytes
-rw-r--r--macros/latex/contrib/dashundergaps/dashundergaps.dtx41
4 files changed, 38 insertions, 8 deletions
diff --git a/macros/latex/contrib/dashundergaps/changes.txt b/macros/latex/contrib/dashundergaps/changes.txt
index 74ad759760..46239c6a30 100644
--- a/macros/latex/contrib/dashundergaps/changes.txt
+++ b/macros/latex/contrib/dashundergaps/changes.txt
@@ -1,3 +1,8 @@
+2020-02-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * dashundergaps.dtx: Expand argument up front to work around
+ ulem restrictions when possible (gh/10)
+
2020-01-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* dashundergaps.dtx (subsection{Loading and fixing/changing \pkg{ulem}}):
diff --git a/macros/latex/contrib/dashundergaps/dashundergaps-code.pdf b/macros/latex/contrib/dashundergaps/dashundergaps-code.pdf
index f200ad1d9c..3e16abdcf3 100644
--- a/macros/latex/contrib/dashundergaps/dashundergaps-code.pdf
+++ b/macros/latex/contrib/dashundergaps/dashundergaps-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/dashundergaps/dashundergaps-doc.pdf b/macros/latex/contrib/dashundergaps/dashundergaps-doc.pdf
index fc1a592034..798c0496f9 100644
--- a/macros/latex/contrib/dashundergaps/dashundergaps-doc.pdf
+++ b/macros/latex/contrib/dashundergaps/dashundergaps-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/dashundergaps/dashundergaps.dtx b/macros/latex/contrib/dashundergaps/dashundergaps.dtx
index 9b5fbcc1fd..5b1f91a45e 100644
--- a/macros/latex/contrib/dashundergaps/dashundergaps.dtx
+++ b/macros/latex/contrib/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}
%
%