I am trying to replicate this table in LaTeX and I am having some trouble getting the lines to connect.
Here is what I am actually getting:
Here are the packages I am using:
% Packages
\usepackage{times}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage[dvipsnames]{xcolor}
\usepackage{listings}
\usepackage{parcolumns}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{enumitem}
\usepackage{geometry}
\usepackage{soul}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{csquotes}
\usepackage{bookmark}
\usepackage{mdframed}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{aliascnt}
\usepackage{mhchem}
\usepackage{chemfig}
\usepackage{array}
% \usepackage{booktabs}
\usepackage{multicol}
\usepackage[toc]{appendix}
\usepackage[
backend=biber,%
style=chem-acs%
]{biblatex}
And here is how I have the table typeset in my report:
%! TEX root = ../main.tex
\begin{table}[h!]
\centering
\begin{tabular}{|l|l|c|l|l|c|l|l|c|l|l|}
\hline\\
$Q_r$ of $R_1$ & $R_1$ & Plus & $Q_r$ of $R_2$ & $R_2$ & Yields & $Q_r$ of $P_1$ & $P_1$ & Plus & $Q_r$ of $P_2$ & $P_2$\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline\\
& & & & & & & & & &\\
\hline
\end{tabular}
\end{table}
I am aware that the Booktabs package doesn't work well with vertical lines and the general consensus is to just not use them -- but I am trying to replicate this table exactly how it was given to me in the prompt. Why am I unable to get all of the column's vertical lines to match up properly? It clearly works for the first column but goes back to its disconnection in the rest.
\\
after\hline
.\\
before, some older reports I had used that. Thank you!\documentclass{...}
, package\hyperref
had to be load last, each package should be loaded only ones (remove duplicates), Please, in future provide MWE (Minimal working Example), a small but complete document beginning with\documentclas
and ending with\end{document}
and have loaded only to your problem related packages (in your case is no one), which reproduce your problem. So the MWE with solution of your problem is\documentclass{article} \begin{document} \begin{table}[ht] \centering \begin{tabular}{|l|l|c|l|l|c|l|l|c|l|l|} \hline $Q_r$ of $R_1$ & $R_1$ & Plus & $Q_r$ of $R_2$ & $R_2$ & Yields & $Q_r$ of $P_1$ & $P_1$ & Plus & $Q_r$ of $P_2$ & $P_2$\\ \hline & & & & & & & & & &\\ \hline & & & & & & & & & &\\ \hline \end{tabular} \end{table} \end{document}