diff --git a/Mafia-the-Game.tex b/Mafia-the-Game.tex index 827bb46..079543e 100644 --- a/Mafia-the-Game.tex +++ b/Mafia-the-Game.tex @@ -24,6 +24,12 @@ \usepackage{chngcntr} \usepackage{longtable} \usepackage{ifthen} +\usepackage{needspace} +\usepackage[framemethod=TikZ]{mdframed} +% uncomment and comment the line above if compile time is too long for preview, +% but it won't compile the continuation overlay in the boxes correctly (should +% be commented for end compilation) +% \usepackage{mdframed} \usetikzlibrary{positioning} diff --git a/src/utils/function-table.tex b/src/utils/function-table.tex index d9dab90..9610418 100644 --- a/src/utils/function-table.tex +++ b/src/utils/function-table.tex @@ -30,21 +30,72 @@ % } +% \newcommand{\moduleFunctionTable}[9]{ +% \paragraph{#1} \label{tab:#2} +% \textbf{Funkcijas nosaukums}: #3 +% +% \textbf{Funkcijas identifikators}: #4 +% +% \textbf{Ievads}: #5 +% +% \textbf{Ievade}: +% +% #6 +% +% \textbf{Apstrāde}: #7 +% +% \textbf{Izvade}: #8 +% +% \textbf{Paziņojumi}: #9 +% } + + +\mdfsetup{ + innertopmargin=8pt, + innerbottommargin=8pt, + skipbelow=0pt, + skipabove=0pt, + everyline=true, + backgroundcolor=gray!2, + linecolor=black, + fontcolor=black, + roundcorner=0pt, + splittopskip=25pt, + secondextra={ + \node[ + overlay, + fill=white, + anchor=west, + inner xsep=10pt + ] at ([xshift=10pt]O|-P) {Turpinājums}; + }, + middleextra={ + \node[ + overlay, + fill=white, + anchor=west, + inner xsep=10pt + ] at ([xshift=10pt]O|-P) {Excursus (Cont.)}; + } + } + +\newcommand{\moduleFunctionTableItem}[2]{ + \begin{mdframed} + \textbf{#1} + \end{mdframed} + + \begin{mdframed} + #2 + \end{mdframed} +} + \newcommand{\moduleFunctionTable}[9]{ \paragraph{#1} \label{tab:#2} - \textbf{Funkcijas nosaukums}: #3 - - \textbf{Funkcijas identifikators}: #4 - - \textbf{Ievads}: #5 - - \textbf{Ievade}: - - #6 - - \textbf{Apstrāde}: #7 - - \textbf{Izvade}: #8 - - \textbf{Paziņojumi}: #9 + \moduleFunctionTableItem{Funkcijas nosaukums}{#3} + \moduleFunctionTableItem{Funkcijas identifikators}{#4} + \moduleFunctionTableItem{Ievads}{#5} + \moduleFunctionTableItem{Ievade}{#6} + \moduleFunctionTableItem{Apstrāde}{#7} + \moduleFunctionTableItem{Izvade}{#8} + \moduleFunctionTableItem{Paziņojumi}{#9} }