I found that the line is not the equal length in second row and the first row. Is it possible to make it same line length.
\documentclass{article}
\usepackage{tabularx, caption} % Load package caption for decent foramtting and spacing
\usepackage{booktabs, ragged2e} % Use booktabs rules and get rid og vertical rules, ragged2e to ragged text
\setlength\extrarowheight{1pt} % Both line necessary for decent spacing, unless you are using booktabs rules.
\renewcommand{\arraystretch}{1.2}
\begin{document}
\newcolumntype{A}{>{\RaggedRight\arraybackslash\hsize=0\hsize\linewidth=\hsize}X}
\newcolumntype{B}{>{\RaggedRight\arraybackslash\hsize=0.65\hsize\linewidth=\hsize}X}
\begin{table}[!ht]
\begin{tabularx}{\textwidth}{@{}A*{5}{B}@{}}
\toprule
& & \multicolumn{3}{c}{\textbf{ATest Combination}} \\
\cmidrule(lr){3-5}
& & \small Mean (\%)
& \small Std. Deviation (\%)& \small Std. Error Mean(\%) \\
\midrule
\multicolumn{1}{l}{Pair 1} & Transpor Example Dataset (AA) - Transpor Example Dataset (BB)
& 312314.20\% & 321321.36\% & 4.321354\% \\
\bottomrule
\end{tabularx}
\caption{dsadsa dsadasd%
\label{tab:test123}%
}
\end{table}
\end{document}
The outcome:
And also, how to make the outcome of the word in whole words without being break out automaticall using '-'?
For example:
Transpor Example
Dataset (AA) -
Transpor Example
Dataset (BB)
and not
Transpor Exam-
ple Data -
set (AA) -
Trans-
por Example
Dataset (BB)
\cmidrule(lr){3-5}
with\cmidrule(l){3-5}
or (\cmidrule{3-5}
) – leandriis Aug 6 '19 at 19:11lr
andl
in this part? Any source for reading this, cannot find it. – aan Aug 6 '19 at 19:14r
= shorten the line on the right,l
= shorten the line on the left. This is especially useful if you have more than onecmidrule
next to each other. Without thelr
two adjacent cmidrules would appear as one line instead of two. For a more in depth description, please see page 4 of thebooktabs
manual. – leandriis Aug 6 '19 at 19:16A
type column in your table? – leandriis Aug 6 '19 at 19:20{@{}A*{5}{B}@{}}
you might want to hava a look at: What is the use of @{}?, Repeating the same column type, Table layout with tabularx (column widths: 50%|25%|25%) and How does the \newcolumntype command work? – leandriis Aug 6 '19 at 19:39