mirror of
https://github.com/kristoferssolo/Mafia-the-Game-Description.git
synced 2026-03-22 00:26:25 +00:00
feat(env): add entity table env
This commit is contained in:
27
src/utils/entity-table.tex
Normal file
27
src/utils/entity-table.tex
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
\newenvironment{entityTable}[2]{%
|
||||||
|
\tabularx{\linewidth}{|X|X|X|X|}
|
||||||
|
\caption{#1} \label{tab:#2} \\
|
||||||
|
|
||||||
|
\hline
|
||||||
|
\textbf{Lauks} & \textbf{Datu tips} & \textbf{Lauka atribūti} & \textbf{Apraksts} \\ \hline
|
||||||
|
\endfirsthead
|
||||||
|
|
||||||
|
\hline \multicolumn{4}{r}{Turpinājums no iepriekšējās lapas} \\ \hline
|
||||||
|
\textbf{Lauks} & \textbf{Datu tips} & \textbf{Lauka atribūti} & \textbf{Apraksts} \\ \hline
|
||||||
|
\endhead
|
||||||
|
|
||||||
|
\hline \multicolumn{4}{r}{Turpinājums nākamajā lapā} \\ \hline
|
||||||
|
\endfoot
|
||||||
|
|
||||||
|
\hline
|
||||||
|
\endlastfoot
|
||||||
|
|
||||||
|
\entityTableRow{id}{serial8}{primary key, not null}{Unikālais identifikators}
|
||||||
|
}{
|
||||||
|
\endtabularx
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
\newcommand{\entityTableRow}[4]{
|
||||||
|
#1 & \uppercase{\texttt{#2}} & \uppercase{\texttt{#3}} & #4 \\ \hline
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
\input{./src/utils/function-table.tex}
|
\input{./src/utils/function-table.tex}
|
||||||
|
\input{./src/utils/entity-table.tex}
|
||||||
|
|||||||
Reference in New Issue
Block a user