2

I am trying to format the following table with more space below the horizontal lines.

\begin{equation*}
    \begin{array}{|c|c|c|}
        \hline
        i & (266)_i & [266]_i\\[3pt]
        \hline
        1   & 2^{2^{2+1}} + 2^{2+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega                 \\
        2   & 3^{3^{3+1}} + 3^{3+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2                  \\
        3   & 4^{4^{4+1}} + 4^{4+1} + 1 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1                  \\
        4   & 5^{5^{5+1}} + 5^{5+1}     &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1}                      \\
        5   & 3^{3^{3+1}} + 3^{3+1} + 2 &   3^{3^{3+1}} + 3^{3+1} + 2                   \\
        \vdots & \vdots & \vdots        \\
        \hline
    \end{array}
\end{equation*}

I have tried replacing hline by \hline\noalign{\vskip 3pt} but this leaves a vertical break in the borders {|c|c|c|}.

1

Two versions (the second is better, in my opinion)

\documentclass{article}
\usepackage{amsmath}
\usepackage{array}
\usepackage{booktabs}

\begin{document}

First version with vertical rules
\begin{equation*}
\renewcommand{\arraystretch}{1.5}
\begin{array}{|c|c|c|}
\hline
i      & (266)_i                   & [266]_i \\
\hline
1      & 2^{2^{2+1}} + 2^{2+1} + 2 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega \\
2      & 3^{3^{3+1}} + 3^{3+1} + 2 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2      \\
3      & 4^{4^{4+1}} + 4^{4+1} + 1 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1      \\
4      & 5^{5^{5+1}} + 5^{5+1}     & \omega^{\omega^{\omega+1}} + \omega^{\omega+1}          \\
5      & 3^{3^{3+1}} + 3^{3+1} + 2 & 3^{3^{3+1}} + 3^{3+1} + 2                               \\
\vdots & \vdots                    & \vdots                                                  \\
\hline
\end{array}
\end{equation*}
and the second version without them
\begin{equation*}
\renewcommand{\arraystretch}{1.5}
\setlength{\extrarowheight}{2pt}
\addtolength{\arraycolsep}{6pt}
\begin{array}{@{}ccc@{}}
\toprule
\addlinespace[-2pt]
i      & (266)_i                   & [266]_i \\
\midrule
1      & 2^{2^{2+1}} + 2^{2+1} + 2 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega \\
2      & 3^{3^{3+1}} + 3^{3+1} + 2 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2      \\
3      & 4^{4^{4+1}} + 4^{4+1} + 1 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1      \\
4      & 5^{5^{5+1}} + 5^{5+1}     & \omega^{\omega^{\omega+1}} + \omega^{\omega+1}          \\
5      & 3^{3^{3+1}} + 3^{3+1} + 2 & 3^{3^{3+1}} + 3^{3+1} + 2                               \\
\vdots & \vdots                    & \vdots                                                  \\
\bottomrule
\end{array}
\end{equation*}

\end{document}

enter image description here

1

You could use \extrarowheight from the array package if you want the space everywhere. For more space in one row you could either insert an empty line and then get back a bit, of use some strut, e.g. a \vphantom equation:

\documentclass{article}
\usepackage{array}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
    \extrarowheight5pt
    \begin{array}{|c|c|c|}
        \hline
        i & (266)_i & [266]_i\\[3pt]
        \hline
        1   & 2^{2^{2+1}} + 2^{2+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega                 \\
        2   & 3^{3^{3+1}} + 3^{3+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2                  \\
        3   & 4^{4^{4+1}} + 4^{4+1} + 1 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1                  \\
        4   & 5^{5^{5+1}} + 5^{5+1}     &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1}                      \\
        5   & 3^{3^{3+1}} + 3^{3+1} + 2 &   3^{3^{3+1}} + 3^{3+1} + 2                   \\
        \vdots & \vdots & \vdots        \\
        \hline
    \end{array}
\end{equation*}

\begin{equation*}
    \begin{array}{|c|c|c|}
        \hline
        i & (266)_i & [266]_i\\[3pt]
        \hline &&\\[\dimexpr-\normalbaselineskip+5pt]
        1   & 2^{2^{2+1}} + 2^{2+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega                 \\
        2   & 3^{3^{3+1}} + 3^{3+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2                  \\
        3   & 4^{4^{4+1}} + 4^{4+1} + 1 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1                  \\
        4   & 5^{5^{5+1}} + 5^{5+1}     &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1}                      \\
        5   & 3^{3^{3+1}} + 3^{3+1} + 2 &   3^{3^{3+1}} + 3^{3+1} + 2                   \\
        \vdots & \vdots & \vdots        \\
        \hline
    \end{array}
\end{equation*}

\begin{equation*}
    \begin{array}{|c|c|c|}
        \hline
        i & (266)_i & [266]_i\\[3pt]
        \hline 
        \vphantom{2^{2^{2+1^{2^{1^{1}}}}}}%
        1   & 2^{2^{2+1}} + 2^{2+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega                 \\
        2   & 3^{3^{3+1}} + 3^{3+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2                  \\
        3   & 4^{4^{4+1}} + 4^{4+1} + 1 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1                  \\
        4   & 5^{5^{5+1}} + 5^{5+1}     &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1}                      \\
        5   & 3^{3^{3+1}} + 3^{3+1} + 2 &   3^{3^{3+1}} + 3^{3+1} + 2                   \\
        \vdots & \vdots & \vdots        \\
        \hline
    \end{array}
\end{equation*}

\end{document}

enter image description here

1

A simple solution based on the cellspace package, which defines minimal vertical spacing at the top or bottom of cells in columns with qualifier prefixed with the letter S:

    \documentclass{article}
    \usepackage{array, amsmath}

\usepackage[math]{cellspace}
\setlength\cellspacetoplimit{3pt}
\setlength\cellspacebottomlimit{3pt}
    \begin{document}

\begin{equation*}
    \begin{array}{|Sc|>{$}Sc<{$}|c|}
        \hline
 i & (266)_i & [266]_i\\
        \hline
        1 & 2^{2^{2+1}} + 2^{2+1} + 2 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega \\
        2 & 3^{3^{3+1}} + 3^{3+1} + 2 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2 \\
        3 & 4^{4^{4+1}} + 4^{4+1} + 1 & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1 \\
        4 & 5^{5^{5+1}} + 5^{5+1} & \omega^{\omega^{\omega+1}} + \omega^{\omega+1} \\
        5 & 3^{3^{3+1}} + 3^{3+1} + 2 & 3^{3^{3+1}} + 3^{3+1} + 2 \\[-6pt]
        \vdots & \vdots & \vdots \\
        \hline
    \end{array}
\end{equation*}

    \end{document} 

enter image description here

0

With good old mdwtab it is simple:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{mdwtab}

\begin{document}
\begin{equation*}
    \begin{tabular}{|c|Mc|Mc|}
    \hlx{hv}
i & (266)_i & [266]_i\\[3pt]
    \hlx{hvv}
1   & 2^{2^{2+1}} + 2^{2+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + \omega                 \\
2   & 3^{3^{3+1}} + 3^{3+1} + 2 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 2                  \\
3   & 4^{4^{4+1}} + 4^{4+1} + 1 &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1} + 1                  \\
4   & 5^{5^{5+1}} + 5^{5+1}     &   \omega^{\omega^{\omega+1}} + \omega^{\omega+1}                      \\
5   & 3^{3^{3+1}} + 3^{3+1} + 2 &   3^{3^{3+1}} + 3^{3+1} + 2                   \\
\vdots & \vdots & \vdots        \\
    \hlx{h}
    \end{tabular}
\end{equation*}
\end{document}

Note: mdwtab is not compatible with colortbl, i.e. cells, columns or row can not be colored.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.