2

So I have set of three tabular environments in a table:

\begin{table}[h]

\centering
\scriptsize

\subfloat[``student" data table]{
\begin{tabular}{lcc} \toprule
Column Name &  Data Type \\\midrule
id* & Integer \\
name & Text  \\\bottomrule
\end{tabular}
}
\qquad\qquad
\subfloat[``term\_gpa" data table]{
\begin{tabular}{lcc} \toprule
Column Name &  Data Type \\\midrule
id* & Integer \\
term* & Integer \\
gpa & Float \\\bottomrule
\end{tabular}}
\qquad\qquad
\subfloat[``degrees" data table]{
\begin{tabular}{lcc} \toprule
Column Name &  Data Type \\\midrule
id* & Integer \\
term & Integer \\
degree* & Char(5) \\\bottomrule
\end{tabular}}

\end{table}

Table Environment

Everything looks great, however the "(a)", "(b)", "(c)", has confused some users as being the names of the tables. I'm trying to remove those, however, when I add this:

\renewcommand{\thesubtable}{\relax}

I get each being labeled "()"; so it is suppressing the numbering, but still includes the parathesis.

Any ideas. I'm hoping it is something simple. Thanks!

1
  • Hi. Please make your code fully compilable, starting with \documentclass{...}, including the relevant packages, and ending with \end{document}.
    – jub0bs
    Apr 4 '13 at 12:53
5

Since subfig uses the caption package, you can use

\captionsetup[subfloat]{labelformat=empty}

A complete example:

\documentclass{article}
\usepackage[margin=2cm]{geometry}% just for the example
\usepackage{subfig}
\usepackage{booktabs}

\begin{document}

\begin{table}[h]

\centering
\scriptsize
\captionsetup[subfloat]{position=top,labelformat=empty}
\subfloat[``student" data table]{
\begin{tabular}[t]{lcc} \toprule
Column Name &  Data Type \\\midrule
id* & Integer \\
name & Text  \\\bottomrule
\end{tabular}
}
\qquad\qquad
\subfloat[``term\_gpa" data table]{
\begin{tabular}[t]{lcc} \toprule
Column Name &  Data Type \\\midrule
id* & Integer \\
term* & Integer \\
gpa & Float \\\bottomrule
\end{tabular}}
\qquad\qquad
\subfloat[``degrees" data table]{
\begin{tabular}[t]{lcc} \toprule
Column Name &  Data Type \\\midrule
id* & Integer \\
term & Integer \\
degree* & Char(5) \\\bottomrule
\end{tabular}}

\end{table}

\end{document}

enter image description here

By the way, using [h] as placement specifier might be too restrictive; you could try using something like [ht] or [hb].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.