Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newcommand{reqV}[7]
- {
- multirow{5}{*}{#1} & subReq{#1.1}{#3} & multirow{5}{*}{#2} \
- cline{2-3}
- & subReq{#1.2}{#4} & \
- cline{2-3}
- & subReq{#1.3}{#5} & \
- cline{2-3}
- & subReq{#1.4}{#6} & \
- cline{2-3}
- & subReq{#1.5}{#7} & \
- }
- documentclass{article}
- usepackage{tabularx}
- renewcommand{tabularxcolumn}[1]{ m{#1} }
- newcolumntype{M}[1]{ >{centeringarraybackslash} m{#1} }
- newcounter{req}
- newcommand{req}[3]{%
- setcounter{req}{1}%
- parnoindent
- begin{tabularx}{linewidth}{ | M{5em} X M{7em} | }
- hline
- #1 &
- {letoldbackslash\
- renewcommand{tabularxcolumn}[1]{ p{##1} }%
- begin{tabularx}{linewidth}{ | @{hspace{tabcolsep}#1.thereqhspace{tabcolsep}} | X | }
- globaldef\{stepcounter{req}oldbackslash hline}
- #2
- end{tabularx}%
- globallet\oldbackslash} &
- #3 \
- hline
- end{tabularx}
- par
- }
- begin{document}
- req{IR5}{A \ B \ C \ D}{Mandatory}
- req{IR6}{%
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. \
- Pellentesque eget nisi non tortor tincidunt porttitor. \
- Aliquam eget sem arcu. \
- Suspendisse potenti. \
- Nullam pellentesque sapien vel leo consequat facilisis. \
- Aliquam pretium convallis arcu, ut volutpat massa pellentesque quis. \
- Praesent dignissim facilisis risus ac dignissim. \
- Interdum et malesuada fames ac ante ipsum primis in faucibus.}{Optional}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement