General ⇒ Adjusting width of table
Adjusting width of table
This is the coding for the table i am using:
\begin{table}[H]
\begin{center}
\begin{tabular}{ | l | l | }
\hline
Test No & 1 \\ \hline
Description & Selecting continue from welcome page \\ \hline
Input & Button click \\ \hline
Result & Expected result \\ \hline
Conclusion & The button did its function and routed the user to the next page \\
\hline
\end{tabular}
\caption{Test case 1: Welcome page button}
\label{tb:Test case 1: Welcome page button}
\end{center}
\end{table}
Where would i need to apply the neccessary coding:
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Adjusting width of table
Code: Select all
\documentclass{article}\usepackage{array}\begin{document}\begin{table}[H]\setlength\extrarowheight{3pt}\centering\begin{tabular}{|p{2cm}|p{5cm}|}\hlineTest No & 1 \\ \hlineDescription & Selecting continue from welcome page \\ \hlineInput & Button click \\ \hlineResult & Expected result \\ \hlineConclusion & The button did its function and routed the user to the next page \\\hline\end{tabular}\caption{Test case 1: Welcome page button}\label{tb:Test_case_1}\end{table}%requires the array package\begin{table}[H]\setlength\extrarowheight{3pt}\centering\begin{tabular}{|m{2cm}|m{5cm}|}\hlineTest No & 1 \\ \hlineDescription & Selecting continue from welcome page \\ \hlineInput & Button click \\ \hlineResult & Expected result \\ \hlineConclusion & The button did its function and routed the user to the next page \\\hline\end{tabular}\caption{Test case 2: Welcome page button}\label{tb:Test_case_2}\end{table}\end{document}
Re: Adjusting width of table
\caption{xyz}
\label{tb:xyz}
Adjusting width of table
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Adjusting width of table
Basic LaTeX documentation is available with lshort and l2tabu. Useful hints about float environments can be found in epslatex.ma501th wrote:Could you please tell the difference between the following two line of codes
\caption{xyz}
\label{tb:xyz}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10