1

enter image description here

Hello Community can any one help me? Why table is showing me like this? Any idea please

Code are below:

\renewcommand\theadfont{\normalsize\bfseries}

\definecolor{myblue1}{rgb}{0.776,0.851,0.945}
\definecolor{myblue2}{rgb}{0.722,0.8,0.894}
\definecolor{myblue3}{rgb}{0.584,0.702,0.843}
\definecolor{myblue4}{rgb}{0.329,0.553,0.831}
\definecolor{myblue5}{rgb}{0.212,0.373,0.569}
\definecolor{myblue6}{rgb}{0.141,0.251,0.38}
\definecolor{myblue7}{rgb}{0.086,0.149,0.227}
\begin{document}

\begin{table*}[b]
\arrayrulecolor[rgb]{0.212,0.373,0.569}
\begin{tabularx}{\textwidth}{|>{\raggedright\arraybackslash}X|*{12}{wc{1em}|}} 
\hline
 & \multicolumn{12}{c|}{\thead{Duration of Project}}                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \\ 
\cline{2-13}
\thead{Works} & \multicolumn{6}{c|}{\thead{1$^{st}$ Year (Months)}}  & \multicolumn{6}{c|}{\thead{2$^{nd}$ Year (Months)}}                                                                                                                                                                                              \\ 
\cline{2-13}
 & \thead{2} & \thead{4}   & \thead{6}  & \thead{8}  & \thead{10}  & \thead{12}
 & \thead{2} & \thead{4}   & \thead{6}  & \thead{8}  & \thead{10}  & \thead{12} \\ 
\hline
Literature survey,  purchase of chemicals
  &  & \cellcolor{myblue1} & \cellcolor{myblue1} & &  &  &  &  &  &  & &   \\ 
\hline
Synthesis and calcination of \ch {Ba_{1-x}La_{x}Fe_{1-y}Nb_{y}O_{3-\chemdelta}}{(x: 0.1 and y: 0.05 & 0.1)} perovskite powders.
  &  &  &  & \cellcolor{myblue2}   & \cellcolor{myblue2}   &  &  &  &  &  &  &   \\ 
\hline
Characterizations of \ch{Ba_{1-x}La_{x}Fe_{1-y}Nb_{y}O_{3-\chemdelta}}{(x: 0.1 and y: 0.05 & 0.1)} perovskite powders.
  &  &  &  &  &  & \cellcolor{myblue3} & \cellcolor{myblue3} &  &  &  &  &   \\ 
\hline
Fabrication and densification of bulk \ch{Ba_{1-x}La_{x}Fe_{1-y}Nb_{y}O_{3-\chemdelta}}{(x: 0.1 and y: 0.05 & 0.1)} samples
  &  &  &  &  &  &  &  & \cellcolor{myblue4} & \cellcolor{myblue4} &  &  &   \\ 
\hline
Density and microstructural studies of \ch{BaFe_{0.9-x}Nb_{x}O_{3-\chemdelta}} (x: 0, 0.05 and 0.1) bulk samples
  &  &  &  &  &  &  &  &  & \cellcolor{myblue5} & \cellcolor{myblue5} &  &   \\ 
\hline
Stress-strain curves and ferro elastic hysteresis loops studies using  cyclic uniaxial compression tests. 
  &  &  &  &  &  &  &  &  &  &  & \cellcolor{myblue6} & \cellcolor{myblue6}    \\ 
\hline
Publications of the analyzed results 
  &  
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
  & \cellcolor{myblue7}
\\
\hline
\end{tabularx}
\arrayrulecolor{black}
\label{Table}
\caption{Gantt Chart of thesis}

\end{table*}
1

2 Answers 2

9

Just glancing at this, I can guarantee that you were ignoring errors in your run. I'm guessing the problem is that all the places you have 0.05 & 0.1 you meant 0.05 \& 0.1.

Do not ignore LaTeX errors. They're telling you important things.

3

The error has been given by Don Hosek. For information, here is how you can do easily that table with {NiceTabular} of nicematrix.

\documentclass{article}
\usepackage[nohead, nomarginpar, margin=0.6in, foot=.25in]{geometry}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{upgreek}
\usepackage{chemmacros}
\usepackage{makecell}
\usepackage{nicematrix}

\begin{document}

\renewcommand\theadfont{\normalsize\bfseries}

\begin{table*}[b]
\newlength{\mylength}
\setlength{\mylength}{\linewidth-12em-26\tabcolsep-14\arrayrulewidth}
\begin{NiceTabular}{>{\raggedright\arraybackslash}p{\mylength}*{12}{wc{1em}}}%
   [hvlines,rules/color=[rgb]{0.212,0.373,0.569}]
\CodeBefore
    \rectanglecolor[rgb]{0.776,0.851,0.945}{4-3}{4-4}
    \rectanglecolor[rgb]{0.722,0.8,0.894}{5-5}{5-6}
    \rectanglecolor[rgb]{0.584,0.702,0.843}{6-7}{6-8}
    \rectanglecolor[rgb]{0.329,0.553,0.831}{7-9}{7-10}
    \rectanglecolor[rgb]{0.212,0.373,0.569}{8-10}{8-11}
    \rectanglecolor[rgb]{0.141,0.251,0.38}{9-12}{9-13}
    \rectanglecolor[rgb]{0.086,0.149,0.227}{10-3}{10-13}
\Body
\Block{3-1}{} & \Block{1-12}{\thead{Duration of Project}} \\ 
\thead{Works} & \Block{1-6}{\thead{1st Year (Months)}} &&&&&& \Block{1-6}{\thead{2nd Year (Months)}} \\ 
 & \thead{2} & \thead{4}   & \thead{6}  & \thead{8}  & \thead{10}  & \thead{12}
 & \thead{2} & \thead{4}   & \thead{6}  & \thead{8}  & \thead{10}  & \thead{12} \\ 
Literature survey, purchase of chemicals \\
Synthesis and calcination of \ch {Ba_{1-x}La_{x}Fe_{1-y}Nb_{y}O_{3-\chemdelta}}{(x: 0.1 and y: 0.05 \& 0.1)} perovskite powders. \\
Characterizations of \ch{Ba_{1-x}La_{x}Fe_{1-y}Nb_{y}O_{3-\chemdelta}}{(x: 0.1 and y: 0.05 \& 0.1)} perovskite powders. \\
Fabrication and densification of bulk \ch{Ba_{1-x}La_{x}Fe_{1-y}Nb_{y}O_{3-\chemdelta}}{(x: 0.1 and y: 0.05 \& 0.1)} samples \\
Density and microstructural studies of \ch{BaFe_{0.9-x}Nb_{x}O_{3-\chemdelta}} (x: 0, 0.05 and 0.1) bulk samples \\
Stress-strain curves and ferro elastic hysteresis loops studies using  cyclic uniaxial compression tests. \\
Publications of the analyzed results \\
\end{NiceTabular}
\end{table*}

\end{document}

You need several compilations (because nicematrix uses PGF/Tikz nodes under the hood).

Output of the above code

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .