Graphics, Figures & Tables ⇒ Skip labeling a single table
Skip labeling a single table
Hi,
I use \setcounter{section}{3}, \usepackage[all]{hypcap}, and \caption commands to label and anchor link position of my tables to Table 3.1, Table 3.2....etc. If I don't want to label the first table and want to label from the second table as Table 3.1, what should I do? Thanks.
I use \setcounter{section}{3}, \usepackage[all]{hypcap}, and \caption commands to label and anchor link position of my tables to Table 3.1, Table 3.2....etc. If I don't want to label the first table and want to label from the second table as Table 3.1, what should I do? Thanks.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Skip labeling a single table
You could use the caption package which provides a starred version of the \caption command. Tables then will only get a caption but no label.
Best regards
Thorsten¹
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Skip labeling a single table
Hi,
will the first table have a caption or not?
Edit: I didn't realize that localghost had already answered. However I would like to suggest another option, but my answer depends on the reply to the question I asked.
will the first table have a caption or not?
Edit: I didn't realize that localghost had already answered. However I would like to suggest another option, but my answer depends on the reply to the question I asked.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: labeling table
The first table doesn't have a caption, what's your other option?
Thanks.
Thanks.
Skip labeling a single table
I apologize for the late response, but I've been really busy. Here's the other option: to use the \capstartfalse and \capstarttrue commands provided by the hypcap package, as the following simple example suggests:
Code: Select all
\documentclass{article}
\usepackage{hyperref}
\usepackage[all]{hypcap}[2008/09/08]
\begin{document}
\section{Dummy section}
\capstartfalse
%A table without caption
\begin{table}[!ht]
\centering
\begin{tabular}{cc}\hline
column1 table 1 & column2 table 1\\\hline
\end{tabular}
\end{table}
\vspace{1cm}
\capstarttrue
\begin{table}[!ht]
\centering
\begin{tabular}{cc}\hline
column1 table 2 & column2 table 2\\\hline
\end{tabular}
\caption{A table with caption}
\end{table}
\vspace{1cm}
\begin{table}[!ht]
\centering
\begin{tabular}{cc}\hline
column1 table 3 & column2 table 3\\\hline
\end{tabular}
\caption{Another table with caption}
\end{table}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: labeling table
Thank you very much for your help. I will try your suggestion to see if it works.
Re: labeling table
Do you use the caption package 3.1? Then I would simple remove the usage of the hypcap package. My caption package v3.1 has an own "hypcap" feature which have no problems with situations like this.
Regards,
Axel
Regards,
Axel
Last edited by sommerfee on Wed Mar 04, 2009 8:25 pm, edited 1 time in total.
Skip labeling a single table
Thanks for all your suggestions. I prefer keep hypcap package so that I can anchor my tables the way I want, to the top. I tried gmedina's suggestion but didn't work. The following is my style file, I guess maybe the problem is because of packages conflict. Any idea? Thanks for your help.
I forgot to mention that I received "Undefined control sequence" of \capstartfalse and \capstarttrue when I ran gmedina's method.
Code: Select all
%% This is file `datacomp.sty'
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{datacomp}
\usepackage{times}
\usepackage{color}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage{lscape}
\usepackage[hyperindex, pdfmark, colorlinks, linkcolor=blue, citecolor=red, urlcolor=blue]{hyperref}
\usepackage[all]{hypcap}
...
Skip labeling a single table
If you use the caption package v3.1 (which you seem to use anyway), this will be done without hypcap package, too. If you load the hypcap package additionally, the caption package will still provide the "core" code of this feature (means: The core code of the hypcap package will be replaced by code of the caption package), the only difference is that the hypcap package now controls *when* and *how* the feature will be used - and the way the hypcap package does it causes your problem.zhiwanxu wrote:I prefer keep hypcap package so that I can anchor my tables the way I want, to the top.
So I still suggest not using the hypcap package in your case. If the caption package you use is the recent one (v3.1) you will still get the hyperlink anchors pointing to the top of the figures and tables.
\capstartfalse and \capstarttrue are offered by the very recent version of hypcap only. So I assume your version of the hypcap package is an older one.I forgot to mention that I received "Undefined control sequence" of \capstartfalse and \capstarttrue when I ran gmedina's method.
Regards,
Axel