From 18113d689eaddf1c57a5bc789f213daa4dfa358b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 25 Apr 2007 00:02:06 +0000 Subject: new latex package cmdstring (23apr07) git-svn-id: svn://tug.org/texlive/trunk@4189 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/cmdstring/cmdstring.sty | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/cmdstring/cmdstring.sty (limited to 'Master/texmf-dist/tex') 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 -- cgit v1.2.3