
\begin{table}[h!]
\centering
\begin{tabular}{| c | |c |}
\hline
Feature & Elaboration \\ [3ex]
\hline\hline
\\Budget Friendly & The system inputs financial budget of user in it's system, and provides a list of hotels that can be accessed with that budget. \\ [10ex]
\\Interactivity & While using the system, the barrier between machine and user is eradicated to the maximum capability. A user should feel as he/she is talking to a representative of a hotel. \\ [10ex]
\\Data Handling & The data of a user is recorded by the system. It can be easily accessed in the system. \\ [10ex]
\hline
\end{tabular}
Текст, который я написал, не полностью вписывается в таблицу. Какую ошибку я допустил или что нужно исправить?
решение1
Используйте правильный тип столбца для второго столбца. Вам нужно перенос текста, поэтому вы можете использовать p{<width>}
тип столбца или, что предпочтительнее, X
тип, который автоматически вычисляет оставшееся пространство, используйте tabularx
для последнего. Также, вместо добавления вручную vspace, например \\ [3ex]
, просто увеличьте растяжение массива на \renewcommand{\arraystretch}{1.5}
, например.
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\renewcommand{\arraystretch}{1.5}
\begin{table}[!htbp]
\centering
\begin{tabularx}{\linewidth}{|c||X|}
\hline
Feature & Elaboration \\ \hline\hline
Budget Friendly & The system inputs financial budget of user in it's system, and provides a list of hotels that can be accessed with that budget. \\
Interactivity & While using the system, the barrier between machine and user is eradicated to the maximum capability. A user should feel as he/she is talking to a representative of a hotel. \\
Data Handling & The data of a user is recorded by the system. It can be easily accessed in the system.\\ \hline
\end{tabularx}
\end{table}
\end{document}