0

In the depicted table, I would like to eliminate the gray "title bars" in rows two and three. How do I do that?

enter image description here

\documentclass{beamer}
\usepackage{tcolorbox,csvsimple}

\begin{document}

\begin{filecontents*}[overwrite]{\jobname.csv}
{${{\lambda}= 2 l}$},{${f_{0} = 1\cdot {\dfrac{c}{2l}}}$}
{${{\lambda}= l}$},{${f_{1} =2\cdot  {\dfrac{c}{2l}}}$}
{${{\lambda}= \dfrac23 \cdot  l}$},{${f_{2} = 3 \cdot  {\dfrac{c}{2l}}}$}
\end{filecontents*}

\tcbset{before=,after=,colback=white,height=5em,valign=center,colframe=gray}

\begin{frame}{Stehende Welle mit 2 festen Enden}
\csvreader[no head]{\jobname.csv}{}{
{\begin{tcolorbox}[width=.45\linewidth,left=1em,title={\csviffirstrow{Wellenlänge}}] \csvcoli \end{tcolorbox}}
{\begin{tcolorbox}[width=.45\linewidth,left=1em,title={\csviffirstrow{Frequenz}}] \csvcolii \end{tcolorbox}}} 
\end{frame}

\end{document}

1 Answer 1

0

It is necessary to differentiate the first row from the others using \csviffirstrow.

b

\documentclass{beamer}

\usepackage{csvsimple}
\usepackage[most]{tcolorbox}

\begin{document}
    
    \begin{filecontents*}[overwrite]{\jobname.csv}
        {${{\lambda}= 2 l}$},{${f_{0} = 1\cdot {\dfrac{c}{2l}}}$}
        {${{\lambda}= l}$},{${f_{1} =2\cdot  {\dfrac{c}{2l}}}$}
        {${{\lambda}= \dfrac23 \cdot  l}$},{${f_{2} = 3 \cdot  {\dfrac{c}{2l}}}$}
    \end{filecontents*}
    
    \tcbset{
        before=,
        after=,
        colback=white,
        height=5em,
        valign=center,
        colframe=gray,
        width=.45\linewidth,
        left=1em,
        raster columns=2,raster rows=1,
        raster equal skip=1mm,          
        }

    \begin{frame}{Stehende Welle mit 2 festen Enden}
    \csvreader[no head]{\jobname.csv}{}{%
        \csviffirstrow{%
            \begin{tcbitemize}
                \tcbitem[title=Wellenlänge] \csvcoli
                \tcbitem[title= Frequenz] \csvcolii
            \end{tcbitemize}
        }{%
        \begin{tcbitemize}
            \tcbitem[title=] \csvcoli
            \tcbitem[title=] \csvcolii
        \end{tcbitemize}
    }}

    \end{frame} 
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .