-
Notifications
You must be signed in to change notification settings - Fork 0
/
requerimientos.sty
136 lines (115 loc) · 4.05 KB
/
requerimientos.sty
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
% Paquete requerimientos.sty
\usepackage{longtable}
\usepackage{amssymb}
\usepackage{colortbl}
\usepackage{multirow}
\definecolor{tblProbColor}{rgb}{1.0, 0.4, 0.4}
\definecolor{tblReqColor}{rgb}{0.05, 0.55, 0.05}
\definecolor{tblModColor}{rgb}{0.9, 1, 0.9}
\definecolor{tblSubMColor}{rgb}{0.97, 1, 0.97}
\definecolor{userColor}{rgb}{0.2, 0.7, 0.2}
% Docuemtnación de problemas
% Usar:
% \begin{problemas}[color]{prefijo}
%
%
% \end{problemas}
\newenvironment{problemas}[1][tblProbColor]
{%
\arrayrulecolor{#1}%
%\begin{table}[h]%
%\caption{Especificación de problemas}%
\par\begin{longtable}{| p{.05\textwidth} | p{.2\textwidth} | p{.6\textwidth} | p{.05\textwidth} |}%
\arrayrulecolor{white}%
\rowcolor{#1}%
\problema{\color{white}\bf Id}{\color{white}\bf Nombre}{\color{white}\bf Descripción}{\color{white}\bf Pri.}\endhead%
\arrayrulecolor{#1}%
}{%
\end{longtable} %
%\end{table}%
\arrayrulecolor{black} %
}
% Definir un problema (se usa con el environment problemas
% Usar: \problema{id}{Nombre}{Descripción}{Prioridad}
%
% Ejemplo: MB - Muy Baja, B - Baja, M - Media, A - Alta, MA - Muy Alta.
%
% \problema{1}{Error Humano}{La captura en hojas de Excel provoca que errores de dedo afecten los resultados.}{M}
%\hypertarget{#1}{
\newcommand{\problema}[4]{ {#1} & {#2} & {#3} & {#4} \\ \hline}
\newcommand{\mensaje}[3]{ {#1} & {#2} & {#3} \\ \hline}
\newenvironment{mensajes}[1][tblProbColor]
{%
\arrayrulecolor{#1}%
%\begin{table}[h]%
%\caption{Especificación de problemas}%
\par\begin{longtable}{| p{.2\textwidth} | p{.2\textwidth} | p{.6\textwidth} |}%
\arrayrulecolor{white}%
\rowcolor{#1}%
\mensaje{\color{white}\bf Id}{\color{white}\bf Nombre}{\color{white}\bf Descripción}\endhead%
\arrayrulecolor{#1}%
}{%
\end{longtable} %
%\end{table}%
\arrayrulecolor{black} %
}
\newcommand{\FRitem}[4]{\par{RF#1} & {#2} & {#3} \\ \hline}%& {#4} \\ \hline}
\newcolumntype{m}{>{\columncolor{tblModColor}}c}
\newcommand{\MDitem}[2]{%
\rowcolor{tblModColor}%
%\multicolumn{3}{|c|}{Hola}\\%
{\bf {M#1}} & \multicolumn{2}{m|}{\bf {#2}}\\ \hline%
}%& {#4} \\ \hline}
\newcolumntype{s}{>{\columncolor{tblSubMColor}}c}
\newcommand{\SMitem}[2]{%
\rowcolor{tblSubMColor}%
{\bf SM#1} & \multicolumn{2}{s|}{\bf #2}\\ \hline%
}%& {#4} \\ \hline}
\newenvironment{requerimientos}[1][tblReqColor]
{%
\arrayrulecolor{#1}%
\par\noindent\begin{longtable}{| p{.07\textwidth} | p{.2\textwidth} | p{.67\textwidth} |}% p{.05\textwidth} |}% p{.03\textwidth} |}
\arrayrulecolor{#1}%
\hline%
\rowcolor{#1}%
\multicolumn{3}{|c|}{\bf\color{#1}Requerimientos funcionales}\\%
\arrayrulecolor{white}%
\rowcolor{#1}%
\par{\color{white}\bf Id}&{\color{white}\bf Nombre}&{\color{white}\bf Descripción}\\\hline%{\color{white}\bf Prob.}\endhead%
\arrayrulecolor{#1}%
}{%
\end{longtable} %
\arrayrulecolor{black} %
}
%\newcommand{\NFRitem}[5]{\multirow{2}{*}{#1} & \multirow{2}{*}{#2} & {#3} & \multirow{2}{*}{#5} \\* & & {#4} & \\ \hline}
\newcommand{\NFRitem}[5]{\multirow{2}{*}{#1} & \multirow{2}{*}{#2} & {$\mathfrak{N}$}-{#3} \\* & & {$\mathfrak{E}$}-{#4} \\ \hline}
\newenvironment{NFRequieriments}[1][tblReqColor]
{%
\arrayrulecolor{#1}%
\par\begin{longtable}{| p{.08\textwidth} | p{.17\textwidth} | p{.67\textwidth} |}% p{.06\textwidth} | }
\arrayrulecolor{#1}%
\hline%
\rowcolor{#1}%
\multicolumn{3}{|c|}{\bf\color{#1}Requerimientos No funcionales}\\%
\arrayrulecolor{white}%
\rowcolor{#1}%
\par{\color{white}\bf Id} & {\color{white}\bf Atributo} & {\color{white}\bf Necesidad/Estrategia} \\ \hline%
%\FRitem{\color{white}\bf Id}{\color{white}\bf Atributo}{\color{white}\bf Necesidad/Estrategia}{\color{white}\bf Prob.}\endhead%
\arrayrulecolor{#1}%
}{%
\end{longtable} %
\arrayrulecolor{black} %
}
% \begin{Usuario}[icono]{Nombre}
% \Uitem[Descripción:]
% \Uitem[Funciones:]
% \Uitem[:]
% \end{Usuario}
\newcommand{\Uitem}[1][]{\item[#1]}
\newenvironment{Usuario}[2][usr]
{%
\noindent{\color{userColor}\rule{\textwidth}{.5mm}}\\\noindent\includegraphics{images/#1} {\bf #2}%
\begin{description}%\item[\includegraphics{images/#1}] {\bf #2}%
}{%
\end{description}%
}