Graphics, Figures & TablesMulticolumn problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Multicolumn problem

Post by pallav »

I am facing a Multicolumn problem. The MWE and output are enclosed herewith.

My problems are as follows:
1. I need 8 columns and the symbols a, b, c, d written in 3rd row should come below "Fixed parameters"
3. The word "Remarks" (& similarly NIL) should come at the 8th column 1st row. That is, the word NIL should come below the word "Remarks" in 8th column.

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{The set of parameter values and their corresponding figures}
    \centering
    \label{tab:parameter_values}
		\scriptsize\addtolength{\tabcolsep}{-5pt}
		\colorbox{lightgray}{%
    \begin{tabular}{    
      >{$}c<{$}
      >{$}c<{$}
			>{$}c<{$}
			>{$}c<{$}
			@{~}
      >{$}c<{$}
			c
			c
			%c     
    }\toprule
   \multicolumn{4}{p{12em}}{Fixed parameters} &  \multirow{2}{*}{\tau} &  \multirow{2}{*}{Results/nature of the equilibrium} &  \multirow{2}{*}{Figures} &  \multirow{2}{*}{Remarks} \\   \cmidrule(r){1-4}  
					{a} & 	{b} & 	{d} & 	{h} &  		&  							&  			&  \midrule       \\
       	{1.5} & {1.5} & {1.5} & {1.5} & 1.5 &  {behavior is} & Fig 1 &  {NIL}  \\ \bottomrule  \end{tabular}}
  \end{table}
	\end{document}
Attachments
untitled.JPG
untitled.JPG (22.75 KiB) Viewed 3346 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Multicolumn problem

Post by cgnieder »

I have a suggestion, again with tabu:

Code: Select all

\documentclass[11pt]{article}
\usepackage{caption}
\usepackage{booktabs,multirow,amsmath,amssymb,array}
\usepackage{siunitx}
\usepackage[table]{xcolor}

\usepackage{tabu}

\begin{document}

\begin{table}[!ht]
  \caption{The set of parameter values and their corresponding figures}
  \centering
  \label{tab:parameter_values}
  \scriptsize\addtolength{\tabcolsep}{-5pt}
%   \colorbox{lightgray}{%
    \begin{tabu} to \linewidth {X[$C]X[$C]X[$C]X[$C]X[$C]X[4C]X[2C]X[2C]}
     \toprule
      \multicolumn{4}{p{\dimexpr 4\linewidth/13\linewidth-5\tabcolsep}}{Fixed parameters} &  \tau &
      Results/nature of the equilibrium & Figures & Remarks \\
     \cmidrule(r){1-4}  
      {a} &   {b} &   {d} &   {h} &  &  &   & \\
      {1.5} & {1.5} & {1.5} & {1.5} & 1.5 &  {behavior is} & Fig 1 &  {NIL}  \\
     \bottomrule
    \end{tabu}
%   }
\end{table}

\end{document}
Regards
site moderator & package author
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Re: Multicolumn problem

Post by pallav »

This code gives error like the previous day. I hope my system has some problem that I am not able to detect with especially tabu.
Attachments
LaTeX1.log
(73.9 KiB) Downloaded 240 times
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Multicolumn problem

Post by cgnieder »

And the same answer stands: leave out the siunitx package and see if the error still occurs. If not you need to update your versions of l3kernel and l3packages.

Regards
site moderator & package author
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Re: Multicolumn problem

Post by pallav »

Thank you for your suggestion. I have leaved out the siunitx and get the correct output.
Thanks a lot.
Post Reply