Text Formatting ⇒ Bold Caption Numbers and no Chapter Numbers in Caption
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Bold Caption Numbers and no Chapter Numbers in Caption
Hey,
I'm working on the layout of my thesis and want some change in the captions but I don't get it to work.
I want to change the caption from:
Figure 1.1: Nice Pic
to
Figure 1: Nice Pic
Were the number stands for the picture number and not the chapter number.
I already look into the caption package but I could not find the right commands to do it.
Thanx,
\BoudewijnD
I'm working on the layout of my thesis and want some change in the captions but I don't get it to work.
I want to change the caption from:
Figure 1.1: Nice Pic
to
Figure 1: Nice Pic
Were the number stands for the picture number and not the chapter number.
I already look into the caption package but I could not find the right commands to do it.
Thanx,
\BoudewijnD
Last edited by BoudewijnD on Thu Apr 14, 2011 8:53 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Bold Caption Numbers and no Chapter Numbers in Caption
Code: Select all
\documentclass{book}
\usepackage[within=none]{caption}
\DeclareCaptionLabelFormat{myformat}{#1~\textbf{#2}}
\captionsetup{labelformat=myformat}
\begin{document}
\chapter{Nice Chapter}
\begin{figure}
\caption{Nice Pic}
\end{figure}
\end{document}
Axel
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Re: Bold Caption Numbers and no Chapter Numbers in Caption
Hey Axel,
The bold part worked out great. Only the removing chapter numbering didn't work. I get this error:
Option clash for package caption. \DeclareCaptionLabelFormat
So what did I do wrong.
\BoudewijnD
The bold part worked out great. Only the removing chapter numbering didn't work. I get this error:
Option clash for package caption. \DeclareCaptionLabelFormat
So what did I do wrong.
\BoudewijnD
Bold Caption Numbers and no Chapter Numbers in Caption
"Option clash" means that the caption package was already loaded so you cannot load it again with options. You can try:BoudewijnD wrote:Option clash for package caption.
- Add the "within=none" option to the existing \usepackage[...]{caption} instead of trying to load it again.
or
- Use \captionsetup{within=none} after loading the caption package, e.g.:
Code: Select all
\documentclass{book}
\usepackage{caption}
\DeclareCaptionLabelFormat{myformat}{#1~\textbf{#2}}
\captionsetup{within=none,labelformat=myformat}
\begin{document}
\chapter{Nice Chapter}
\begin{figure}
\caption{Nice Pic}
\end{figure}
\end{document}
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Bold Caption Numbers and no Chapter Numbers in Caption
Thanx,
that last trick with the:
Did the job. I got now my numbering without chapter numbering in front.
Can you explain me a little bit what the code means. So I can learn and maybe you this knowledge in the future.
Thanx,
\BoudewijnD
that last trick with the:
Code: Select all
\usepackage{caption}
\DeclareCaptionLabelFormat{myformat}{#1~\textbf{#2}}
\captionsetup{within=none,labelformat=myformat}
Can you explain me a little bit what the code means. So I can learn and maybe you this knowledge in the future.
Thanx,
\BoudewijnD
Re: Bold Caption Numbers and no Chapter Numbers in Caption
Detailed information about \DeclareCaptionLabelFormat and the caption options used can be found inside the caption package documentation. If you have any questions beyond this documentation (or something from the documentation is unclear to you) please don't hesitate to ask.
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Re: Bold Caption Numbers and no Chapter Numbers in Caption
Oke Summerfee I will look into that.
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Bold Caption Numbers and no Chapter Numbers in Caption
Hey everyone,
I got the the Figure environment working with out chapter numbering. But I also have as Scheme environment (as a part of the chemstyle package). But the the chapter numbering is not lost Using this code:
Can anyone halp me please??
\BoudewijnD
I got the the Figure environment working with out chapter numbering. But I also have as Scheme environment (as a part of the chemstyle package). But the the chapter numbering is not lost Using this code:
Code: Select all
\usepackage{caption}
\DeclareCaptionLabelFormat{myformat}{#1~\textbf{#2}}
\captionsetup{within=none,labelformat=myformat}
\BoudewijnD
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Bold Caption Numbers and no Chapter Numbers in Caption
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
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Re: Bold Caption Numbers and no Chapter Numbers in Caption
@ Thorsten
You are right it was a bit fussie I started an new topic with a working code.
\Boudewijn
You are right it was a bit fussie I started an new topic with a working code.
\Boudewijn