%Copyright 2021 Jean-Michel Bruel
%This program is free template, under the terms of the attached License of this repo. 
%Based on https://github.com/jpeisenbarth/SRS-Tex
%Itself based on the code of Yiannis Lazarides
%http://tex.stackexchange.com/questions/42602/software-requirements-specification-with-latex
%http://tex.stackexchange.com/users/963/yiannis-lazarides
%Also based on the template of Karl E. Wiegers
%http://www.se.rit.edu/~emad/teaching/slides/srs_template_sep14.pdf
%http://karlwiegers.com
\documentclass{scrreprt}
\usepackage{method}		% Specific command from Handbook
\usepackage{minitoc}	% For table of content in chapters
\usepackage{listings}
\usepackage{underscore}
\usepackage[bookmarks=true]{hyperref}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\hypersetup{
    bookmarks=false,    % show bookmarks bar?
    pdftitle={Software Requirement Specification},    % title
    pdfauthor={Jean-Philippe Eisenbarth},                     % author
    pdfsubject={TeX and LaTeX},                        % subject of the document
    pdfkeywords={TeX, LaTeX, graphics, images}, % list of keywords
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=blue,       % color of internal links
    citecolor=black,       % color of links to bibliography
    filecolor=black,        % color of file links
    urlcolor=purple,        % color of external links
    linktoc=page            % only page is linked
}%
\def\myversion{1.23.3 }
\date{}
%\title{%

%}
\usepackage{hyperref}

%--------------------- Numbering ---------------
\usepackage{amsthm}
\usepackage{xassoccnt}
\newtheorem{req}{Requirement}[section]        
\theoremstyle{definition}        
\newtheorem{constraint}{Constraint}[section]
\newtheorem{goal}{Goal}[section]
\DeclareCoupledCountersGroup{theorems}
\DeclareCoupledCounters[name=theorems]{req,constraint,goal}

%--------------------- Comments ---------------
\newcommand{\mynote}[3][black]{\textcolor{#1}{\fbox{\bfseries\sffamily\scriptsize{#2}}
{\small\textsf{\emph{#3}}}}}
\newcommand{\comment}[1]{\mynote[red]{Comment:}{#1}}
%\newcommand{\comment}[1]{}

\begin{document}

\begin{flushright}
    \rule{16cm}{5pt}\vskip1cm
    \begin{bfseries}
        \Huge{SOFTWARE REQUIREMENTS\\ SPECIFICATION}\\
        \vspace{1.9cm}
        for\\
        \vspace{1.9cm}
        $<$Project$>$\\
        \vspace{1.9cm}
        \LARGE{Version \myversion approved}\\
        \vspace{1.9cm}
        Prepared by $<$author$>$\\
        \vspace{1.9cm}
        $<$Organization$>$\\
        \vspace{1.9cm}
        \today\\
    \end{bfseries}
\end{flushright}

%===============================================================
\chapter*{Revision History}
%===============================================================

\begin{center}
    \begin{tabular}{|c|c|c|c|}
        \hline
	    Name        & Date          & Reason For Changes & Version\\
        \hline
        \hline
	    J.-M. Bruel & 2021-01-22    & First Draft & 1.0\\
        \hline
	    J.-M. Bruel & 2023-01-28    & Check after publication of the Handbook & 1.23\\
        \hline
	    J.-M. Bruel & 2023-06-12    & Add reqs automated numbering & 1.23.1 \\
        \hline
	    J.-M. Bruel & 2023-08-25    & Add Minimum Requirements Outcome Principle & \myversion \\
        \hline
	    J.-M. Bruel & 2023-12-22    & Remove section numbers & \myversion \\
        \hline
    \end{tabular}
\end{center}

This document follows the requirements book structure presented in the \href{ https://link.springer.com/content/pdf/10.1007/978-3-031-06739-6.pdf}{Handbook of requirements and business analysis}, by Bertrand Meyer.

%===============================================================
\dominitoc% Initialization
\tableofcontents
%===============================================================

%===============================================================
\chapter{Goals}
\minitoc% Creating an actual minitoc
%===============================================================

\comment{Goals are "needs of the target organization, which the system will address". While the development team is the principal user of the other books, the Goals book addresses a wider audience: essentially, all stakeholders.}

\section*{G.1 Context and overall objective}
\comment{High-level view of the project: organizational context and reason for building a system. 
This chapter should not be empty!}

\begin{goal}\label{goal:first}
This is a goal example. If you  need explicit (and automatic) numbering, you can use the definitions in the \texttt{.tex} template.
Is is refined by \ref{req:memo}
\end{goal}

\begin{req}\label{req:cross}
This is a requirement example. It illustrates how numbering is continuous and cross-types (if this is what you need).
\end{req}
    
\section*{G.2 Current situation}
\comment{Current state of processes to be addressed by the project and the resulting system.}

\begin{req}\label{req:memo}
This is a requirement example. It refines \ref{goal:first}
\end{req}
    
\section*{G.3 Expected benefits}
\comment{New processes, or improvement to existing processes, made possible by the project’s results. This chapter should not be empty!}

\section*{G.4 Functionality overview}
\comment{Overview of the functions (behavior) of the system. Principal properties only (details are in the System book).}

\section*{G.5 High-level usage scenarios}
\comment{Fundamental usage paths through the system.}

\section*{G.6 Limitations and exclusions}
\comment{Aspects that the system need not address.}

\section*{G.7 Stakeholders and requirements sources}
\comment{Groups of people who can affect the project or be affected by it, and other places to consider for information about the project and system.
This chapter should not be empty!}

%===============================================================
\chapter{Environment}
\minitoc% Creating an actual minitoc
%===============================================================

\comment{The Environment book describes the application domain and external context, physical or virtual (or a mix), in which the system will operate.}

\section*{E.1 Glossary}
\comment{Clear and precise definitions of all the vocabulary specific to the application domain, including technical terms, words from ordinary language used in a special meaning, and acronyms.
This chapter should not be empty!}

\section*{E.2 Components}
\comment{List of elements of the environment that may affect or be affected by the system and project. Includes other systems to which the system must be interfaced.}

\section*{E.3 Constraints}
\comment{Obligations and limits imposed on the project and system by the environment.
This chapter should not be empty!}

\section*{E.4 Assumptions}
\comment{Properties of the environment that may be assumed, with the goal of facilitating the project and simplifying the system.}

\section*{E.5 Effects}
\comment{Elements and properties of the environment that the system will affect.}

\section*{E.6 Invariants}
\comment{Properties of the environment that the system’s operation must preserve.}

%===============================================================
\chapter{System}
\minitoc% Creating an actual minitoc
%===============================================================

\comment{The System book refines the Goal one by focusing on more detailed requirements about the system under development, mainly its constituents, behaviors and properties.}

\section*{S.1 Components}
\comment{Overall structure expressed by the list of major software and, if applicable, hardware parts.
This chapter should not be empty!}

\section*{S.2 Functionality}
\comment{One section, S.2.n, for each of the components identified in S.2, describing the corresponding behaviors (functional and non-functional properties).
This chapter should not be empty!}

\section*{S.3 Interfaces}
\comment{How the system makes the functionality of S.2 available to the rest of the world, particularly user interfaces and program interfaces (APIs).}

\section*{S.4 Detailed usage scenarios}
\comment{Examples of interaction between the environment (or human users) and the system: use cases, user stories.}

\section*{S.5 Prioritization}
\comment{Classification of the behaviors, interfaces and scenarios (S.2, S.3 and S.4) by their degree of criticality.}

\section*{S.6 Verification and acceptance criteria}
\comment{Specification of the conditions under which an implementation will be deemed satisfactory.}

%===============================================================
\chapter{Project}
\minitoc% Creating an actual minitoc
%===============================================================

\comment{The Project book describes all the constraints and expectations not about the system itself, but about how to develop and produce it.}

\section*{P.1 Roles and personnel}
\comment{Main responsibilities in the project; required project staff and their needed qualifications.}

\section*{P.2 Imposed technical choices}
\comment{Any a priori choices binding the project to specific tools, hardware, languages or other technical parameters.}

\section*{P.3 Schedule and milestones}
\comment{List of tasks to be carried out and their scheduling.
This chapter should not be empty!}

\section*{P.4 Tasks and deliverables}
\comment{Details of individual tasks listed under P.3 and their expected outcomes.
This chapter should not be empty!}

\section*{P.5 Required technology elements}
\comment{External systems, hardware and software, expected to be necessary for building the system.}

\section*{P.6 Risks and mitigation analysis}
\comment{Potential obstacles to meeting the schedule of P.4, and measures for adapting the plan if they do arise.}

\section*{P.7 Requirements process and report}
\comment{Initially, description of what the requirements process will be; later, report on its steps.}


%===============================================================
\end{document}
%===============================================================
