texlive[53756] Master/texmf-dist: dashundergaps (11feb20)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 11 23:09:43 CET 2020


Revision: 53756
          http://tug.org/svn/texlive?view=revision&revision=53756
Author:   karl
Date:     2020-02-11 23:09:42 +0100 (Tue, 11 Feb 2020)
Log Message:
-----------
dashundergaps (11feb20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/dashundergaps/changes.txt
    trunk/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-code.pdf
    trunk/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-doc.pdf
    trunk/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx
    trunk/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty

Modified: trunk/Master/texmf-dist/doc/latex/dashundergaps/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/dashundergaps/changes.txt	2020-02-11 22:09:26 UTC (rev 53755)
+++ trunk/Master/texmf-dist/doc/latex/dashundergaps/changes.txt	2020-02-11 22:09:42 UTC (rev 53756)
@@ -1,3 +1,8 @@
+2020-02-11  Frank Mittelbach  <Frank.Mittelbach at 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 at latex-project.org>
 
 	* dashundergaps.dtx (subsection{Loading and fixing/changing \pkg{ulem}}):

Modified: trunk/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/dashundergaps/dashundergaps-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx	2020-02-11 22:09:26 UTC (rev 53755)
+++ trunk/Master/texmf-dist/source/latex/dashundergaps/dashundergaps.dtx	2020-02-11 22:09:42 UTC (rev 53756)
@@ -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,9 +676,21 @@
 %  \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 } { \@@_gap:nnn {#1}{#2}{#3} }
+\DeclareDocumentCommand \gap { som }
+   {
 %    \end{macrocode}
+%    We try to expand as much as possible up front to avoid the
+%    \pkg{ulem} limitations:
+%    \begin{macrocode}
+     \protected at edef\next{#3}
+%    \end{macrocode}
+%    Use the \enquote{content} of \cs{next} in the processing:
+%    \begin{macrocode}
+     \@@_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}
 %
 %

Modified: trunk/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty	2020-02-11 22:09:26 UTC (rev 53755)
+++ trunk/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty	2020-02-11 22:09:42 UTC (rev 53756)
@@ -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 at 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



More information about the tex-live-commits mailing list.