diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/cmdstring/cmdstring.sty |
Initial commit
Diffstat (limited to 'macros/latex/contrib/cmdstring/cmdstring.sty')
-rw-r--r-- | macros/latex/contrib/cmdstring/cmdstring.sty | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/macros/latex/contrib/cmdstring/cmdstring.sty b/macros/latex/contrib/cmdstring/cmdstring.sty new file mode 100644 index 0000000000..ae9c445692 --- /dev/null +++ b/macros/latex/contrib/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 |