I am trying to create a table using LaTeX, but it is not working properly.
Some problems are: It is overflowing on the next page, the text is scattered and the alignment is bad. I also want to add more text in the column name idea
.
Please find the code given below.
\documentclass{article}
\begin{document}
\begin{center}
\begin{tabular}{|p{0.4cm}||p{2cm}|p{2cm}|p{2cm}| p{2cm}|p{2cm}|p{2cm}|}
\hline
\multicolumn{7}{|c|}{\textbf{Data Structures}} \\
\hline
\textbf{No} & \textbf{Sigma name and all} & \textbf{Idea}& \textbf{Construct Time(Runtime Time)} & \textbf{Construct Time (Space)} & \textbf{Searching data (Query)} & \textbf{Search head (Space)}\\
\hline
1 & ABCD & These algorithms achieve performance better than the classic & O(NLkt) & O(nL)&O(L(kt + dnp)&O(1)\\ \hline
2& FGH & is an algorithm for solving the approximate or exact Near Neighbor Search in high dimensional spaces & $O(dn \log n)$ & $O(dn)$ &222& $O(1)$\\ \hline
3&LMPQ & is an algorithm for solving the approximate or exact Near Neighbor Search in high dimensional spaces & 008 & 666 & 242&333\\ \hline
4 & RSTV & is an algorithm for solving the approximate or exact Near Neighbor Search in high dimensional spaces & 012 & 888 & 333&55\\ \hline
5& ZMNQ & is an algorithm for solving the approximate or exact Near Neighbor Search in high dimensional spaces &016 & 888 & 444&343\\ \hline
6& WORP & is an algorithm for solving the approximate or exact Near Neighbor Search in high dimensional spaces and MBR &020 &555 & 444&333\\ \hline
7& MNPO & is an algorithm for solving the approximate or exact Near Neighbor Search in high dimensional spaces. Search based on data pruning and the radius of nodes.&024 & 888 &224&342\\ \hline
\hline
\end{tabular}
\end{center}
\end{document}
Best Answer
One possible solution:
\textwidth
determined by use of thegeometry
packagefootnotesize
font sizetabularray
package(grey lines are page borders)
Addendum: Yes, this table can be set on classical way, which can be compiled also on Overleaf. Code as well result are lef elegant, but solution works: