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-extension.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-extension.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/upmethodology/upmethodology-extension.sty | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-extension.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-extension.sty new file mode 100644 index 00000000000..9424f2d2ed3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-extension.sty @@ -0,0 +1,112 @@ +% Package for Unified Process Methodology's extensions +% +% Copyright (c) 2006-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: 2006-10-24 +% Modifications: +% 2009-11-03 \If* are marked as \long. +% 2006-10-30 Bug fix: provides "upmethodology-extension" insteed of "upmethodology-document". +% 2006-10-29 Allow to override the default font. +% 2006-10-27 Clean the API +% + +\global\edef\upm@package@ext@ver{2009/11/03} + +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{upmethodology-extension}[\upm@package@ext@ver] + +\RequirePackage{upmethodology-p-common} + +%---------------------------------------- +% TEST MACROS +%---------------------------------------- +\long\def\Ifdefined#1#2{\@ifundefined{upmext@extension@value@#1}{}{#2}} +\long\def\Ifelsedefined#1#2#3{\@ifundefined{upmext@extension@value@#1}{#3}{#2}} +\long\def\Ifundefined#1#2{\@ifundefined{upmext@extension@value@#1}{#2}{}} +\long\def\Ifelseundefined#1#2#3{\@ifundefined{upmext@extension@value@#1}{#2}{#3}} + +%---------------------------------------- +% EXTENSION MANAGEMENT +%---------------------------------------- + +\newcommand{\Get}[1]{\@nameuse{upmext@extension@value@#1}} + +\newcommand{\Set}[3][\upmcurrentlang]{% + % PREDEFINED FRONT PAGE + \ifthenelse{\equal{#2}{frontpage}}{% + \gdef\upmext@extension@value@frontpage{#3}% + \global\let\upmext@extension@value@frontpage@custom\relax% + }{% + % CUSTOM BACK PAGE + \ifthenelse{\equal{#2}{backpage}}{% + \ifthenelse{\equal{\upmcurrentlang}{#1}}{% + \gdef\upmext@extension@value@backpage{#3}% + }{}% + }{% + % CUSTOM FRONT PAGE + \ifthenelse{\equal{#2}{cfrontpage}}{% + \ifthenelse{\equal{\upmcurrentlang}{#1}}{% + \gdef\upmext@extension@value@frontpage{custom}% + \gdef\upmext@extension@value@frontpage@custom{#3}% + }{}% + }{% + \ifthenelse{\equal{\upmcurrentlang}{#1}}{% + \message{*** define extension value #2 ****}% + \global\@namedef{upmext@extension@value@#2}{#3}% + }{}% + }}}% +} + +\newcommand{\Unset}[2][\upmcurrentlang]{% + \ifthenelse{\equal{\upmcurrentlang}{#1}}{% + \message{*** undefine extension value #2 ****}% + \global\expandafter\let\csname upmext@extension@value@#2\endcsname\@undefined% + }{}% +} + +\newcommand{\DeclareCopyright}[5][\upmcurrentlang]{% + \ifthenelse{\equal{\upmcurrentlang}{#1}}{% + \Set{copyright}{Copyright (c) #3 #4.}% + \message{*** style extension #2, \Get{copyright} ****}% + \Set{trademarks}{#5}% + }{}% +} + +\newlength{\upmext@tmp@putx} +\def\Put(#1,#2){% + \setlength{\upmext@tmp@putx}{#1\unitlength}% + \if@twoside\ifodd\c@page\else\addtolength{\upmext@tmp@putx}{28\unitlength}\fi\fi% + \put(\strip@pt\upmext@tmp@putx,#2)} + +%----- +% Use the specified extension +%\UseExtension{extension_name} +\newcommand{\UseExtension}[1]{% + \message{**** including upm extension #1 (upmext-#1.cfg) ****}% + \input{upmext-#1.cfg}% +} + +%------------ +% Default declarations +\Set{frontillustrationsize}{1} +\Set{watermarksize}{1} +\Unset{publisher} +\Unset{copyrighter} +\Unset{printedin} + +\endinput |