Mike Gerwitz

Activist for User Freedom

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2014-05-13 13:22:20 -0400
committerMike Gerwitz <gerwitzm@lovullo.com>2014-05-14 16:02:30 -0400
commitb65eada2daff5a651fab58be3513b12377629d38 (patch)
tree3b69640fe50ec5d79cb6d9c1693f987daa0555f3
parentda073efbace2b31574e0d58aafee852c8eb88dbd (diff)
downloadlvspec-b65eada2daff5a651fab58be3513b12377629d38.tar.gz
lvspec-b65eada2daff5a651fab58be3513b12377629d38.tar.bz2
lvspec-b65eada2daff5a651fab58be3513b12377629d38.zip
Now using \makespec instead of \maketitle for rater spec build
-rw-r--r--raterspec.cls53
1 files changed, 32 insertions, 21 deletions
diff --git a/raterspec.cls b/raterspec.cls
index 7a6c9fa..4edbf27 100644
--- a/raterspec.cls
+++ b/raterspec.cls
@@ -69,19 +69,28 @@
% The host environment is the same for all new systems
%
-\def\@raterspec@input@types{
- \PackageWarning{raterspec}{Missing program-specific input parameter types!
- \MessageBreak Define using \protect\inputtypes}
- \todo{No input parameter types have been defined.}
+\let\@@madespec0
+
+\def\@raterspec@mkhook#1#2#3#4{
+ \expandafter\gdef\csname @raterspec@#1\endcsname{
+ \PackageWarning{raterspec}{Missing #2!
+ \MessageBreak Define using \expandafter\protect\csname#1\endcsname}%
+ \todo{No #2 have been defined.}%
+ }%
+ \expandafter\gdef\csname#1\endcsname##1{%
+ \expandafter\gdef\csname @raterspec@#1\endcsname{%
+ #3\input{##1}#4%
+ }%
+ }%
}
-\def\@raterspec@input@params{
- \PackageWarning{raterspec}{Missing input parameters!
- \MessageBreak Define using \protect\inputparams}
- \todo{No input parameters have been defined.}
-}
+\def\makespec{
+ \ifx\@@madespec1%
+ \PackageError{raterspec}{Duplicate call to \protect\makespec}
+ \fi
+
+ \global\let\@@madespec1
-\def\@lvspec@posttitle{
\pnumoff\part{General System}\pnumon
\chapter{Host Environment}
@@ -95,36 +104,38 @@
\section{Program-Specific Parameter Types}
\sectiondept{it/uw}
- \@raterspec@input@types
+ \@raterspec@inputtypes
\index{input data|)}
\chapter{Input Parameters}
\index{input data!parameters|(}
\index{parameter|(}
\input{raterspec/sec/params}
- \@raterspec@input@params
+ \@raterspec@inputparams
\index{input data!parameters|)}
\index{parameter|)}
}
-\def\inputtypes#1{
- \gdef\@raterspec@input@types{
+\@raterspec@mkhook{inputtypes}{input types}
+ {%
% can't really include a sigline here because approvial would be global
\pnumoff
Parameter types in this section are common to the \@title@short\ program.
\pnumon
\index{parameter type|(}
- \input{#1}
- \index{parameter type|)}
}
-}
+ {\index{parameter type|)}}
-\def\inputparams#1{
- \gdef\@raterspec@input@params{
- \input{#1}
- }
+\@raterspec@mkhook{inputparams}{input parameters}
+ {}
+ {}
+
+\AtEndDocument{
+ \ifx\@@madespec0
+ \PackageError{raterspec}{\protect\makespec\space was not called}
+ \fi
}