Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Asked
Modified today
Viewed 44 times
2

it seems that when using \cline or \SetHline the rows below are displaced downward by the value of the horizontal line inserted. I have three tables in three columns in a beamer slide and at the same height. I tried to compensate with rowsep the row to row distance in one of the other tables but it does not seem to do what i want. I just want to have the row to row distance equal for all tables, despite using any \cline or else in some tables.

\documentclass[aspectratio=169,t]{beamer}

\mode<presentation>
\usetheme{moloch}
\usepackage{tabularray,blindtext}

\newcommand{\titles}[1]{{\bfseries #1\par\vspace{.6em}}}

\setlength{\parindent}{0pt}

\begin{document}
\begin{frame}{aaa}
  \begin{columns}
    \begin{column}{.3\pagewidth}
      \titles{first column}
      \begin{tblr}{colspec={lll},rowsep={2pt}}
        a & b & c\\
        d & e & f\\
        g & h & i\\
        j & k & l\\
        m & n & o\\
      \end{tblr}
      
    \end{column}
    \newlength\mytmp
    \setlength{\mytmp}{6em}
    \begin{column}{.3\pagewidth}
      \titles{second column}
      \begin{tblr}{lll}
        a & b & c\\
        \cline[2pt,blue]{-}
        d & e & f\\
        g & h & i\\
      \end{tblr}

    \end{column}
    
    \begin{column}{.3\pagewidth}
      \titles{third column}
      \begin{tblr}{lll}
        a & b & c\\
        d & e & f\\
      \end{tblr}
    \end{column}
  \end{columns}
  
\end{frame}
\end{document}
1

2 Answers 2

2

Try adding row{1}={belowsep=0pt} to the options of the second table. And be sure to replace \pagewidth with \textwidth.

\documentclass[aspectratio=169,t]{beamer}

\mode<presentation>
\usetheme{moloch}
\usepackage{tabularray}

\newcommand{\titles}[1]{{\bfseries #1\par\vspace{.6em}}}

\setlength{\parindent}{0pt}

\begin{document}
\begin{frame}{aaa}
  \begin{columns}
    \begin{column}{.3\textwidth}
      \titles{first column}
      \begin{tblr}{colspec={lll},rowsep={2pt}}
        a & b & c\\
        d & e & f\\
        g & h & i\\
        j & k & l\\
        m & n & o\\
      \end{tblr}
    \end{column}

    \begin{column}{.3\textwidth}
      \titles{second column}
      \begin{tblr}{colspec={lll},rowsep={2pt},row{1}={belowsep=0pt}}
        a & b & c\\
        \cline[2pt,blue]{-}
        d & e & f\\
        g & h & i\\
      \end{tblr}
    \end{column}

    \begin{column}{.3\textwidth}
      \titles{third column}
      \begin{tblr}{colspec={lll},rowsep={2pt}}
        a & b & c\\
        d & e & f\\
      \end{tblr}
    \end{column}
  \end{columns}
\end{frame}
\end{document}

enter image description here

1

You could use tikz to add a line to your table, which won't influence the table:

\documentclass[aspectratio=169,t]{beamer}

\usetheme{moloch}
\usepackage{tabularray}
\UseTblrLibrary{tikz}
\usepackage{tikz}

\newcommand{\titles}[1]{{\bfseries #1\par\vspace{.6em}}}

\begin{document}
\begin{frame}
\frametitle{aaa}
  \begin{columns}
    \begin{column}{.3\textwidth}
      \titles{first column}
      \begin{tblr}{colspec={lll},rowsep={2pt}}
        a & b & c\\
        d & e & f\\
        g & h & i\\
        j & k & l\\
        m & n & o\\
      \end{tblr}
      
    \end{column}
    \newlength\mytmp
    \setlength{\mytmp}{6em}
    \begin{column}{.3\textwidth}
      \titles{second column}
      \begin{tblrtikzabove}
      \draw (1-1.south west) -- (1-3.south east);
      \end{tblrtikzabove}%
      \begin{tblr}{lll}
        a & b & c\\
        d & e & f\\
        g & h & i\\
      \end{tblr}

    \end{column}
    
    \begin{column}{.3\textwidth}
      \titles{third column}
      \begin{tblr}{lll}
        a & b & c\\
        d & e & f\\
      \end{tblr}
    \end{column}
  \end{columns}
  
\end{frame}
\end{document}

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.