2

I would like to display a long table on a frame in beamer. enter image description here

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{multicol}
\usepackage{pifont}
\usepackage{tasks}
\usepackage{empheq}
\usepackage{tikz,tkz-tab}
\usetikzlibrary{calc,positioning}
\usepackage{multirow}
\usepackage{makecell}
  \newcommand{\abs}[1]{\left\lvert#1\right\rvert} % Commande pour obtenir la valeur absolue.
\DeclarePairedDelimiter{\openintvl}{]}{[}
\renewcommand{\arraystretch}{2}
\usetheme{Madrid}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{frame}[allowframebreaks]
\renewcommand\arraystretch{0.1}
\begin{displaymath}
\begin{array}{|c|c|c|c|}
\hline
 \mbox{Fonction }f &D_f   &\mbox{Fonction d\'eriv\'ee }f'&D_{f'}  \\
 \hline
x^n,\ n\in{\mathbb N}& {\mathbb R}  &nx^{n-1}&{\mathbb R}  \\
 \hline
\rule[-2.5ex]{0pt}{6ex}\displaystyle\frac{1}{x^n}=x^{-n}, n\in{\mathbb N}\setminus\{0\} &{\mathbb R}\setminus\{0\}  &-\displaystyle\frac{n}{x^{n+1}}=-nx^{-n-1}&{\mathbb R}\setminus\{0\}  \\
\hline
x^{\alpha},\ \alpha\in]0,+\infty[&]0,+\infty[  &\alpha x^{\alpha-1}&]0,+\infty[  \\
 \hline\hline
 \mbox{e}^x  &{\mathbb R} &\mbox{e}^x&{\mathbb R}  \\
 \hline
\rule[-2.5ex]{0pt}{6ex}  \ln\vert x\vert   &{\mathbb R}\setminus\{0\}  &\displaystyle\frac{1}{x}&{\mathbb R}\setminus\{0\}  \\
 \hline\hline
 \cos x    &{\mathbb R} &-\sin x&{\mathbb R}  \\
 \hline
 \sin x    &{\mathbb R}  &\cos x&{\mathbb R}  \\
 \hline
\rule[-2.5ex]{0pt}{6ex}\tan x    &{\mathbb R}\setminus\{\frac{\pi}{2}+\pi{\mathbb Z}\} &1+\tan^2( x)= \displaystyle\frac{1}{\cos^2(x)}&{\mathbb R}\setminus\{\frac{\pi}{2}+\pi{\mathbb Z}\}  \\
 \hline
  \hline
 \cosh x   &{\mathbb R}  &\sinh x&{\mathbb R}  \\
 \hline
 \sinh x    &{\mathbb R} &\cosh x&{\mathbb R}  \\
 \hline
  \tanh x    &{\mathbb R} &1-\tanh^2(x)= \displaystyle\frac{1}{\cosh^2(x)}&{\mathbb R}  \\
 \hline\hline
 \arccos x    &[-1,1] &-\displaystyle \displaystyle\frac{1}{\sqrt{1-x^2}}&]-1,1[  \\
 \hline
  \arcsin x    &[-1,1] &\displaystyle\frac{1}{\sqrt{1-x^2}}&]-1,1[  \\
 \hline
  \arctan x    &{\mathbb R} &\displaystyle\frac{1}{1+x^2}&{\mathbb R}  \\
 \hline
\end{array}
\end{displaymath}
\end{frame}
\end{document}

1 Answer 1

7

I would solve your issue with a customized longtable.

Since i'm no friend of vertical rules in tables i switched the layout according to the booktabs guidelines.

enter image description here

\documentclass{beamer}

\usepackage{booktabs}
\usepackage[column=O]{cellspace}
\usepackage{longtable}

\usetheme{Madrid}

\setlength\cellspacebottomlimit{0.37em}
\setlength\cellspacetoplimit{0.37em}

\begin{document}

\begin{frame}[allowframebreaks]
    \scriptsize
    \begin{longtable}{*{4}{>{$\displaystyle}O{c}<{$}}} 
        \toprule
        \mbox{Fonction }f                                    & D_f                                                 & \mbox{Fonction d\'eriv\'ee }f'     & D_{f'}                                              \\ \midrule
        x^n,\ n\in{\mathbb N}                                & \mathbb{R}                                          & nx^{n-1}                           & \mathbb{R}                                          \\
        \frac{1}{x^n}=x^{-n}, n\in{\mathbb N}\setminus\{0\}  & \mathbb{R}\setminus\{0\}                            & -\frac{n}{x^{n+1}}=-nx^{-n-1}      & \mathbb{R}\setminus\{0\}                            \\
        x^{\alpha},\ \alpha\in]0,+\infty[                    & ]0,+\infty[                                         & \alpha x^{\alpha-1}                & ]0,+\infty[                                         \\ \midrule
        \mbox{e}^x                                           & \mathbb{R}                                          & \mbox{e}^x                         & \mathbb{R}                                          \\
        \ln\vert x\vert                                      & \mathbb{R}\setminus\{0\}                            & \frac{1}{x}                        & \mathbb{R}\setminus\{0\}                            \\ \midrule
        \cos x                                               & \mathbb{R}                                          & -\sin x                            & \mathbb{R}                                          \\
        \sin x                                               & \mathbb{R}                                          & \cos x                             & \mathbb{R}                                          \\
        \tan x                                               & \mathbb{R}\setminus\{\frac{\pi}{2}+\pi{\mathbb Z}\} & 1+\tan^2(x)= \frac{1}{\cos^2(x)}   & \mathbb{R}\setminus\{\frac{\pi}{2}+\pi{\mathbb Z}\} \\ \bottomrule
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
        \multicolumn{4}{O{r}}{continue on next slide...}    \\ \pagebreak
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
        \toprule 
        \mbox{Fonction }f                                    & D_f                                                 & \mbox{Fonction d\'eriv\'ee }f'     & D_{f'}                                              \\ \midrule
        \cosh x                                              & \mathbb{R}                                          & \sinh x                            & \mathbb{R}                                          \\
        \sinh x                                              & \mathbb{R}                                          & \cosh x                            & \mathbb{R}                                          \\
        \tanh x                                              & \mathbb{R}                                          & 1-\tanh^2(x)= \frac{1}{\cosh^2(x)} & \mathbb{R}                                          \\ \midrule
        \arccos x                                            & [-1,1]                                              & - \frac{1}{\sqrt{1-x^2}}           & ]-1,1[                                              \\
        \arcsin x                                            & [-1,1]                                              & \frac{1}{\sqrt{1-x^2}}             & ]-1,1[                                              \\
        \arctan x                                            & \mathbb{R}                                          & \frac{1}{1+x^2}                    & \mathbb{R}                                          \\ \bottomrule
    \end{longtable}
\end{frame}

\end{document}
2
  • 1
    @DavidCarlisle +1 Fixed! Apr 19, 2020 at 22:04
  • Hello, sorry for reviving this, but what does {*{4}{>{$\displaystyle}O{c}<{$}}} do after the \begin{longtable}. I'm trying to reproduce this, but I'm not familiar with this notation.
    – Majubs
    Nov 29, 2022 at 20:03

You must log in to answer this question.

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