Graphics, Figures & Tables ⇒ Figure Label
Figure Label
Hi,
I used [all]{hypcap} package, and \caption for my figure title. My figures will be listed as Figure 1, Figure 2..etc.
How do I change the figure counter to Fig. 1, Fig. 2 ..etc.
Thanks for your help.
I used [all]{hypcap} package, and \caption for my figure title. My figures will be listed as Figure 1, Figure 2..etc.
How do I change the figure counter to Fig. 1, Fig. 2 ..etc.
Thanks for your help.
Last edited by zhiwanxu on Tue Nov 01, 2011 5:56 pm, edited 1 time in total.
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
Figure Label
Use the caption package.
Thorsten
Code: Select all
\usepackage[%
figurename={Fig.},
tablename={Tab.}
]{caption}
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
Figure Label
Is there any similar option in {all}\hypcap as
if I don't want to use caption package for getting better anchor position
Code: Select all
\usepackage[%
figurename={Fig.}
]{caption}
Last edited by Stefan Kottwitz on Tue Nov 01, 2011 5:45 pm, edited 1 time in total.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Figure Label
What sober reasons are there against the caption package? It should work properly with hyperref and hypcap since it explicitly supports both.
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
Re: Figure Label
I use the following package (datacomp.sty) to run the file. I also used the \caption option you suggested. It gave me the error message:
! Package caption Error: figurename undefined.
See the caption package documentation for explanation.
Type H <return> for immediate help.
...
l.122 \ProcessOptionsWithKV{caption}
any idea how to solve?
Thanks.
--------------------------------------------------
%% This is file `datacomp.sty'
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{datacomp}
\usepackage{times}
\usepackage{color}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{lscape}
\usepackage[%
figurename={Fig.},
fontsize=footnotesize
]{caption}
\setlongtables
\usepackage{float}
\usepackage[hyperindex, pdfmark, colorlinks, linkcolor=blue, citecolor=red, urlcolor=blue, breaklinks]{hyperref}
\usepackage[all]{hypcap}
\RequirePackage{graphicx}
! Package caption Error: figurename undefined.
See the caption package documentation for explanation.
Type H <return> for immediate help.
...
l.122 \ProcessOptionsWithKV{caption}
any idea how to solve?
Thanks.
--------------------------------------------------
%% This is file `datacomp.sty'
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{datacomp}
\usepackage{times}
\usepackage{color}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{lscape}
\usepackage[%
figurename={Fig.},
fontsize=footnotesize
]{caption}
\setlongtables
\usepackage{float}
\usepackage[hyperindex, pdfmark, colorlinks, linkcolor=blue, citecolor=red, urlcolor=blue, breaklinks]{hyperref}
\usepackage[all]{hypcap}
\RequirePackage{graphicx}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Figure Label
Update your TeX distribution, but at least the caption package. Get used to keeping packages up to date in general.
And next time when posting code please use the »Code« environment. You can find the according button right above the input window while composing a message. This just keeps your posts clear and legible.
And by the way, the times package is obsolete [1]. Choose an alternative that is up to date.
[1] View topic: Obsolete Packages and Document Classes — Avoid Usage!
And next time when posting code please use the »Code« environment. You can find the according button right above the input window while composing a message. This just keeps your posts clear and legible.
And by the way, the times package is obsolete [1]. Choose an alternative that is up to date.
[1] View topic: Obsolete Packages and Document Classes — Avoid Usage!
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
Figure Label
What version of the caption package are you using? It needs at least a version 3.1 from 2007/07/04 (or newer) for using the "figurename" option.zhiwanxu wrote:! Package caption Error: figurename undefined.