1

error: ! Missing number, treated as zero. } l.16 \begin{tabularx}{\textwidth} {x x x x}

MWE:

\documentclass[12pt,a4paper,fleqn]{book}
%
\usepackage{subfiles}
\usepackage{thesis_style}

  \title{hfvj}
  \author{fgikf}
  \date{}

   \begin{document}

\begin{table}[h]
\caption{nice and looooooooooooooooong caption}
\begin{center}
\begin{threeparttable}
\begin{tabularx}{\textwidth}{XXXX}
Reference  & hi;& glt;& flfl \\
\citet{TM83}  & rlkul $\delta^ugil$ and $\delta^{13}C$  & Winter season  & -0.5  ($\delta^ugil$)  \\
      &       &       &   0.6 {($\delta^{49}Ca$)}  \\
\citet{BMM94}  & $\delta^ugil$  & January  & -0.44 \\
\citet{BMM94}  & $\delta^ugil$  & vsdewfwgrggbr & 0.44 \\
\citet{TM83} & YRO KJL & rwegfwEFGWER GWEGFLNN FDSLNFLNFL FLNF NFSDNFNF  & 0.44-0.57\tnote{*}  \\
\citet{BMM94} & jo\rq{}h;hk; & mhljk;lyi; & 0.43-0.80\tnote{*}  \\
\end{tabularx}%
\begin{tablenotes}
\item[*]dSGhl;i\rq{}iupf,hjl \\ \item[**] fdhfg
\end{tablenotes}
\end{threeparttable}
\end{center}
\label{precirec-table1}
\end{table}  
  \end{document}

the very complicated custom style file:

\ProvidesPackage{thesis_style}
%
%%% PAGE DIMENSIONS AND SETTINGS
\usepackage{geometry} % to change the page dimensions
\geometry{a4paper} % or letterpaper (US) or a5paper or....
\geometry{top=1.0in, bottom=1.5in, left=1in, right=1in}
%%spacing between lines
\setlength{\parskip}{0.2cm plus1mm minus1mm}%space between paragraphs
\usepackage[nodisplayskipstretch]{setspace}%option for removing space before and after equations
\doublespacing
% Activate to begin paragraphs with an empty line rather than an indent\usepackage[parfill]{parskip} 
%
%%%%
%%%%GRAPHICS, FLOATS, SYMBOLS AND MATHS
% support the \includegraphics command and options
\usepackage{graphicx} 
%\usepackage{booktabs} % for much better looking tables
\usepackage{floatrow}%for side captions
\usepackage[utf8]{inputenc}%for proper characters
% for rotating floats
\usepackage{lscape}
%for subfigures and tables
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[font=footnotesize]{subfig}
\usepackage[para,online,flushleft]{threeparttable}
%for long tables
\usepackage{longtable}
\usepackage{amsmath,amssymb}
%%
%\usepackage[hyphens]{url}%url wrapping
%\PassOptionsToPackage{hyphens}{url}
\usepackage[allcolors=blue,colorlinks=true]{hyperref}%no boxes for links
\usepackage[noabbrev,capitalize]{cleveref}%automatic table /figure before refs
\creflabelformat{equation}{#2\textup{#1}#3}%remove brackets around eq nos
%%%
\usepackage[osf,sc]{mathpazo} %for upright math
\usepackage{eulervm}
\usepackage{gensymb}
\usepackage{wasysym} %for per mil sign
\usepackage{array} % for better arrays (eg matrices) in maths
\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
\usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
\usepackage[version=3]{mhchem} % for upright CO2 etc
\usepackage{wrapfig}%text wrapped figures/tables
%%%%%
%%%%%FONT SETTINGS
\usepackage{calligra}%For cursive font
\usepackage[T1]{fontenc}
\usepackage{titlesec, blindtext, color}
\definecolor{brown}{rgb}{0.5, 0.2, 0.0}
\definecolor{cornellred}{rgb}{0.7, 0.11, 0.11}
\definecolor{brown_w}{rgb}{0.65, 0.16, 0.16}
%\titleformat{\chapter}[hang]{\Large\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Large\bfseries}
\titleformat{\chapter}[hang]{\normalfont\Large\bfseries}{\chaptertitlename\ \thechapter:}{1em}{} 
\titlespacing*{\chapter}{0pt}{0pt}{5pt}
\titlespacing*{\section}{0pt}{0pt}{5pt}
%to stop starting new chapter in new page
\usepackage{atbegshi,etoolbox}
%% Get underlining for headings right
\usepackage[normalem]{ulem}
%%% HEADERS & FOOTERS
\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
\setlength{\headheight}{50pt} 
\pagestyle{fancy} % options: empty , plain , fancy
\fancyhead{}
\renewcommand{\headrulewidth}{1pt} % customise the layout...
\renewcommand{\footrulewidth}{1pt}
\lhead{\slshape\nouppercase{\leftmark}}\chead{}\rhead{}
\lfoot{}\cfoot{}\rfoot{\thepage}
%
\def\bibfont{\footnotesize} %to decrease font size of the bibliography
%%%
%%% ToC (table of contents) APPEARANCE
\usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC
%%%%
\setcounter{tocdepth}{4}
\renewcommand{\bibname}{References}
%%%%%%%
%
\usepackage[colon,authoryear]{natbib}
%
%mytilde
\newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}} %around tilde
5
  • you do not close the tabularx environment, you just have an end{tabular} without x
    – MaxNoe
    Aug 17, 2014 at 12:59
  • And it is X not x column.
    – user11232
    Aug 17, 2014 at 13:01
  • You code is not minimal at all. :( Aug 17, 2014 at 13:09
  • did the corrections mentioned by MaxNoe and Harish Kumar ... still getting the same error.... Sadly I cant decrease the style file as I don't know if any of the packages are hindering the tabularx ....
    – ankhi
    Aug 17, 2014 at 14:17
  • Add \usepackage{tabularx} in your thesis_style file. BTW it won't make any justice if you call it a .sty file.
    – user11232
    Aug 17, 2014 at 14:24

1 Answer 1

2

I've managed to make the code compilable but there are still some things that could be improved.

\documentclass{book}

\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{thesis_style}

\newcommand*\something{$\delta^{u}gil$}


\begin{document}

Text before the table.

\begin{table}[h]
\centering
\begin{threeparttable}
\begin{tabularx}{\textwidth}{XXXX}
\toprule
Reference & some text                           & some text     & some text                     \\
TM83      & \something\ and $\delta\ce{^{13}C}$ & Winter season & $-0.5$ (\something)           \\
          &                                     &               & $ 0.6$ ($\delta\ce{^{49}Ca}$) \\
BMM94     & \something                          & January       & $-0.44$                       \\
BMM94     & \something                          & some text     & $ 0.44$                       \\
TM83      & some text                           & some text     & $ 0.44$--$0.57$\tnote{*}      \\
BMM94     & some text                           & some text     & $ 0.43$--$0.80$\tnote{**}     \\
\bottomrule
\end{tabularx}
\begin{tablenotes}
\item[*]  some text \\
\item[**] some text
\end{tablenotes}
\end{threeparttable}
\end{table}

Text after the table.

\end{document}

output

3
  • \delta^ugil means nothing ;) .... and I had only missed the packages
    – ankhi
    Aug 17, 2014 at 14:42
  • @ankhi Okay. If you want to write isotopes of chemical elements, use the approach \ce{^{<number>}<name>}. Aug 17, 2014 at 14:48
  • I do use \ce when I write CO2 (say) but the delta values are measured values and hence shouldn't be upright .... :)
    – ankhi
    Aug 17, 2014 at 16:10

You must log in to answer this question.

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