How to define a formatting to use for (individual) rows of a table?
Example: (For each row) the first column is always bold, and the second column has an italic "title" and some text and possibly something more (e.g. a list). After each row I want to add some additional vertical space. Like so:
\documentclass[a4paper, 10pt]{scrartcl}
\begin{document}
\begin{tabular*}{\textwidth}{p{0.4\textwidth}@{}p{0.6\textwidth}@{}}
\textbf{1st column entry, row 1} & \textit{2nd column title} -- 2nd column entry, row 1
\begin{itemize}
\item{some list}
\item{items here}
\end{itemize} \\
\multicolumn{2}{c}{\vspace{2.0em}} \\
\textbf{1st column entry, row 2} & \textit{2nd column title} -- 2nd column entry, row 2
\newline (maybe only a note here) \\
\multicolumn{2}{c}{\vspace{2.0em}} \\
\end{tabular*}
\end{document}
For a large document with a lot of these tables, it is quite tedious to write all of these formatting commands. What I would like to do is to define a \newenvironment
such that each row of the table can be entered like this
\begin{TableRow}{1st column entry}{2nd column title}{2nd column entry}
%more stuff here, like, e.g., a list:
\begin{itemize}
\item{some}
\item{items}
\end{itemize}
\end{TableRow}
Note that I want to define the layout just for the text of the rows. Such that I can use the environment in each 2-column table, regardless of the column-widths.
This is my non-working attempt so far:
\documentclass[a4paper, 10pt]{scrartcl}
\newenvironment{TableRow}[3]
{
\textbf{#1} & \textit{#2} -- #3
}
{
\\
\multicolumn{2}{c}{\vspace{2.0em}} \\
}
\begin{document}
\begin{tabular*}{\textwidth}{p{0.4\textwidth}@{}p{0.6\textwidth}@{}}
\begin{TableRow}{1st column entry, row 1}{2nd column title}{2nd column entry, row 1}
\begin{itemize}
\item{some}
\item{items}
\end{itemize} \\
\end{TableRow}
\begin{TableRow}{1st column entry, row 2}{2nd column title}{2nd column entry, row 2}
\newline (maybe only a note here) \\
\end{TableRow}
\end{tabular*}
\end{document}
In my minimal example, there are 24 errors, the first of which is "! Extra } or forgotten \endgroup".
(I suspect, that the 2nd block of my \newenvironment
definition is also faulty ("\\"?) but I also get this error, when I leave the 2nd block empty.)