I am new to LaTeX and having a hard time trying to figure out a way to draw a table like the one in the image below.
- To be precise, how do I get the horizontal line only above the texts "Ruin" and "Success".
- Another issue is how to align the text "Probability of" exactly between "Ruin" and "Success".
I tried:
\begin{tabular}{c c c p{2cm}}
\hline
&&Probability of \\
Capital,$a$ & Ruin & Success & Average duration,$N_a$ \\
\hline
\end{tabular}
Best Answer
You can use
\multicolumn
and\cmidrule
frombooktabs
package.For more details on
\cmidrule
refer to the documentation ofbooktabs
package.A possible refinement for the last header: