Graphics, Figures & Tables ⇒ Skip labeling a single table
Skip labeling a single table
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Skip labeling a single table
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Skip labeling a single table
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.
Re: labeling table
Thanks.
Skip labeling a single table
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}
Re: labeling table
Re: labeling table
Regards,
Axel
Skip labeling a single table
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