[Tex/LaTex] Problem with tables: no vertical lines are appearing

tables

For some reason I can't get any vertical lines to show in any of my tables. Attached below is an example code and an image of the produced table with no vertical lines. Some help would be much appreciated.

enter image description here

\documentclass{mnras}
\begin{document}

   \begin{table}

    \caption{Orbital parameters for the Kepler-16 circumbinary system} %title of the table
    \centering % centering table

    \begin{tabular}{| c | c | c | c |} % creating eight columns
    \hline\hline %inserting double-line
    parameter & unit & value & uncertainty \\ 
    [0.5ex] 
    \hline % inserts single-line
    $M_{\rm A}$ & $M_{\odot}$ & 0.6897 & 0.0035 \\
    $M_{\rm B}$ & $M_{\odot}$ & 0.20255 & 0.00065 \\
    $P_{\rm bin}$ & day & 41.079 & 0.000078 \\
    $a_{\rm bin}$ & AU & 0.224 & 0.00035 \\
    $I_{\rm bin}$ & deg & 90.3401 & 0.0019 \\
    $e_{\rm bin} $ & & 0.15944 & 0.0006 \\
    $M_{\rm p}$ & $M_{\rm Jup}$ & 0.333 & 0.016 \\
    $P_{\rm p}$ & day & 228.776 & 0.037 \\
    $a_{\rm p}$ & AU & 0.7048 & 0.001 \\
    $e_{\rm p}$ &  & 0.00685 & 0.00146 \\
    $I_{\rm p}$ & deg & 90.0322 & 0.0023 \\
    Vmag & & 12.0 & \\
    RA & & 19:16:18.0 & \\
    Dec & & +51:45:27  &\\
    \hline % inserts single-line
    \end{tabular}
    \label{tab:orbital_data}
    \end{table}
\end{document}

Best Answer

The class includes the following code

\def\tabular{\def\@halignto{}
 \def\hline{\noalign{\ifnum0=`}\fi
  \vskip 3pt
  \hrule \@height \arrayrulewidth
  \vskip 3pt
  \futurelet \@tempa\@xhline}
 \def\fullhline{\noalign{\ifnum0=`}\fi
  \vskip 3pt
  \hrule \@height \arrayrulewidth
  \vskip 3pt
  \futurelet \@tempa\@xhline}
 \def\@xhline{\ifx\@tempa\hline
   \vskip -6pt
   \vskip \doublerulesep
  \fi
  \ifnum0=`{\fi}}
  \def\@arrayrule{\@addtopreamble{\hskip -.5\arrayrulewidth
%                                  \vrule \@width \arrayrulewidth
                                  \hskip .5\arrayrulewidth}}
\@tabular
}

where the definition of \@arrayrule is a redefinition so that it does not add a rule.

As this is a deliberate choice by the publisher, it seems best not to try to over-ride that.

Note however that if you load array package (or tabularx or any other package based on array then \tabular will anyway be redefined and the rules will come back)

Related Question