%%% 
%%% $Id$ 
%%%  
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ncs}[2002/02/14 documentation on NCS for IRAM 30m]
%
\RequirePackage{graphicx}
\RequirePackage{hyperref}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%% -------------------------------------
%%% definitions for title page
%%%

%%% -------------------------------------
%%% defaults
%%%

\newcommand{\theFullTitle}           {New Control System for the IRAM 30m}
\newcommand{\theTitle}               {NCS 30m}
\newcommand{\theMasterURL}           {http://www.iram.es/documents/}
\newcommand{\theFileName}            {}
\newcommand{\theVersionText}         {draft, }
\newcommand{\theVersionNumber}       {1.1}
\newcommand{\theRevisionDate}        {}
\newcommand{\theExpirationDate}      {}
\newcommand{\theSupersedes}          {not applicable}
\newcommand{\theSupersededBy}        {not applicable}
\newcommand{\theAuthorList}          {}
\newcommand{\theAuthorListPDF}       {}
\newcommand{\theContributorList}     {}
\newcommand{\theContributorListPDF}  {}
\newcommand{\theAffiliationList}     {}
\newcommand{\theAddressList}         {}
\newcommand{\theAudience}            {IRAM}
\newcommand{\thePublisher}           {IRAM, Granada}
\newcommand{\theSubject}             {NCS 30m}
\newcommand{\theKeywordList}         {NCS}

%%% -------------------------------------
%%% user commands to set values
%%%

\newcommand{\defFullTitle}[1]        {\renewcommand{\theFullTitle}{#1}}
\newcommand{\defTitle}[1]            {\renewcommand{\theTitle}{#1}}
\newcommand{\defMasterURL}[1]        {\renewcommand{\theMasterURL}{#1}}
\newcommand{\defFileName}[1]         {\renewcommand{\theFileName}{#1}}
\newcommand{\defVersionText}[1]      {\renewcommand{\theVersionText}{#1}}
\newcommand{\defVersionNumber}[1]    {\renewcommand{\theVersionNumber}{#1}}
\newcommand{\defRevisionDate}[1]     {\renewcommand{\theRevisionDate}{#1}}
\newcommand{\defExpirationDate}[1]   {\renewcommand{\theExpirationDate}{#1}}
\newcommand{\defSupersedes}[1]       {\renewcommand{\theSupersedes}{#1}}
\newcommand{\defSupersededBy}[1]     {\renewcommand{\theSupersededBy}{#1}}
\newcommand{\defAuthors}[1]          {\renewcommand{\theAuthorList}{#1}}
\newcommand{\defAuthorsPDF}[1]       {\renewcommand{\theAuthorListPDF}{#1}}
\newcommand{\defContributors}[1]     {\renewcommand{\theContributorList}{#1}}
\newcommand{\defContributorsPDF}[1]  {\renewcommand{\theContributorListPDF}{#1}}
\newcommand{\defAffiliations}[1]     {\renewcommand{\theAffiliationList}{#1}}
\newcommand{\defAddresses}[1]        {\renewcommand{\theAddressList}{#1}}
\newcommand{\defAudience}[1]         {\renewcommand{\theAudience}{#1}}
\newcommand{\defPublisher}[1]        {\renewcommand{\thePublisher}{#1}}
\newcommand{\defSubject}[1]          {\renewcommand{\theSubject}{#1}}
\newcommand{\defKeywords}[1]         {\renewcommand{\theKeywordList}{#1}}


%%% -------------------------------------------
%%% commands to typeset field names and values
%%%

\newcommand{\writeTitleLine}[2]{{\textbf{#1:}} {#2} \hfill \\}
\newcommand{\wL}{\writeTitleLine}

\newcommand{\writeTitle}             {\wL{Title}                  {\theTitle}}
\newcommand{\writeMasterURL}         {\wL{Identifier---MasterURL} {\url{\theMasterURL}}}
\newcommand{\writeFileName}          {\wL{File}                   {\theFileName}}
\newcommand{\writeRevision}          {\wL{Revision}               {\theVersionText\theVersionNumber}}
\newcommand{\writeRevisionDate}      {\wL{Revision Date}          {\theRevisionDate}}
\newcommand{\writeExpirationDate}    {\wL{Expiration Date}        {\theExpirationDate}}
\newcommand{\writeAuthors}           {\wL{Authors}                {\theAuthorList}}
\newcommand{\writeSupersedes}        {\wL{Supersedes}             {\theSupersedes}}
\newcommand{\writeSupersededBy}      {\wL{Is superseded by}       {\theSupersededBy}}
\newcommand{\writeContributors}      {\wL{Contributors}           {\theContributorList}}
\newcommand{\writeAffiliations}      {\wL{Affiliations}           {\theAffiliationList}}
\newcommand{\writeAddresses}         {\wL{Addresses}              {\theAddressList}}
\newcommand{\writeAudience}          {\wL{Audience}               {\theAudience}}
\newcommand{\writePublisher}         {\wL{Publisher}              {\thePublisher}}
\newcommand{\writeSubject}           {\wL{Subject}                {\theSubject}}
\newcommand{\writeKeywords}          {\wL{Keywords}               {\theKeywordList}}


%%% -------------------------------------
%%% Description
%%%

\newenvironment{descriptionOfDocument}
               {\pagebreak[2]\noindent \wL{Description - about this document}{} 
               }
               {
                \hfill\break
                \vspace{15ex plus10ex minus5ex}
               }


%%% ---------------------------------------------
%%% optional Note about Pending Items (see below)
%%%

\newcommand    {\notePending}
               {
                \vfill
%%              \begin{center}
%%              \textsc{\footnotesize 
                \noindent
                {\em Note the list of pending items.}
%%                                             }
%%              \end{center}
               }
%
%%% NB: for related definitions see (below) environment {pending}


%%% -------------------------------------
%%% Short references on title page
%%%

\newcommand    {\referenceToReferences}
               {\pagebreak[2]\noindent \wL{References}{} 
                \noindent
                See the list in \refAppendix{labReferences}.
                \hfill\break
               }
%
    \newcommand{\refAppendix}[1]
               {Appendix \ref{#1}}
%
%%% NB: for related definitions see (below) environment {references}


%%% -------------------------------------
%%% History of document
%%%

\newenvironment{history}
               {\pagebreak[2]\noindent \wL{History of this Document}{} 
                \begin{enumerate}
               }
               {\end{enumerate}
                \hfill\break}
%
     \newcommand{\eventInHistory}[1]
                {\item {#1}}


%%% -------------------------------------
%%% pending items
%%%

\newenvironment{pending}
               {\pagebreak[2]\noindent \wL{Pending Items}{} 
%%              \begin{enumerate}
               }
               {
%%              \end{enumerate}
                \hfill\break}
%
%%     \newcommand{\pendingItem}[1]
%%                {\item {#1}}
       \newcommand{\sectionDate}[1]{(\textit{#1})} 

%%% -------------------------------------
%%% document setup 
%%%

\newcommand{\setupDocument}
 {
%
%% \addtolength{\topmargin}{-0.5in}
%% \addtolength{\textwidth}{30mm}
%% \addtolength{\textheight}{15mm}
%% \addtolength{\oddsidemargin}{-15mm}
%% \addtolength{\evensidemargin}{0mm}
%% \setlength{\marginparwidth}{20mm}
%% \setlength{\marginparsep}{5mm}
%
%
   \pagestyle{headings}
 }

%%% -------------------------------------
%%% PDF setup 
%%%

\newcommand{\setupPDF}
 {
%
   \pdfimageresolution=300\pdfcompresslevel=0
%
   \pdfinfo
   { /Identifier (\theFileName) 
     /File (\theFileName) 
     /Revision (\theVersionNumber) 
     /CreationDate (\theRevisionDate) 
     /RevisionDate (\theRevisionDate) 
     /ExpirationDate (\theExpirationDate)
     /Supersedes (\theSupersedes)
     /SupersededBy (\theSupersededBy)
     /ModDate (\theRevisionDate)
     /Contributors (\theContributorListPDF) 
     /Audience (\theAudience) 
     /Publisher (\thePublisher) 
   }
%
%
   \hypersetup 
   { bookmarks,
     bookmarksopen,
     bookmarksnumbered,
     colorlinks,
     pdfview     =FitH,
     pdfstartview=FitH,
     pdftitle    = {\theTitle},
     pdfauthor   = {\theAuthorListPDF},
     pdfsubject  = {\theSubject},
     pdfkeywords = {\theKeywordList}
   }
 }

%%% -------------------------------------
%%% Produce the Title Page
%%%

%
\newenvironment{titlePage}
 {
 \makeTitlePage
 }
 {
 \vfill
 \begin{center}
 \textsc{\footnotesize 
 We produced this document using PDF-\LaTeX\ with the standard 
 package hyperref and our own prototype package ncs (HU).}
 \end{center}
 }
%
\newcommand{\makeTitlePage}
 {
  \thispagestyle{empty}
%
  \newcommand{\horizontalRule}{\rule{\linewidth}{0.5mm}}
  \vspace{15ex plus10ex minus5ex}
  \noindent
  \horizontalRule
  \begin{flushright}
     \Huge{\theFullTitle}
  \end{flushright}
  \horizontalRule
  \vspace{15ex plus10ex minus5ex}
%
  \begin{flushleft}
     \writeTitle     
     \writeMasterURL 
     \writeFileName  
     \writeRevision  
     \writeRevisionDate   
     \writeExpirationDate 
     \writeSupersedes
     \writeSupersededBy     
     \writeAuthors        
     \writeContributors   
     \writeAffiliations   
     \writeAddresses      
     \writeAudience       
     \writePublisher      
     \writeSubject        
     \writeKeywords       
  \end{flushleft}
%
 }


%%% -------------------------------------
%%% Contents
%%%

\newcommand{\makeContentsPage}
 {
   \newpage
   \tableofcontents
   \newpage
 }

%%% -----------------------------------------------------
%%% General commands can be use anywhere in the text body
%%%

%%% -----------------------------------------------------
%%% Displayed text: comments, etc
%%%

%%% default style:

%%  \newcommand{\theDisplayStyleDefault}  {\vspace{4\parsep} \hfil \linebreak \Large \scshape}
    \newcommand{\theDisplayStyleDefault}  {\vspace{4\parsep}                  \Large \scshape}
    \newcommand{\theDisplayStyle}         {\theDisplayStyleDefault}

%%% user's command to change style:

    \providecommand{\displayStyle}[1][\theDisplayStyleDefault] {\renewcommand{\theDisplayStyle}{#1}}

%%% commands to start, make, and end display:

    \providecommand{\display}             {}
    \providecommand{\displayText} [1]     {{\pagebreak[3] \theDisplayStyle #1}}
    \providecommand{\displayEnd}          {}

%%% --------------------------------------------
%%% Defaults for Task Groups
%%%

                \providecommand{\taskGroup}{\begin{TaskGroupInBody}}
                \providecommand{\taskGroupEnd}{\end{TaskGroupInBody}}
%
%
    \newenvironment{TaskGroupInBody}
               {
                 }
               {
                 }
%%             {{\theDisplayStyleDefault BEGIN TASK GROUP}
%%               }
%%             {{\theDisplayStyleDefault END TASK GROUP}
%%               }
%
                \providecommand{\groupID}[3][]{{\theDisplayStyleDefault #1 #2 #3}}
                \providecommand{\groupState}[1]{\textit{#1}}  
                \providecommand{\groupDate} [1]{\textit{#1}}   
                \providecommand{\groupText} [1]{\vspace{2\parsep} \hfil \newline \textrm{#1}}   


%%% --------------------------------------------
%%% Defaults for some commands renewed lateron
%%%

                \providecommand{\task}[2][\rm]{\item \begin{Task}[#1]{#2}}
                \providecommand{\taskEnd}{\end{Task}}
%
                \providecommand{\req}[1][\rm]{\task [#1]{REQ}}
                \providecommand{\reqEnd}{\taskEnd}
%
                \providecommand{\spec}[1][\rm]{\task [#1]{SPEC}}
                \providecommand{\specEnd}{\taskEnd}
%
                \providecommand{\des}[1][\rm]{\task [#1]{DES}}
                \providecommand{\desEnd}{\taskEnd}
%
                \providecommand{\impl}[1][\rm]{\task [#1]{IMPL}}
                \providecommand{\implEnd}{\taskEnd}
%
                \providecommand{\portability}[1]{\textrm{portability: ##1}}
%
                \providecommand{\inst}[1][\rm]{\task [#1]{INST}}
                \providecommand{\instEnd}{\taskEnd}
%
                \providecommand{\log}[1][\rm]{\task [#1]{LOG}}
                \providecommand{\logEnd}{\taskEnd}
%
                \providecommand{\misc}[1][\rm]{\task [#1]{MISC}}
                \providecommand{\miscEnd}{\taskEnd}
%
                \providecommand{\taskID}[3][]{\textrm{#1 #2 #3}}
                \providecommand{\taskState}[1]{\textrm{state: #1}}  
                \providecommand{\taskDate} [1]{\textrm{#1}}   
                \providecommand{\taskPriority} [1]{\textrm{priority: #1}}   
                \providecommand{\taskIteration} [1]{\textrm{in iteration #1}}   % deprecated
                \providecommand{\taskRelease} [1]{\textrm{in release #1}}   
                \providecommand{\newUpdated}{\textrm{- new/updated }}
%
                \providecommand{\nyd}{\bf}  %% Not Yet Done

%%% -------------------------------------
%%% Requirements
%%%
                
\newenvironment{requirements}
               {\section{Requirements}
               }
               {}

\newenvironment{overviewRequirements}
               {\noindent\textsc{Overview and State of Requirements}
                \renewcommand{\task}[2][\rm]{\item \begin{Requirement}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\item \begin{Requirement}[##1] {##2} }
                \renewcommand{\req}[1][\rm]{\task [##1]{REQ}}
                \renewcommand{\taskID}[3][]{\textrm{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textrm{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textrm{##1}}   
                \renewcommand{\taskPriority} [1]{\textrm{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textrm{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textrm{in release ##1}}   
                \renewcommand{\newUpdated}{\textrm{- new/updated }}
                \renewcommand{\taskEnd}{\end{Requirement}}
                \renewcommand{\reqEnd}{\taskEnd}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \bigskip
                \pagebreak[2]
               }

\newenvironment{detailsRequirements}
               {
%%              \noindent\textsc{Detailed List of Requirements}
                \renewcommand{\task}[2][\rm]{\begin{Requirement}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\begin{Requirement}[##1] {##2} }
                \renewcommand{\req}[1][\rm]{\task [##1]{REQ}}
                \renewcommand{\taskID}[3][]{\subsection{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textit{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textit{##1}}   
                \renewcommand{\taskPriority} [1]{\newline \textit{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textit{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textit{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Requirement}}
                \renewcommand{\reqEnd}{\taskEnd}
               }
               {
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{Requirement}[2][\rm]
               {
                #1 #2 
               }
               {\rm}


%%% -------------------------------------
%%% Specifications
%%%
%               
\newenvironment{specifications}
               {\section{Specifications}
               }
               {}
%
\newenvironment{overviewSpecifications}
               {\noindent\textsc{Overview and State of Specifications}
                \renewcommand{\task}[2][\rm]{\item \begin{Specification}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\item \begin{Specification}[##1] {##2} }
                \renewcommand{\spec}[1][\rm]{\task [##1]{SPEC}}
                \renewcommand{\taskID}[3][]{\textrm{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textrm{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textrm{##1}}   
                \renewcommand{\taskPriority} [1]{\textrm{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textrm{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textrm{in release ##1}}   
                \renewcommand{\newUpdated}{\textrm{- new/updated }}
                \renewcommand{\taskEnd}{\end{Specification}}
                \renewcommand{\specEnd}{\taskEnd}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{detailsSpecifications}
               {
%%              \noindent\textsc{Detailed List of Specifications}
                \renewcommand{\task}[2][\rm]{\begin{Specification}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\begin{Specification}[##1] {##2} }
                \renewcommand{\spec}[1][\rm]{\task [##1]{SPEC}}
                \renewcommand{\taskID}[3][]{\subsection{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textit{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textit{##1}}   
                \renewcommand{\taskPriority} [1]{\newline \textit{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textit{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textit{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Specification}}
                \renewcommand{\specEnd}{\taskEnd}
               }
               {
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{Specification}[2][\rm]
               {
                #1 #2 
               }
               {\rm}


%%% -------------------------------------
%%% Design
%%%
%               
\newenvironment{design}
               {\section{Design}
               }
               {}
%
\newenvironment{overviewDesign}
               {\noindent\textsc{Overview and State of Design}
                \renewcommand{\task}[2][\rm]{\item \begin{Design}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\item \begin{Design}[##1] {##2} }
                \renewcommand{\des}[1][\rm]{\task [##1]{DES}}
                \renewcommand{\taskID}[3][]{\textrm{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textrm{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textrm{##1}}   
                \renewcommand{\taskPriority} [1]{\textrm{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textrm{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textrm{in release ##1}}   
                \renewcommand{\newUpdated}{\textrm{- new/updated }}
                \renewcommand{\taskEnd}{\end{Design}}
                \renewcommand{\desEnd}{\taskEnd}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{detailsDesign}
               {
%%              \noindent\textsc{Detailed List of Design}
                \renewcommand{\task}[2][\rm]{\begin{Design}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\begin{Design}[##1] {##2} }
                \renewcommand{\des}[1][\rm]{\task [##1]{DES}}
                \renewcommand{\taskID}[3][]{\subsection{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textit{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textit{##1}}   
                \renewcommand{\taskPriority} [1]{\newline \textit{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textit{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textit{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Design}}
                \renewcommand{\desEnd}{\taskEnd}
               }
               {
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{Design}[2][\rm]
               {
                #1 #2 
               }
               {\rm}


%%% -------------------------------------
%%% Implementation
%%%
%               
\newenvironment{implementation}
               {\section{Implementation}
               }
               {}
%
\newenvironment{overviewImplementation}
               {\noindent\textsc{Overview and State of Implementation}
                \renewcommand{\task}[2][\rm]{\item \begin{Implementation}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\item \begin{Implementation}[##1] {##2} }
                \renewcommand{\impl}[1][\rm]{\task [##1]{IMPL}}
                \renewcommand{\taskID}[3][]{\textrm{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textrm{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textrm{##1}}   
                \renewcommand{\taskPriority} [1]{\textrm{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textrm{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textrm{in release ##1}}   
                \renewcommand{\portability}[1]{\textrm{portability: ##1}}
                \renewcommand{\newUpdated}{\textrm{- new/updated }}
                \renewcommand{\taskEnd}{\end{Implementation}}
                \renewcommand{\implEnd}{\taskEnd}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{detailsImplementation}
               {
%%              \noindent\textsc{Detailed List of Implementation}
                \renewcommand{\task}[2][\rm]{\begin{Implementation}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\begin{Implementation}[##1] {##2} }
                \renewcommand{\impl}[1][\rm]{\task [##1]{IMPL}}
                \renewcommand{\taskID}[3][]{\subsection{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textit{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textit{##1}}   
                \renewcommand{\taskPriority} [1]{\newline \textit{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textit{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textit{in release ##1}}   
                \renewcommand{\portability}[1]{\textit{portability: ##1}}
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Implementation}}
                \renewcommand{\implEnd}{\taskEnd}
               }
               {
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{Implementation}[2][\rm]
               {
                #1 #2 
               }
               {\rm}

%%% -------------------------------------
%%% Installation
%%%
%               
\newenvironment{installation}
               {\section{Installation}
               }
               {}
%
\newenvironment{overviewInstallation}
               {\noindent\textsc{Overview and State of Installation}
                \renewcommand{\task}[2][\rm]{\item \begin{Installation}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\item \begin{Installation}[##1] {##2} }
                \renewcommand{\inst}[1][\rm]{\task [##1]{INST}}
                \renewcommand{\taskID}[3][]{\textrm{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textrm{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textrm{##1}}   
                \renewcommand{\taskPriority} [1]{\textrm{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textrm{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textrm{in release ##1}}   
                \renewcommand{\newUpdated}{\textrm{- new/updated }}
                \renewcommand{\taskEnd}{\end{Installation}}
                \renewcommand{\instEnd}{\taskEnd}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{detailsInstallation}
               {
%%              \noindent\textsc{Detailed List of Installation}
                \renewcommand{\task}[2][\rm]{\begin{Installation}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\begin{Installation}[##1] {##2} }
                \renewcommand{\inst}[1][\rm]{\task [##1]{INST}}
                \renewcommand{\taskID}[3][]{\subsection{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textit{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textit{##1}}   
                \renewcommand{\taskPriority} [1]{\newline \textit{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textit{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textit{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Installation}}
                \renewcommand{\instEnd}{\taskEnd}
               }
               {
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{Installation}[2][\rm]
               {
                #1 #2 
               }
               {\rm}


%%% -------------------------------------
%%% Logbook
%%%
%               
\newenvironment{logbook}
               {\section{Logbook}
               }
               {}
%
\newenvironment{overviewLogbook}
               {\noindent\textsc{Overview and State of Logbook}
                \renewcommand{\task}[2][\rm]{\item \begin{Logbook}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\item \begin{Logbook}[##1] {##2} }
                \renewcommand{\log}[1][\rm]{\task [##1]{LOG}}
                \renewcommand{\taskID}[3][]{\textrm{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textrm{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textrm{##1}}   
                \renewcommand{\taskPriority} [1]{\textrm{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textrm{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textrm{in release ##1}}   
                \renewcommand{\newUpdated}{\textrm{- new/updated }}
                \renewcommand{\taskEnd}{\end{Logbook}}
                \renewcommand{\logEnd}{\taskEnd}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{detailsLogbook}
               {
%%              \noindent\textsc{Detailed List of Logbook}
                \renewcommand{\task}[2][\rm]{\begin{Logbook}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\begin{Logbook}[##1] {##2} }
                \renewcommand{\log}[1][\rm]{\task [##1]{LOG}}
                \renewcommand{\taskID}[3][]{\subsection{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textit{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textit{##1}}   
                \renewcommand{\taskPriority} [1]{\newline \textit{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textit{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textit{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Logbook}}
                \renewcommand{\logEnd}{\taskEnd}
               }
               {
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{Logbook}[2][\rm]
               {
                #1 #2 
               }
               {\rm}


%%% -------------------------------------
%%% Miscellanea
%%%
%               
\newenvironment{miscellanea}
               {\section{Miscellanea}
               }
               {}
%
\newenvironment{overviewMiscellanea}
               {\noindent\textsc{Overview and State of Miscellanea}
                \renewcommand{\task}[2][\rm]{\item \begin{Miscellanea}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\item \begin{Miscellanea}[##1] {##2} }
                \renewcommand{\misc}[1][\rm]{\task [##1]{MISC}}
                \renewcommand{\taskID}[3][]{\textrm{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textrm{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textrm{##1}}   
                \renewcommand{\taskPriority} [1]{\textrm{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textrm{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textrm{in release ##1}}   
                \renewcommand{\newUpdated}{\textrm{- new/updated }}
                \renewcommand{\taskEnd}{\end{Miscellanea}}
                \renewcommand{\miscEnd}{\taskEnd}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{detailsMiscellanea}
               {
%%              \noindent\textsc{Detailed List of Miscellanea}
                \renewcommand{\task}[2][\rm]{\begin{Miscellanea}[##1] }
%%or            \renewcommand{\task}[2][\rm]{\begin{Miscellanea}[##1] {##2} }
                \renewcommand{\misc}[1][\rm]{\task [##1]{MISC}}
                \renewcommand{\taskID}[3][]{\subsection{##1 ##2 ##3}}
                \renewcommand{\taskState}[1]{\textit{state: ##1}}  
                \renewcommand{\taskDate} [1]{\textit{##1}}   
                \renewcommand{\taskPriority} [1]{\newline \textit{priority: ##1}}   
                \renewcommand{\taskIteration} [1]{\textit{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{\textit{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Miscellanea}}
                \renewcommand{\miscEnd}{\taskEnd}
               }
               {
                \bigskip
                \pagebreak[2]
               }
%
\newenvironment{Miscellanea}[2][\rm]
               {
                #1 #2 
               }
               {\rm}


%%% -------------------------------------
%%% List of Tasks
%%%

\newenvironment{listOfTasks}
               {
                \pagebreak[4]
                \section{List of Tasks}
                \renewcommand{\task}[2][\rm]{\item \begin{Task}[##1]{##2}}
                \renewcommand{\taskID}[2][]{{##1 ##2 }}
%%HU Note: to be consistent with usage above \taskID should be revised to have [3][] parameters!
                \renewcommand{\taskState}[1]{{##1}}  
                \renewcommand{\taskDate} [1]{{##1}}   
                \renewcommand{\taskPriority} [1]{{##1}}   
                \renewcommand{\taskIteration} [1]{{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Task}}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \hfill\break}
%
     \newenvironment{Task}[2][\rm]
               {
                #1 #2 
               }
               {\rm}
%

%%% ---------------------------------------
%%% List of Requirements and Desc.
%%%

\newenvironment{listOfReqAndDes}
               {
                \pagebreak[4]
                \section{List of Requirements/Specifications and Descendants }
                \renewcommand{\taskGroup}{\begin{TaskGroupInList}}
                \renewcommand{\task}[2][\rm]{\item \begin{Task}[##1]{##2}}
                \renewcommand{\taskID}[2][]{{##1 ##2 }}
%%HU Note: to be consistent with usage above \taskID should be revised to have [3][] parameters!
                \renewcommand{\taskState}[1]{{##1}}  
                \renewcommand{\taskDate} [1]{{##1}}   
                \renewcommand{\taskPriority} [1]{{##1}}   
                \renewcommand{\taskIteration} [1]{{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Task}}
                \renewcommand{\taskGroupEnd}{\end{TaskGroupInList}}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \hfill\break}
%
    \newenvironment{TaskGroupInList}
               {\item 
                \begin{itemize} }
               {\end{itemize}}
%


%%% -------------------------------------------------------------
%%% List of Requirements and Desc. sorted by Release and Priority
%%%

\newenvironment{listOfReqAndDesByPR}
               {
                \pagebreak[4]
                \section{Tasks sorted by Release and Priority}
                \renewcommand{\taskGroup}{\begin{TaskGroupInList}}
                \renewcommand{\task}[2][\rm]{\item \begin{Task}[##1]{##2}}
                \renewcommand{\taskID}[2][]{{##1 ##2 }}
%%HU Note: to be consistent with usage above \taskID should be revised to have [3][] parameters!
                \renewcommand{\taskState}[1]{{##1}}  
                \renewcommand{\taskDate} [1]{{##1}}   
                \renewcommand{\taskPriority} [1]{{##1}}   
                \renewcommand{\taskIteration} [1]{{in iteration ##1}}   
                \renewcommand{\taskRelease} [1]{{in release ##1}}   
                \renewcommand{\newUpdated}{\textbf{- new/updated }}
                \renewcommand{\taskEnd}{\end{Task}}
                \renewcommand{\taskGroupEnd}{\end{TaskGroupInList}}
                \begin{enumerate}
                \setlength{\itemsep}{0.1 \itemsep}
               }
               {\end{enumerate}
                \hfill\break}
%

%%% ---------------------------------------------------
%%% Our Thesaurus
%%% commands for a thesaurus (glossary)
%%% note the [optional] style parameter for the keyword
%%% the default for this style if \textbf (boldface)
%%% NB: this is not the \glossary foreseen in LaTeX
%%%
%
              \providecommand{\entry}[3][\textbf]
                             {
                             #1{#2. }{#3}
                             } 
%
\newenvironment{thesaurus}
               {
                \renewcommand{\entry}[3][\textbf]
                             {
                              \item
                             [##1{##2}]{##3}
                             } 
                \pagebreak[4]
                \section{Thesaurus (Glossary)}
                \label{labThesaurus}
                \begin{list}{}{\renewcommand{\makelabel}[1]{{##1}\hfil}
                               \setlength{\labelwidth}{4em}
                               \setlength{\labelsep}{1em}
                               \setlength{\leftmargin}{\labelwidth}
                               \addtolength{\leftmargin}{\labelsep}}
               }
               {
                \end{list}
                \hfill\break
               }
%

%%% -------------------------------------
%%% Referenced Documents
%%%

              \providecommand{\referenceToURL}[2]
                             {
%%                            \item
                              \href{#2}{#1}
                             } 
%
\newenvironment{references}
               {
                \renewcommand{\referenceToURL}[2]
                             {\item
                              \href{##2}{##1}  \\
                              \url{##2}
                             } 
                \pagebreak[4]
                \section{References}
                \label{labReferences}
                \begin{enumerate}
               }
               {\end{enumerate}
                \hfill\break}
%
% short form for tile pages:
%
\newenvironment{referencesS}
               {
                \renewcommand{\referenceToURL}[2]
                             {\item
                              \href{##2}{##1}
                             } 
                \pagebreak[2]\noindent \wL{References and Related Documents---Short List}{} 
                \begin{enumerate}
               }
               {\end{enumerate}
                \hfill\break
               }


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
