summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ltxtools/ltxtools.sty
blob: d0ffcb0b3a500aed4e82f12b32a0291d5f738283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
%                                                                          %
% This is file 'ltxtools.sty', version 0.0.1a, December 2011.              %
%                                                                          %
% This package and accompanying files may be distributed and/or            %
% modified under the conditions of the LaTeX Project Public License,       %
% either version 1.3 of this license or any later version. The latest      %
% version of this license is in http://www.latex-project.org/lppl.txt      %
% and version 1.3 or later is part of all distributions of LaTeX           %
% version 2005/12/01 or later.                                             %
%                                                                          %
% The LPPL maintenance status of this software is 'author-maintained'.     %
%                                                                          %
% This software is provided 'as it is', without warranty of any kind,      %
% either expressed or implied, including, but not limited to, the          %
% implied warranties of merchantability and fitness for a particular       %
% purpose.                                                                 %
%                                                                          %
% Copyright (c) 2011 Ahmed Musa (amusa22@gmail.com).                       %
%                                                                          %
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%

\@ifpackageloaded{catoptions}{%
  \@ifpackagelater{catoptions}{2011/12/12}{}{%
    \@latex@error{Loaded version of catoptions package is
      not current}\@ehc
  }%
}{%
  \RequirePackage{catoptions}[2011/12/12]%
}
\UseNormalCatcodes
\StyleFilePurpose{A collection of (La)TeX utilities (AM)}
\StyleFileRCSInfo
$Id: ltxtools.sty,v 0.0.1a 2011/12/12 09:00:00 Ahmed Musa Exp $
\ProvidesPackage{ltxtools}[\StyleFileInfo]
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\SetStyleFileMessages[LTS@]{info}{warn}{err}
\robust@def*\LTS@verbosewarn#1{\ifLTS@verbose\LTS@warn{#1}\fi}
\robust@def*\LTS@verboseinfo#1{\ifLTS@verbose\LTS@info{#1}\fi}
\cptloadpackages{%
  ltxtools-base||2011/12/12;
}
\robust@def*\LTS@inputmodule{\LTS@testopt\LTS@inp@tmodule{}}
\robust@def*\LTS@inp@tmodule[#1]#2{%
  \AfterProcessOptions{\RequirePackage[#1]{ltxtools-#2}}%
}
\robust@def*\ltsdeclaremodules#1{%
  \XDeclareCommandOptions{#1}(LTS@){%
    \cptexpandbracenext{\LTS@inputmodule[##1]}\cpt@curropt
  }%
}
\ltsdeclaremodules{base,environ,doc,index,incluput,review,trace}
\XDeclareBiBooleanOptions{draft,final}[true](LTS@){}{}
\XDeclareBooleanOption{verbose}[true](LTS@){%
  \ifLTS@verbose\cpt@verbosetrue\else\cpt@verbosefalse\fi
}
\XDeclareSwitchOption{tracepatches}[true](LTS@){%
  \ifdefswitchTF{LTS@tracepatches}{%
    \LTS@info{'tracepatches' set true\on@line}%
  }{}%
}
\XDeclareBooleanOption{fp}[true](LTS@){%
  \ifboolTF{LTS@fp}{%
    \AfterProcessOptions{\RequirePackage[nomessages]{fp}}%
  }{}%
}
\XDeclareOption*{\LTS@warn{Unknown option '\CurrentOption' ignored}}
\XExecuteOptions{verbose=false,final=true,tracepatches=false}
\XProcessOptions*\relax

\endinput