summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xpunctuate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-24 23:47:35 +0000
committerKarl Berry <karl@freefriends.org>2012-05-24 23:47:35 +0000
commitfa06059a5302c0916d9310783c0ecf7ebf164b5a (patch)
treeb2524f59788542820a1cc6eec7973284303e88ec /Master/texmf-dist/tex/latex/xpunctuate
parentd0c1a916af0d1bf4993fbc8b0e5e68d196179194 (diff)
new latex package xpunctuate (24may12)
git-svn-id: svn://tug.org/texlive/trunk@26641 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xpunctuate')
-rw-r--r--Master/texmf-dist/tex/latex/xpunctuate/xpunctuate.sty73
1 files changed, 73 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/xpunctuate/xpunctuate.sty b/Master/texmf-dist/tex/latex/xpunctuate/xpunctuate.sty
new file mode 100644
index 00000000000..a0768f655f2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/xpunctuate/xpunctuate.sty
@@ -0,0 +1,73 @@
+%%
+%% This is file `xpunctuate.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xpunctuate.dtx (with options: `package')
+%%
+%% Copyright (C) 2012 by Philip G. Ratcliffe <philip.ratcliffe@uninsubria.it>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.2 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{xpunctuate}
+ [2012/05/21 v1.0 trailing punctuation package (PGR)]
+\RequirePackage{xspace}
+\DeclareRobustCommand\xperiod{\xprd@Set{}}
+\DeclareRobustCommand\xperiodafter[1]{\xprd@Set{#1}}
+\DeclareRobustCommand\xcomma{\xcmm@Set{}}
+\DeclareRobustCommand\xcommaafter[1]{\xcmm@Set{#1}}
+\DeclareRobustCommand\xperiodcomma{\xpcm@Set{}}
+\DeclareRobustCommand\xperiodcommaafter[1]{\xpcm@Set{#1}}
+\newcommand\xprd@Set[1]{\def\xprd@Obj{#1}\futurelet\xprd@Nxt\xprd@Fin}
+\newcommand\xprd@Fin{%
+ \ifx\xprd@Nxt.\relax
+ \let\xprd@Out\xprd@Obj
+ \else
+ \def\xprd@Out{\xprd@Obj.\@\xspace}%
+ \fi
+ \xprd@Out
+}
+\newcommand\xcmm@Set[1]{\def\xcmm@Obj{#1}\futurelet\xcmm@Nxt\xcmm@Fin}
+\newcommand\xcmm@Fin{%
+ \let\xcmm@Out\xcmm@Obj
+ \ifx\xcmm@Nxt\bgroup\else
+ \ifx\xcmm@Nxt\egroup\else
+ \ifx\xcmm@Nxt\/\else
+ \ifx\xcmm@Nxt~\else
+ \ifx\xcmm@Nxt.\else
+ \ifx\xcmm@Nxt!\else
+ \ifx\xcmm@Nxt,\else
+ \ifx\xcmm@Nxt:\else
+ \ifx\xcmm@Nxt;\else
+ \ifx\xcmm@Nxt?\else
+ \ifx\xcmm@Nxt/\else
+ \ifx\xcmm@Nxt'\else
+ \ifx\xcmm@Nxt)\else
+ \ifx\xcmm@Nxt]\else
+ \ifx\xcmm@Nxt-\else
+ \def\xcmm@Out{\xcmm@Obj,\xspace}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \xcmm@Out
+}
+\newcommand\xpcm@Set[1]{\def\xpcm@Obj{#1}\futurelet\xpcm@Nxt\xpcm@Fin}
+\newcommand\xpcm@Fin{%
+ \ifx\xpcm@Nxt.\relax
+ \let\xpcm@Out\xpcm@Obj
+ \else
+ \def\xpcm@Out{\xpcm@Obj.\xcomma}%
+ \fi
+ \xpcm@Out
+}
+\endinput
+%%
+%% End of file `xpunctuate.sty'.