I have a question related to making posters using LaTeX. I am using the following website for the poster. Everything is OK, but I am stuck at a point where I want to insert 2 tables next to each other. After googling, I discovered how to do it (using subtables).
However, I get a bunch of errors (see below) when I compile it. I think that my table code is fine (see below), but I don't know why I get that error. I can live with these errors as they don't affect the final output.
(/usr/share/texmf-texlive/tex/latex/amsfonts/umsb.fd)
! Undefined control sequence.
<argument> \subtable
{ \begin {tabular}{|c|c|c|} \par \multicolumn {3}{c}{\...
l.226 }
?
! Missing $ inserted.
<inserted text>
$
l.226 }
?
! Extra }, or forgotten $.
<template> \unskip \hfil }
\hskip \tabcolsep \hskip -.5\arrayrulewidth \vrule...
l.226 }
?
! Missing $ inserted.
<inserted text>
$
l.226 }
? ! Missing } inserted.
<inserted text>
}
l.226 }
My main problem is after inserting the tables, I want to color the cells. To this end, I am using xcolor package, but somehow:
- it fails to provide the colors
- it gives me errors
Basically, I want to:
- color letters
- fill cells of tables with different colors
(I got the commands from the xcolor manual)
Can any one please help me with this?
Any pointers or help is greatly appreciated (I have inserted comments where I get errors, please see: \rowcolor right above the tabular environment).
Edit:
As @caramdir pointed out that my code was not well written I have hereby tried to make a reproducible example (it is still long because of some of the code already existing the sample poster). I hope this will help you understand my problem better. I have also included the package subfigure. But nothing changed, I still get error messages before. I am not sure what's going on because the table code is similar to what I use in writing papers.
The code does compile to .dvi, but with a lot of errors (I just press enter to skip them). But output dvi file is good. When I use xcolors and copy custom commands from the manual. They don't work either. (I get inline text instead of seeing the color)
Thanks again for helping me. I am sorry if something is missing. I am not a latex expert, but I am trying hard.
\documentclass[landscape,a0b,final]{a0poster}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{pstricks,pst-grad}
\usepackage{amsmath, amsthm, amssymb}
\setlength{\columnsep}{3cm}
\setlength{\columnseprule}{2mm}
\setlength{\parindent}{0.0cm}
\newenvironment{poster}{
\begin{center}
\begin{minipage}[c]{0.98\textwidth}
}{
\end{minipage}
\end{center}
}
\newenvironment{pcolumn}[1]{
\begin{minipage}{#1\textwidth}
\begin{center}
}{
\end{center}
\end{minipage}
}
\begin{document}
\begin{poster}
\begin{center}
\begin{pcolumn}{0.98}
\Large
\begin{center}
\textbf{Parallels Table}
\end{center}
\vspace{0.5cm}
{\Large
\noindent\makebox[\textwidth]{
\subtable{
%\rowcolors{1}{LightBlue1}{DeepPink1} %Gives me errors
\begin{tabular}{|c|c|c|}
\multicolumn{3}{c}{\textbf{$Data_1$}} \\
\hline
\textbf{ID} & \textbf{$Type_1$} & \textbf{$Type_2$} \\
$1$ & $I_{11}$ & $I_{12}$ \\
\hline
\end{tabular}
}
\hspace{2cm}
\subtable{
%\rowcolors{1}{LightBlue}{DeepSkyBlue} %Gives me errors
\begin{tabular}{|c|c|c|}
\multicolumn{3}{c}{\textbf{$Data_2$}} \\
\hline
\textbf{ID} & \textbf{$Type_1$} & \textbf{$Type_2$} \\
$G$ & $n_{G1}$ & $n_{G2}$ \\
\hline
\end{tabular}
}
}
}
\end{pcolumn}
\end{center}
\end{poster}
\end{document}

\usepackage{subfigure}in the preamble and\usepackage[table, svgnames]{xcolor}should be before\usepackage{pstricks,pst-grad}. Afterwards, it still doesn't compile for me, but I won't read through all your code. You should post a smaller example and remove all the stuff that is not necessary to demonstrate the problem. If you need advice on building a minimal example, start by reading this post. – Caramdir Feb 09 '11 at 23:21\subtablecommands and use some of the techniques shown in this answer to put the tables side by side. – Alan Munn Feb 10 '11 at 04:17a0posterdocumentclass. Can you please tell me why? – suncoolsu Feb 13 '11 at 02:33