Graphics, Figures & Tables ⇒ Figure Label
Figure Label
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.
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
Figure Label
Code: Select all
\usepackage[%
figurename={Fig.},
tablename={Tab.}
]{caption}
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Figure Label
Code: Select all
\usepackage[%
figurename={Fig.}
]{caption}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Figure Label
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Figure Label
! 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
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!
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.