summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cmdstring
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-04-25 00:02:06 +0000
committerKarl Berry <karl@freefriends.org>2007-04-25 00:02:06 +0000
commit18113d689eaddf1c57a5bc789f213daa4dfa358b (patch)
tree94eb58e547a98255d2f99ce9410944410bb1f26a /Master/texmf-dist/tex/latex/cmdstring
parent3bf9c09996ceea5ec6f6fcb33132626646196685 (diff)
new latex package cmdstring (23apr07)
git-svn-id: svn://tug.org/texlive/trunk@4189 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cmdstring')
-rw-r--r--Master/texmf-dist/tex/latex/cmdstring/cmdstring.sty32
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/cmdstring/cmdstring.sty b/Master/texmf-dist/tex/latex/cmdstring/cmdstring.sty
new file mode 100644
index 00000000000..ae9c445692d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/cmdstring/cmdstring.sty
@@ -0,0 +1,32 @@
+% $Revision: 45 $
+\def \@tempa $#1 #2-#3-#4 #5${#2/#3/#4}
+\edef \filedate {\@tempa $Date: 2007-04-23 20:24:43 +0200 (Mon, 23 Apr 2007) $}
+\def \fileversion {v1.1}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{cmdstring}%
+ [\filedate \space \fileversion \space Reliable string (JN)]
+
+\@ifdefinable \@gobblespace
+ {\expandafter \def \expandafter \@gobblespace \space {}}
+
+% v1.1: Modified after a suggestion of DAK
+% Test \escapechar > 255 removed to make the package
+% behave nicely with certain extensions of TeX
+
+\newcommand*{\cmdstring}{%
+ \ifnum \escapechar = 32
+ \expandafter \expandafter
+ \expandafter \@gobblespace
+ \expandafter \string
+ \else
+ \if \string \ \space
+ \expandafter\expandafter\expandafter \string
+ \else
+ \expandafter\expandafter\expandafter \expandafter
+ \expandafter\expandafter\expandafter \@gobble
+ \expandafter\expandafter\expandafter \string
+ \fi
+ \fi
+}
+
+\endinput