# Broken vertical line in tabularx

\begin{table}[H]
\begin{center}
\begin{tabularx}{\textwidth}{|Y|Y|l|}
\hline
Name&Frequency Range&Interpretation and Appearance\\ \hline\hline
Delta \delta&0.1 - 3.5 Hz&Deep sleep or unconsciousness.\\
Theta \theta&4 - 7.5 Hz&Decreased consciousness or sleep.\\
Alpha \alpha&8 - 13 Hz&Awake, relaxed, (clinically: awake or eyes closed)\\
Beta \beta  &14 - 30 Hz&Consciously alert, agitated, or tense\\
Gamma \gamma&30 Hz +&Attention, sensory stimulation\\

\hline
\end{tabularx}
\end{center}
\caption[Rhythms of the EEG signal]{Rhythms of the EEG signal.}
\label{tab:1_2}
\end{table}


• Welcome to TeX SX! How is the Y column type defined? – Bernard Jul 2 '19 at 14:43
• Unrelated, you should not use the center env to center inside a float, you'll get double vertical space (one from the float and one from the center env). replace \begin{center} with \centering and delete \end{center}. Additionally always post full mininal examples instead of sniplets like this, then others (like Bernard) does not have to guess what you are doing, they can just copy and test your code as is. – daleif Jul 2 '19 at 14:46
• If I try to make a compilable minimal working example (MWE) out of your code snippet, I get the following error message: ! Missing $inserted.. This is because \alpha, \beta, ... can only be used in math mode. Therefore replace \alpha by $\alpha$, ... . Also, please never ever ignore error messages! Even if you get something that on first glance resembles a pdf file, there can still be issues with it. After an error, TeX only tries to recover enough to syntax check more of the file, it does not try to make sensible output after an error. – leandriis Jul 2 '19 at 18:14 ## 2 Answers I propose two realizations, in both I used siunitx facilities for improving the appearance of measures. \documentclass{article} \usepackage{geometry} % wider text \usepackage{siunitx} \usepackage{tabularx} % for the first instance \usepackage{booktabs} % for the second instance \begin{document} \begin{table} \begin{tabularx}{\textwidth}{ |>{\centering}X| >{\centering}X| l| } \hline Name & Frequency Range & Interpretation and Appearance\\ \hline\hline Delta$\delta$& \SIrange{0.1}{3.5}{\hertz} & Deep sleep or unconsciousness.\\ Theta$\theta$& \SIrange{4}{7.5}{\hertz} & Decreased consciousness or sleep.\\ Alpha$\alpha$& \SIrange{8}{13}{\hertz} & Awake, relaxed, (clinically: awake or eyes closed)\\ Beta$\beta$& \SIrange{14}{30}{\hertz} & Consciously alert, agitated, or tense\\ Gamma$\gamma$& \SI{>30}{\hertz} & Attention, sensory stimulation\\ \hline \end{tabularx} \caption[Rhythms of the EEG signal]{Rhythms of the EEG signal.} \label{tab:1_2} \end{table} \begin{table} \begin{tabular*}{\textwidth}{ @{\extracolsep{\fill}} |c| c| l| @{} } \toprule Name & Frequency Range & Interpretation and Appearance\\ \midrule Delta$\delta$& \SIrange{0.1}{3.5}{\hertz} & Deep sleep or unconsciousness.\\ Theta$\theta$& \SIrange{4}{7.5}{\hertz} & Decreased consciousness or sleep.\\ Alpha$\alpha$& \SIrange{8}{13}{\hertz} & Awake, relaxed, (clinically: awake or eyes closed)\\ Beta$\beta$& \SIrange{14}{30}{\hertz} & Consciously alert, agitated, or tense\\ Gamma$\gamma$& \SI{>30}{\hertz} & Attention, sensory stimulation\\ \bottomrule \end{tabular*} \caption[Rhythms of the EEG signal]{Rhythms of the EEG signal.} \label{tab:1_2-improved} \end{table} \end{document}  ## The caged table ## The freed one Here are two versions of your table: \documentclass{article} \usepackage{tabularx} \newcolumntype{Y}{>{\centering\arraybackslash}X} %%%%% Only for the second example %%%%% \usepackage{booktabs} \usepackage{calc} \usepackage{siunitx} \newlength{\mycolwidth} \setlength{\mycolwidth}{\widthof{Range in \si{\hertz}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{|Y|Y|l|} \hline Name&Frequency Range&Interpretation and Appearance\\ \hline\hline Delta$\delta$& 0.1 - 3.5 Hz & Deep sleep or unconsciousness.\\ Theta$\theta$& 4 - 7.5 Hz & Decreased consciousness or sleep.\\ Alpha$\alpha$& 8 - 13 Hz & Awake, relaxed, (clinically: awake or eyes closed)\\ Beta$\beta$& 14 - 30 Hz & Consciously alert, agitated, or tense\\ Gamma$\gamma$& 30 Hz + & Attention, sensory stimulation\\ \hline \end{tabularx} \caption[Rhythms of the EEG signal]{Rhythms of the EEG signal.} \label{tab:1_2} \end{table} \begin{table} \centering \begin{tabularx}{\textwidth}{l>{\raggedleft\arraybackslash}p{0.5\mycolwidth-0.5\tabcolsep}@{--}>{\raggedright\arraybackslash}p{0.5\mycolwidth-0.5\tabcolsep}X} \toprule Name & \multicolumn{2}{c}{Frequency} & Interpretation and Appearance \\ & \multicolumn{2}{c}{Range in Hz} & \\ \midrule Delta$\delta$& 0.1 & 3.5 & Deep sleep or unconsciousness. \\ Theta$\theta$& 4 & 7.5 & Decreased consciousness or sleep. \\ Alpha$\alpha$& 8 & 13 & Awake, relaxed, (clinically: awake or eyes closed) \\ Beta$\beta$& 14 & 30 & Consciously alert, agitated, or tense \\ Gamma$\gamma\$ & \multicolumn{2}{c}{\textgreater 30}     & Attention, sensory stimulation                     \\
\bottomrule
\end{tabularx}
\caption[Rhythms of the EEG signal]{Rhythms of the EEG signal.}
\label{tab:1_2}
\end{table}
\end{document}