I have a large table with some columns containing quite a lot of text. In each cell I would like to left align (which isn't a problem) as well as manually determine the line break within that cell. Is this possible? It is sort of a table in a table cell that I want. I attach an example where I would like to be able to break the line within the cell after each colon:
Code: Select all
\documentclass[a4paper,10pt,onecolumn]{article}
\usepackage{array}
\newcolumntype{x}[1]{>{\raggedright\hspace{0pt}}p{#1}}
\usepackage{booktabs}
\begin{document}
\begin{table}
\caption{Can I do table within table?}
\begin{center}
\small{
\begin{tabular}{x{1.3cm} x{1.4cm} x{4.2cm} x{4.2cm}}\\\toprule[.4mm]
Colunm 1 &Column2 &Column3 &Column4 \tabularnewline\midrule
entry &entry & 5\%: input for 5\% 20\%: input for 20\% 50\%: input for 50\% & 5\%: result for 5\% 20\%: result for 20\% 50\%: result for 50\%\tabularnewline\midrule
entry &entry & 5\%: other input for 5\% 20\%: other input for 20\% 50\%: other input for 50\% & 5\%: other result for 5\% 20\%: other result for 20\% 50\%: other result for 50\%\tabularnewline
\bottomrule[.4mm]
\end{tabular}
}
\end{center}
\end{table}
\end{document}
Thankful for any help!