LyXmissing } in tabular environment

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
njsilbiger
Posts: 4
Joined: Tue May 21, 2013 9:53 pm

missing } in tabular environment

Post by njsilbiger »

Hello.
I am trying to make a table to submit to PNAS and I keep getting this error in the tabular environment when I use PDFLatex:

Code: Select all

Package caption Warning: Unsupported document class (or package) detected,
(caption)                usage of the caption package is not recommended.
See the caption package documentation for explanation.

) ("C:Computername\table1.aux")
("C:\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pd
f.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd")
! Missing } inserted.
<inserted text> 
                }
l.36 \end{tabular*}
                    \end{center} \label{tab:LikDataRes}  \end{table*} \end{l...

? 
I am using Lyx, but when I use TexWorks I get the same error as well. It works perfectly fine when I use \documentclass{article}, but I get this error
every time I use the PNAS document class.

Here is what I am typing

Code: Select all

\documentclass{PNAStwo}
\usepackage[T1]{fontenc}
\usepackage[utf8]{luainputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{amsfonts}
%\usepackage{calc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{epstopdf}
\usepackage{rotating}
\usepackage{multirow}
\usepackage{lscape}
\usepackage{graphicx}
\usepackage{arydshln}
\usepackage{caption}

\makeatother

\begin{document}
\pagebreak 
\begin{landscape} 
\begin{table*}[h] 
\begin{center}  
\caption*{Table1: Model Selection: xyz.} 
\begin{tabular*}{\hsize}{@{\extracolsep{\fill}}p{10cm} c c c c c c}  
 
\hline\hline                         
 \\[-.5ex]  
Model & \textit{K} & log$\left(\mathcal{L}\right)$ & $AIC_c$ & Rank & $\Delta AIC_c$ & $R_{sqr}$\\ [1ex] %Table heading \hline
A & \multirow{2}{*}{4} & \multirow{2}{*}{$-30.08$} & \multirow{2}{*}{$67.65$} & \multirow{2}{*}{1}& \multirow{2}{*}{0} & \multirow{2}{*}{$0.65$}\\ \hspace{10mm}$Y=\beta_{\bar{pH}}X{}_{\bar{pH}}+\beta_{{pH}_{\sigma^2}}X{}_{{pH}_{\sigma^2}}+\beta_0$\\[1ex]
Distance~\&~Depth & \multirow{2}{*}{4} & \multirow{2}{*}{$-40.07$} & \multirow{2}{*}{87.63} & \multirow{2}{*}{2}& \multirow{2}{*}{$19.98$}& \multirow{2}{*}{$0.062$}\\ \hspace{10mm}$Y=\beta_{\bar{depth}}X{}_{\bar{depth}}+\beta_{distance}X{}_{distance}+\beta_0$  \\[1ex] %Fourth Row 
B & \multirow{2}{*}{4}  & \multirow{2}{*}{$-40.41$} & \multirow{2}{*}{88.33} & \multirow{2}{*}{3}& \multirow{2}{*}{$20.68$}& \multirow{2}{*}{$0.03$}\\ \hspace{10mm}$Y=\beta_{\bar{temp}}X{}_{\bar{temp}}+\beta_{{temp}_{\sigma^2}}X{}_{{temp}_{\sigma^2}}+\beta_0$ \\[1ex]
Full Model &  \multirow{2}{*}{10} & \multirow{2}{*}{$-27.15$} & \multirow{2}{*}{90.31} & \multirow{2}{*}{4} & \multirow{2}{*}{$22.66$} & \multirow{2}{*}{$0.75$}\\ \hspace{10mm}$Y=\beta_{\bar{n:p}}X{}_{\bar{n:p}}+\beta_{{n:p}_{\sigma^2}}X{}_{{n:p}_{\sigma^2}}+\beta_{\bar{chl}}X{}_{\bar{chl}}+\beta_{{chl}_{\sigma^2}}X{}_{{chl}_{\sigma^2}}+\beta_{\bar{pH}}X{}_{\bar{pH}}+\beta_{{pH}_{\sigma^2}}X{}_{{pH}_{\sigma^2}}+\beta_{\bar{temp}}X{}_{\bar{temp}}+\beta_{{temp}_{\sigma^2}}X{}_{{temp}_{\sigma^2}}+\beta_0$ \\[1ex] \\[-1ex]
C & \multirow{2}{*}{6}  & \multirow{2}{*}{$-38.91$} & \multirow{2}{*}{92.11} & \multirow{2}{*}{5} & \multirow{2}{*}{$24.10$} & \multirow{2}{*}{$0.20$}\\ \hspace{10mm}$Y=\beta_{\bar{n:p}}X{}_{\bar{n:p}}+\beta_{{n:p}_{\sigma^2}}X{}_{{n:p}_{\sigma^2}}+\beta_{\bar{chl}}X{}_{\bar{chl}}+\beta_{{chl}_{\sigma^2}}X{}_{{chl}_{\sigma^2}}+\beta_0$ \\[1ex] \hdashline Z & \multirow{2}{*}{3}  & \multirow{2}{*}{$-30.41$} & \multirow{2}{*}{65.53} & \multirow{2}{*}{1} & \multirow{2}{*}{0}& \multirow{2}{*}{0.64}\\ \hspace{10mm}$Y=\beta_{\bar{pH}}X{}_{\bar{pH}}+\beta_0$\\[1ex]
E & \multirow{2}{*}{4} & \multirow{2}{*}{$-30.08$} & \multirow{2}{*}{67.65} & \multirow{2}{*}{2} & \multirow{2}{*}{$2.13$} & \multirow{2}{*}{0.65}\\ \hspace{10mm}$Y=\beta_{\bar{pH}}X{}_{\bar{pH}}+\beta_{{pH}_{\sigma^2}}X{}_{{pH}_{\sigma^2}}+\beta_0$\\[1ex]
Y & \multirow{2}{*}{3} & \multirow{2}{*}{$-36.41$} & \multirow{2}{*}{$77.014$} & \multirow{2}{*}{3} & \multirow{2}{*}{$11.49$} & \multirow{2}{*}{0.36}\\ \hspace{10mm}$Y=\beta_{{pH}_{\sigma^2}}X{}_{{pH}_{\sigma^2}}+\beta_0$\\[1ex]
\\[-1ex]
\end{tabular*} \end{center} \label{tab:LikDataRes}  \end{table*} \end{landscape} \pagebreak
\end{document}
And here is the PNASTWO cls document http://www.pnas.org/site/misc/PNASTWO.CLS
Last edited by cgnieder on Tue May 21, 2013 10:58 pm, edited 1 time in total.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

tom
Posts: 73
Joined: Thu Apr 18, 2013 4:02 am

missing } in tabular environment

Post by tom »

Hi!

The problem lies with arydshln, removing the package (and the dashed line in the table) fixes the error. I suspect it's because PNAS defines its own tabular* environment. However, I'm not sure how to fix it other than by not using the package.

Cheers, Tom
njsilbiger
Posts: 4
Joined: Tue May 21, 2013 9:53 pm

Re: missing } in tabular environment

Post by njsilbiger »

Thank you, Tom!!
That worked!
Post Reply