summaryrefslogtreecommitdiff
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
parent8787fd9a7c1efeb888b0a6df1c353359091d1ab2 (diff)
dashundergaps (11feb20)
git-svn-id: svn://tug.org/texlive/trunk@53756 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/dashundergaps/changes.txt5
-rw-r--r--Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-code.pdfbin597014 -> 597925 bytes
-rw-r--r--Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-doc.pdfbin466392 -> 467798 bytes
-rw-r--r--Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx41
-rw-r--r--Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty10
5 files changed, 45 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/dashundergaps/changes.txt b/Master/texmf-dist/doc/latex/dashundergaps/changes.txt
index 74ad7597603..46239c6a30f 100644
--- a/Master/texmf-dist/doc/latex/dashundergaps/changes.txt
+++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-code.pdf b/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-code.pdf
index f200ad1d9c1..3e16abdcf3c 100644
--- a/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-code.pdf
+++ b/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-doc.pdf b/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-doc.pdf
index fc1a5920345..798c0496f9d 100644
--- a/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-doc.pdf
+++ b/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-doc.pdf
Binary files differ
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}
%
%
diff --git a/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty b/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
index 2d53571634f..29b36d13414 100644
--- a/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
+++ b/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
@@ -34,8 +34,8 @@
%%
%% File: dashundergaps.dtx (C) Copyright 2018-2020 Frank Mittelbach
-\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}
\RequirePackage[normalem]{ulem}
\protected\def\dotuline{\leavevmode\bgroup
@@ -79,7 +79,10 @@
{\dashundergapsversion}
{Dashing and underlining phantom text}
-\DeclareDocumentCommand \gap { som } { \__fmdug_gap:nnn {#1}{#2}{#3} }
+\DeclareDocumentCommand \gap { som }
+ {
+ \protected@edef\next{#3}
+ \__fmdug_gap:nno {#1}{#2}{ \next } }
\NewDocumentCommand \dashundergapssetup { m }
{ \keys_set:nn {fmdug} {#1} \ignorespaces }
\DeclareDocumentCommand \TeacherModeOn {}
@@ -259,6 +262,7 @@
{ \l__fmdug_gapnum_format_tl }
\group_end:
}
+\cs_generate_variant:Nn \__fmdug_gap:nnn {nno}
\cs_new:Npn \__fmdug_display_total_gaps: {
\vfill \centering
\bfseries Total~ Gaps:~ \thetotalgapnumber