diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-17 18:02:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-17 18:02:43 +0000 |
commit | 592922d263ef31c47620333f40281f722a5b4e2e (patch) | |
tree | f2cf6e71567420254ee534f7f66fb531c72f75fd /Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty | |
parent | 8caf232ea678d2a7c51b476be84aec1fc9e17423 (diff) |
upmethodology 20091102 (2nov09)
git-svn-id: svn://tug.org/texlive/trunk@16051 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 | 137 |
1 files changed, 137 insertions, 0 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 new file mode 100644 index 00000000000..3768fc94363 --- /dev/null +++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-p-common.sty @@ -0,0 +1,137 @@ +% Copyright (c) 2009 Stephane GALLAND <galland@arakhne.org> +% +% This program is free library; you can redistribute it and/or modify +% it under the terms of the GNU Lesser General Public License as +% published by the Free Software Foundation; either version 3 of the +% License, or any later version. +% +% This library is distributed in the hope that it will be useful, but +% WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% Lesser General Public License for more details. +% +% You should have received a copy of the GNU Lesser General Public +% License along with this library; see the file COPYING. If not, +% write to the Free Software Foundation, Inc., 59 Temple Place - Suite +% 330, Boston, MA 02111-1307, USA. +% +% Creation date: 2009-10-30 +% Modifications (lastest first): +% 2009-11-03 \If* macros are marked with \long +% 2009-11-02 Add internal commands for footnotes. +% + +\global\edef\upm@package@private@doctype@ver{2009/11/03} + +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{upmethodology-p-doctype}[\upm@package@private@doctype@ver] + +\RequirePackage{ifthen} +\RequirePackage{xspace} +\RequirePackage{color} + +%---------------------------------------- +% ARAKHNE.ORG MACRO +%---------------------------------------- +\providecommand{\arakhneorg}{{\begingroup% + {\usefont{T1}{pzc}{m}{it}\selectfont Arakhn\^e}% + {\usefont{T1}{phv}{bc}{sc}\selectfont\tiny.org}\endgroup}\xspace} + +%---------------------------------------- +% CURRENT LANGUAGE +%---------------------------------------- +\def\upmcurrentlang{english} + +%---------------------------------------- +% TEST MACROS +%---------------------------------------- +\long\def\Ifnotempty#1{\ifthenelse{\equal{#1}{\@empty}}{}} +\long\def\Ifempty#1#2{\ifthenelse{\equal{#1}{\@empty}}{#2}{}} +\long\def\Ifelseempty#1#2#3{\ifthenelse{\equal{#1}{\@empty}}{#2}{#3}} + +%---------------------------------------- +% DOCUMENT TYPE +%---------------------------------------- +\newif\ifupmbookformat +\newif\ifupmreportformat +\newif\ifupmarticleformat + +\upmbookformatfalse +\upmreportformattrue +\upmarticleformatfalse + +%---------------------------------------- +% PDF COLORS +%---------------------------------------- +\newcommand{\setpdfcolor}[1]{} + +%---------------------------------------- +% CREATE COMMAND WITH ID AS NAME +%---------------------------------------- +\def\upm@protect#1{\upm@p@protect #1\relax} +\def\upm@p@protect#1#2\relax{% + \ifx\relax #1% + \relax + \else% + \string #1% + \ifx\relax #2% + \relax + \else + \upm@p@protect #2\relax% + \fi + \fi} + +\def\upm@namedef#1#2{% + \@namedef{\upm@protect{#1}}{#2}% +} + +\def\upm@nameuse#1{% + \@nameuse{\upm@protect{#1}}% +} + +\def\upm@nameundef#1{% + \expandafter\let\csname\upm@protect{#1}\endcsname\relax% +} + +\def\upm@ifdefinedname#1#2#3{% + \expandafter\ifx\csname\upm@protect{#1}\endcsname\relax% + #3% + \else% + #2% + \fi% +} + +%---------------------------------------- +% GET THE REFERENCE ID WITHOUT \REF +%---------------------------------------- +\gdef\upm@getref#1{% + \expandafter\ifx\csname r@#1\endcsname\relax + \nfss@text{\reset@font\bfseries ??}% + \else + \expandafter\expandafter\expandafter\@car\csname r@#1\endcsname\@nil + \fi +} + +\gdef\upm@getpageref@filter#1#2#3#4#5{#2} + +\gdef\upm@getpageref#1{% + \expandafter\ifx\csname r@#1\endcsname\relax + \nfss@text{\reset@font\bfseries ??}% + \else% + \protected@xdef\upm@p@tmp@tmp{\protect\upm@getpageref@filter\csname r@#1\endcsname}% + \upm@p@tmp@tmp% + \global\let\upm@p@tmp@tmp\relax% + \fi +} + +%---------------------------------------- +% INTERNAL COMMAND FOR TEXT SUPPER/SUB SCRIPT +%---------------------------------------- + +\let\upm@textsuperscript\textsuperscript + +\def\upm@textsubscript#1{% + {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} + + +\endinput |