summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-16 19:56:42 +0000
committerKarl Berry <karl@freefriends.org>2009-11-16 19:56:42 +0000
commit7c71adc8d8bd0bf2195bb57a46f7029642681503 (patch)
treeb9b6d6f7e0219f72142ac3f7345f528a0e011b71 /Master/texmf-dist/tex
parente8c2ee1869c4f626395c3c2c85e2a2e48e403712 (diff)
new latex package dashundergaps 1.0 (12nov09)
git-svn-id: svn://tug.org/texlive/trunk@16035 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty68
1 files changed, 68 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty b/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
new file mode 100644
index 00000000000..d06feab9f74
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/dashundergaps/dashundergaps.sty
@@ -0,0 +1,68 @@
+%% This is file `dashundergaps.sty.'
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{dashundergaps}[2009/11/12 Dashing and underlining (phantom) text]
+\PackageInfo{dashundergaps}{This is DashUnderGaps by Merciadri Luca.}
+
+\RequirePackage{ifthen}[1994/06/01]
+\RequirePackage{ulem}
+\newboolean{dot} % false at start
+\newboolean{dash} % false at start
+
+
+\DeclareOption{dash}{%
+\typeout{Dashing mode activated!}
+\setboolean{dash}{true}
+\def\dashuline{\bgroup
+\ifdim\ULdepth=\maxdimen
+\settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi
+\markoverwith{\kern.15em
+\vtop{\kern\ULdepth \hrule width .3em}%
+\kern.15em}\ULon}
+}
+
+
+\DeclareOption{dot}{%
+\typeout{Dotting mode activated!}
+\setboolean{dot}{true}
+\def\dotuline{\bgroup
+\ifdim\ULdepth=\maxdimen
+\settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi
+\markoverwith{\begingroup
+\advance\ULdepth0.08ex
+\lower\ULdepth\hbox{\kern.15em .\kern.1em}%
+\endgroup}\ULon}
+}
+
+
+\DeclareOption{phantomtext}{%
+\typeout{Phantom mode activated! All the gaps will be filled.}
+\newboolean{teachernotes} % false at start
+\newcounter{nb-gaps}
+\setcounter{nb-gaps}{1}
+\newcounter{nth-gaps}
+\setcounter{nth-gaps}{1}
+
+\newcommand{\gap}[1]{%
+\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})}}}}
+\addtocounter{nb-gaps}{1}
+\addtocounter{nth-gaps}{1}
+}}
+
+
+\DeclareOption{teachernotes}{%
+\typeout{Phantom mode deactivated! All the gaps will be filled with their content.}
+\setboolean{teachernotes}{true}
+}
+
+
+\DeclareOption{displaynbgaps}{%
+\typeout{Gaps counting mode activated!}
+\addtocounter{nb-gaps}{-1}
+\AtEndDocument{\vfill \centering \bfseries GAPS: \arabic{nb-gaps}.}
+}
+
+\ProcessOptions\relax
+