I want to do few different things through the attached code for the betterment of the PDF output. Note that the following code gives no error and no warning.
- Need all the equal sign in column 2 & 4 be aligned.
- The line under the table should be in gray and should be left justify to the table.
- Need the 1st row to be centered.
- I think the table position is not correct, if I am correct, please help me to do so.
Code: Select all
\documentclass[11pt]{article}
\usepackage{caption}
\usepackage{booktabs,multirow,amsmath,amssymb,array}
\usepackage{siunitx}
\usepackage[table]{xcolor}
\begin{document}
\begin{table}[!ht]
\caption{Markov channel parameter settings}
\centering
\label{tab:markovchapara}
\tiny\addtolength{\tabcolsep}{-5pt}
\colorbox{lightgray}{%
\begin{tabular}{
c
>{$}c<{$}
@{~}
>{$}c<{$}
@{~~~~~~~}
>{$}c<{$}
@{~}
>{$}c<{$}
}\toprule
\multirow{2}{*}[-0.5ex]{Channel $j$} & \multicolumn{2}{p{9em}}{\text{A long, long, long line, that is broken}} & \multicolumn{2}{p{9em}}{A long, long, long line, that is broken 2} \\ \cmidrule(r){2-3}\cmidrule(l){4-5}
& p_j & q_j & \pi_{bj} & \pi_{ij} \\ \midrule
1 & \Phi\left(N(t)\right)=- \left( 2\,\alpha\,L-L+2\,\alpha-{\alpha}^{2} \right)
& {\lambda}^{2}+\Omega_{{1}}\lambda+\Omega_{{2}}
&\Phi\left(N(t)\right)=\frac{\beta\,y^*\alpha}{\left( x^*+\alpha \right) ^{2}}
& i\Omega_{{1}}\omega+\Omega_{{2}} \\[2ex]
2 & \Phi\left(N(t)\right)=\left( L\,\beta\,\frac{\left( \beta-\gamma \right)}{\delta}\right)
& -{\omega }^{2}+a_{{10}}b_{{01}}-\cos \left( \omega \,\tau \right) a_{{01}}b_{{10}}
&\Phi\left(N(t)\right)= \alpha\,L\, \frac{\left( \delta\,\alpha-\gamma\,\beta \right)}{\delta}
& -{ \omega} \left( a_{{10}}+b_{{01}} \right) \\
\bottomrule
\end{tabular}}
The parameters $\alpha$'s are given in the numerical section.
\end{table}
\end{document}