diff options
author | Karl Berry <karl@freefriends.org> | 2013-09-24 22:26:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-09-24 22:26:11 +0000 |
commit | 8524fde36458c91ae6261e04a9ab4093514adff9 (patch) | |
tree | d6175ec64b16092a74968abe31df1067d616c937 /Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty | |
parent | 8f3ce97709cf2f405b02c0b2a75f9ce9484394bf (diff) |
upmethodology (24sep13)
git-svn-id: svn://tug.org/texlive/trunk@31742 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty index 9bf6eede16a..f3a977fcd56 100644 --- a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty +++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty @@ -16,7 +16,7 @@ % 330, Boston, MA 02111-1307, USA. % -\global\edef\upm@package@private@doctype@ver{2013/08/15} +\global\edef\upm@package@private@doctype@ver{2013/09/19} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{upmethodology-p-common}[\upm@package@private@doctype@ver] @@ -88,6 +88,11 @@ \expandafter\let\csname\upm@protect{#1}\endcsname\relax% } +\def\upm@namelet@ext#1#2{% + \expandafter\expandafter\let\expandafter\upm@tmp\csname#2\endcsname% + \global\expandafter\let\csname#1\endcsname\upm@tmp% +} + \def\upm@ifdefinedname#1#2#3{% \expandafter\ifx\csname\upm@protect{#1}\endcsname\relax% #3% @@ -96,6 +101,8 @@ \fi% } +\newcommand{\upm@column@char}{\iflanguage{french}{ :}{:}} + %---------------------------------------- % GET THE REFERENCE ID WITHOUT \REF %---------------------------------------- @@ -129,4 +136,43 @@ {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} +%---------------------------------------- +% MACRO THAT PERMITS TO LOOP ON A SEPARATOR +%---------------------------------------- + +\newif\ifupm@foreach@hasseparator +\newif\ifupm@foreach@oneseparator + +\let\upm@foreach@end\relax + +\def\upm@foreach@rec#1#2{% + {\upm@foreach@searchseparator#2\upm@foreach@end\@nil}% + \ifupm@foreach@hasseparator% + \protected@xdef\upm@foreach@continue{\protect\upm@foreach@rec{#1}{\upm@foreach@rest}}% + \upm@foreach@body% + \upm@foreach@continue% + \else% + \ifupm@foreach@oneseparator\else% + \upm@foreach@lastbody% + \fi% + \fi% +} + +\def\upm@foreach#1\in#2\do#3#4{% + \global\upm@foreach@oneseparatorfalse% + \gdef\upm@foreach@searchseparator##1#1##2\@nil{% + \gdef\upm@foreach@term{##1}% + \ifx\upm@foreach@end##2% + \global\upm@foreach@hasseparatorfalse% + \else% + \gdef\upm@foreach@rest{##2}% + \global\upm@foreach@hasseparatortrue% + \global\upm@foreach@oneseparatortrue% + \fi% + } + \gdef\upm@foreach@body{#3}% + \gdef\upm@foreach@lastbody{#4}% + \upm@foreach@rec{#1}{#2#1}% +} + \endinput |