I want to create this table:
I started with this, but it doesn't work:
\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{booktabs}
\begin{document}
\begin{center}
\begin{tabular}{c|c}
hello & hello \\
\toprule
hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \\
hello hello hello hello hello & hello hello hello hello \\
\end{tabular}
\end{center}
\end{document}}
How can I fix this?
booktabs
horizontal rules. So you need to either replace\toprule
with\hline
or get rid of the vertical line. However\toprule
is not the correct choice of rule, it should be\midrule
but I expect what you're really going for is a thicker line, which demands a different solution tex.stackexchange.com/questions/256731/…p{2cm}
(where 2cm is a fairly arbitrary length, you will have to select the width that you would like to use) instead of ac
column. Withc
the column will be as wide as its contents, and if that means too wide for the page then unfortunately the table will run off the page, the line won't break, because you haven't told it when to break. Withp{2cm}
you tell it you want a 2cm wide cell and then the line will break to respect that\specialrule{\heavyrulewidth}{0pt}{0pt}
: it will have the same thickness as\toprule
but no vertical padding. An alternative: loadboldline
, from theshipunov
bundle, which defines horizontal and vertical lines with custom thickness.