Enumerate list with each item in a new row
I propose one of these two solutions:
\documentclass[8pt,a4paper]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage{tabularx}
\usepackage[left=1.2cm, right=1.2cm, top=0.0cm, bottom=0.0cm, headheight=37pt, includeheadfoot]{geometry}
\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother
\usepackage{makecell}
\renewcommand{\theadfont}{\color{black}\bfseries}
\usepackage{listliketab}
\begin{document}
\sffamily
\setlength{\extrarowheight}{2pt}
\noindent\begin{tabularx}{\textwidth}{>{\compress}X|>{\color{red}}c|c|c|*{2}{>{\color{red}}c|}}
\textbf{Bezeichnung} & \thead{Einzelpreis} & \textbf{Anzahl}
& \textbf{Intervall} & \thead{Rabatt} & \thead{€/Monat}\\
\hline%<----->
\begin{enumerate}[label=\Roman*. ,widest =VI, noitemsep, wide=0pt, leftmargin=*, after =\vspace*{-\dimexpr\topsep + \partopsep}]
\item System: Software as a Service Geltungsbereich Arbeits- und
Gesundheitsschutz % &40,00€ & 1&Laufzeit &10\% &36,00€ \\ <--- Idea but doesn´t work...
\item IT-Service-Pack Release, Update, Support:\newline
Übernahme der kompletten IT-Administration und weitere Dienstleistungen
\item Management: Auswahl-, Bestellung-, Überwachungs- und
\item Audit zur Evaluation und Qualitätssicherung %& 7,39€ & 1 & Laufzeit & 10\% & 6,46€ \\ <--- I need smth like this...
\end{enumerate} &40,00€ & 1&Laufzeit &10\% &36,00€ \\ %<---- Only this works
\hline%<----->
Summe & & & & &36,46€
\end{tabularx}
\vskip1cm
\storestyleof{enumerate}
\begin{listliketab}
\newcounter{tabenum}\setcounter{tabenum}{0}
\newcommand{\nextnum}{\addtocounter{tabenum}{1}\Roman{tabenum}.}
\noindent\begin{tabularx}{\textwidth}{LX|>{\color{red}}c|c|c|*{2}{>{\color{red}}c|}}
\multicolumn{2}{l|}{\textbf{Bezeichnung}} & \thead{Einzelpreis} & \textbf{Anzahl}
& \textbf{Intervall} & \thead{Rabatt} & \thead{€/Monat}\\
\hline\noalign{\vskip-1.8ex}%<----->
\nextnum & System: Software as a Service Geltungsbereich Arbeits- und
Gesundheitsschutz &40,00€ & 1&Laufzeit &10\% &36,00€ \\[-3ex]
\nextnum & IT-Service-Pack Release, Update, Support:\newline
Übernahme der kompletten IT-Administration und weitere Dienstleistungen & & & & & \\[-3ex]
\nextnum &Management: Auswahl-, Bestellung-, Überwachungs- und & & & & & \\[-3ex]
\nextnum & Audit zur Evaluation und Qualitätssicherung & 7,39€ & 1 & Laufzeit & 10\% & 6,46€ \\
\hline
\multicolumn{2}{l|}{Summe} & & & & &36,46€
\end{tabularx}
\end{listliketab}
\end{document}
Similarly to @Bernard answer, but some details are different:
- for the first column is defined column type
E
for enumerated contents:
\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother
\newcolumntype{E}[1]{ >{\compress\enumerate}p{#1}<{\endenumerate}}
which simplified writing lists in the first column
- for enumerate list is defined the following setup:
\setlist[enumerate]{%
resume=column,
nosep,
label=\Roman*.,
leftmargin=*,
after=\vspace*{-\dimexpr\baselineskip + \partopsep}}
for resuming enumeration of list is used option
resume=column
, inenumerate
list set upfor start enumeration at
I.
is dedicated\setcounter{enumi}{0}
before first\item
in column (see MWE below)I didn't bother with coloring numbers (it wasn't clear to me, if in some column all number are red, or they are select according to some other criteria)
for compilation is used
xelatex
(due to use € characters for currency)Complete MWE is:
\documentclass[8pt,a4paper]{extarticle}
\usepackage[hmargin=1.2cm, vmargin=0.0cm,
headheight=37pt, includeheadfoot]{geometry}
\usepackage{enumitem}
\usepackage{ragged2e}
\usepackage{tabularx}
\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother
\newcolumntype{E}[1]{ >{\compress\enumerate}p{#1}<{\endenumerate}}
\newcommand*\mcbf[1]{\multicolumn{1}{>{\bfseries}l|}{#1}}
\begin{document}
\setlist[enumerate]{ label=\Roman*.,
nosep,
leftmargin=*,
after=\vspace*{-\dimexpr\baselineskip + \partopsep}}
\begin{tabularx}{\linewidth}{ >{\RaggedRight}E{5cm}*{5}{|X}|}
\mcbf{Bezeichnung}
& \mcbf{Einzelpreis} & \mcbf{Anzahl} & \mcbf{Intervall}
& \mcbf{Rabatt} & \mcbf{€/Monat}\\
\hline%<----->
\setcounter{enumi}{0}
\item System: Software as a Service Geltungsbereich Arbeits- und Gesundheitsschutz
& 40,00€ & 1 & Laufzeit & 10\% & 36,00€ \\
\item IT-Service-Pack Release, Update, Support:
Übernahme der kompletten IT-Administration und weitere Dienstleistungen
\item Management: Auswahl-, Bestellung-, Überwachungs- und
\item Audit zur Evaluation und Qualitätssicherung
& 7,39€ & 1 & Laufzeit & 10\% & 6,46€ \\
\hline%<----->
\mcbf{Summe}
& & & & & 36,46€ \\
\end{tabularx}
\end{document}
addendum: initiated by conversation with @Bernard (in comments below) see if the following variation of mine original answer is more appropriate for you:
- definition of the enumerate style in tables is moved in preamble, where is now available to all lists in table
- for the first column is used
X
column type - for columns with numbers are used
S
columns defined in thesiunitx
package - your table is encapsulated in
table
floating environment. - added are red colors for the second, fifth and six (last) column
\documentclass[8pt,a4paper]{extarticle}
\usepackage[hmargin=1.2cm, vmargin=0.0cm,
headheight=37pt, includeheadfoot]{geometry}
\usepackage{enumitem}
\usepackage{etoolbox} % new
\AtBeginEnvironment{table}{% for enumerate list in "table" environments
\setlist[enumerate]{% % moved in preamble
resume=column,
nosep,
label=\Roman*.,
leftmargin=*,
after=\vspace*{-\dimexpr\baselineskip + \partopsep}}
}
\usepackage{ragged2e}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{siunitx}
\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother
\newcolumntype{E}{ >{\compress\enumerate}X<{\endenumerate}}
\newcommand*\mcbf[1]{\multicolumn{1}{>{\bfseries}l|}{#1}}
\begin{document}
\begin{table}
\begin{tabularx}{\linewidth}{@{}
>{\RaggedRight}E
|S[table-format=2.2,color=red]<{\,\textcolor{red}{€}}
|S[table-format=1.0]
|l
|S[table-format=2.0,color=red]<{\,\textcolor{red}{\%}}
|S[table-format=2.2,color=red]<{\,\textcolor{red}{€}}|
}
\mcbf{Bezeichnung}
& \mcbf{Einzelpreis} & \mcbf{Anzahl} & \mcbf{Intervall}
& \mcbf{Rabatt} & \mcbf{€/Monat}\\
\hline
\setcounter{enumi}{0} % <--- reset counter enumi
\item System: Software as a Service Geltungsbereich Arbeits- und Gesundheitsschutz
& 40,00 & 1 & Laufzeit & 10 & 36,00 \cr % <---
\setcounter{enumi}{1}
\item IT-Service-Pack Release, Update, Support:
Übernahme der kompletten IT-Administration und weitere Dienstleistungen
\item Management: Auswahl-, Bestellung-, Überwachungs- und
\item Audit zur Evaluation und Qualitätssicherung
& 7,39 & 1 & Laufzeit & 10 & 6,46 \cr % <---
\hline%<----->
\mcbf{Sume}
& \mcbf{} & & & \mcbf{} & 36,46 \cr % <---\
\end{tabularx}
\end{table}
\end{document}