Moin moin,
so vllt?
Code:
\begin{filecontents*}{dbtest.csv}
low,high
5,30
\end{filecontents*}
\documentclass[ngerman]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{babel,datatool}
\newcommand*\complow{}
\newcommand*\comphigh{}
\newcommand*\initlh{%
\DTLloaddb{lhdb}{dbtest.csv}%
\DTLforeach{lhdb}{\complow=low,\comphigh=high}{}%
}
\newcommand{\PrintComparisonEnergyPerUnit}[1]%
{
\ifthenelse{\complow > #1}{Sie sind wohl viel unterwegs?;-)}{
\ifthenelse{\comphigh < #1}%
{Ihr Energieverbrauch von #1 kwh ist höher als
normal}%
{Ihr Energieverbrauch bewegt sich im normalen
Bereich}
}
}
\begin{document}
\initlh
\PrintComparisonEnergyPerUnit{31}
\end{document}
MfG
Lesezeichen