summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dashundergaps
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-01-25 00:18:49 +0000
committerKarl Berry <karl@freefriends.org>2010-01-25 00:18:49 +0000
commit6dcb7fa5b9322b4f6b929596985e9b73a8eeffdb (patch)
tree2b59cb49d1a496f068fb595c5287586b9534a40a /Master/texmf-dist/tex/latex/dashundergaps
parent0f50aaf62004400e50b66714ca6aaa19ef75446a (diff)
dasundergaps 1.2 (22jan10)
git-svn-id: svn://tug.org/texlive/trunk@16808 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/dashundergaps')
-rw-r--r--Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty19
1 files changed, 14 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty b/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
index 62561b3bdf5..cd7df665d4f 100644
--- a/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
+++ b/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
@@ -1,7 +1,7 @@
%% This is file `dashundergaps.sty' v1.1 by Merciadri Luca.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dashundergaps}[2009/11/12 Dashing and underlining (phantom) text]
+\ProvidesPackage{dashundergaps}[2010/20/01 Dashing and underlining (phantom) text]
\PackageInfo{dashundergaps}{This is DashUnderGaps by Merciadri Luca.}
\RequirePackage{ifthen}[1994/06/01]
@@ -14,7 +14,7 @@
\DeclareOption{dash}{%
\typeout{Dashing mode activated!}
\setboolean{dash}{true}
-\def\dashuline{\bgroup
+\providecommand{\dashuline}{\bgroup
\ifdim\ULdepth=\maxdimen
\settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi
\markoverwith{\kern.15em
@@ -26,7 +26,7 @@
\DeclareOption{dot}{%
\typeout{Dotting mode activated!}
\setboolean{dot}{true}
-\def\dotuline{\bgroup
+\providecommand{\dotuline}{\bgroup
\ifdim\ULdepth=\maxdimen
\settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi
\markoverwith{\begingroup
@@ -44,12 +44,21 @@
\newcounter{nth-gaps}
\setcounter{nth-gaps}{1}
-\newcommand{\gap}[1]{%
+\def\phantom@putbox{\ifx\UL@start\@empty \else % not inner
+ \vrule\@width\z@ \LA@penalty\@M
+ {\UL@skip\wd\UL@box \UL@leaders \kern-\UL@skip}%
+ \hbox to\wd\UL@box{}\fi}%
+
+\providecommand{\gap}[1]{%
+\bgroup
+\let\UL@putbox=\phantom@putbox
\ifthenelse{\boolean{teachernotes}}
{\textbf{#1} (\arabic{nth-gaps})}
-{\ifthenelse{\boolean{dash} \AND \boolean{dot}}{\underline{\phantom{#1}} (\arabic{nth-gaps})}{\ifthenelse{\boolean{dash}}{\dashuline{\phantom{#1}} (\arabic{nth-gaps})}{\ifthenelse{\boolean{dot}}{\dotuline{\phantom{#1}} (\arabic{nth-gaps})}{\underline{\phantom{#1}} (\arabic{nth-gaps})}}}}
+{\ifthenelse{\boolean{dash} \AND \boolean{dot}}{\uline{#1}(\arabic{nth-gaps})}{\ifthenelse{\boolean{dash}}{\dashuline{#1} (\arabic{nth-gaps})}{\ifthenelse{\boolean{dot}}{\dotuline{#1} (\arabic{nth-gaps})}{\uline{#1} (\arabic{nth-gaps})}}}
+}
\addtocounter{nb-gaps}{1}
\addtocounter{nth-gaps}{1}
+\egroup
}}