Thursday, 22 August 2013

How to remove multiline space within cell value (in Table)?

How to remove multiline space within cell value (in Table)? References This refers to my following question. Setting single row height with multirow \\documentclass[11pt,table,a5paper]{article} \\usepackage{array,ragged2e} \\usepackage{graphicx} \\usepackage[framemethod=TikZ]{mdframed} \\usepackage{lipsum} \\usepackage[top=2cm, bottom=2cm, outer=1cm, inner=2.1cm,twoside, headsep=26pt]{geometry} \\usepackage{ifthen} \\usepackage{wrapfig} \\usepackage{comment} \\usepackage{parskip} \\usepackage{framed} \\usepackage{sidecap} \\usepackage{longtable} \\usepackage{multirow} \\begin{document} \\newcommand{\\nsr}{\\rule[-1.3cm]{0pt}{2.2cm}} \\newcommand{\\dsr}{\\rule[-3.5cm]{0pt}{4cm}} \\small {\\renewcommand{\\arraystretch}{1.8}\\begin{longtable} {|p{2.7cm}|p{1.0cm}|p{2.4cm}|p{1.0cm}|p{1.3cm}|p{0.8cm}|} \\hline \\rowcolor{green} \\textbf{ \\textcolor{white}{ColA}} &\\textbf{ \\textcolor{white}{ColB}} &\\textbf{ \\textcolor{white}{ColC}} &\\textbf{ \\textcolor{white}{ColD}} &\\textbf{ \\textcolor{white}{ColE}} &\\textbf{ \\textcolor{white}{ColF}} \\\\ \\endfirsthead \\rowcolor{green} \\textbf{ \\textcolor{white}{ColA}} &\\textbf{ \\textcolor{white}{ColB}} &\\textbf{ \\textcolor{white}{ColC}} &\\textbf{ \\textcolor{white}{ColD}} &\\textbf{ \\textcolor{white}{ColE}} &\\textbf{ \\textcolor{white}{ColF}} \\\\ \\endhead \\hline \\rowcolor[RGB]{243,182,185} \\dsr Brainy Person & \\dsr 3.38& \\multirow{1}{*}{\\parbox{2.5cm} {\\textcolor{black}{This is Very first line,~\\\\ ~\\\\ This is Second line,~\\\\ ~\\\\ This is IIIrd line,}}} &\\dsr2.36 & \\dsr 0.62 & \\dsr 18 \\\\\\cline{1-2} \\cline{4-6} \\hline \\nsr Kingestionisation Quesiton Queeneinsteen & \\nsr 1.46& \\multirow{3} {*}{\\parbox{2.5cm}{\\textcolor{black}{This is First line~\\\\ ~\\\\ This is Second line,~\\\\ ~\\\\ This is Third line~\\\\ ~\\\\ This is Fourth line}}} & \\nsr 1.02 & \\nsr 0.62 & \\nsr 13 \\\\\\cline{1-2} \\cline{4-6} \\nsr Foolish Perosn & \\nsr 1.16 & & \\nsr 0.81 & \\nsr 0.62 & \\nsr 45 \\\\\\cline{1-2} \\cline{4-6} \\nsr Attacking Person Rob & \\nsr 1.02 & & \\nsr 0.71 & \\nsr 0.52 & \\nsr 31 \\\\\\cline{1-2} \\cline{4-6} \\hline \\rowcolor{red} Datset & 24 & \\multicolumn{2}{c|}{Normal Value} & 23 & 342 \\\\ \\hline \\end{longtable}} \\end{document} http://i.stack.imgur.com/5KtKX.png In the above example, names in first column gets wrapped in one cell but every name (First, Second and Last name are far apart.i.e separated by multiline). How can I fix this?

No comments:

Post a Comment