I need to change the captions of certain figures in a document from "Figure" to "Diagram". I tried the caption package using the command "\captionsetup{name=Diagram}" where it was needed. Problem is that it generates an error and I don't know how to solve it.
Thank you.
Graphics, Figures & Tables ⇒ Caption package: problem changing caption name in LyX
-
- Posts: 4
- Joined: Tue Sep 08, 2009 7:22 pm
NEW: TikZ book now 40% off at Amazon.com for a short time.

Caption package: problem changing caption name in LyX
Try defining \captionsetup{figurename=Diagram} inside the float (use ERT just after the image but before caption, inside the float) to apply the change for one figure/diagram only. You can't use "name" since it's not clear on what it is to be applied. There are more details and examples of customizing in caption package manual.
-
- Posts: 4
- Joined: Tue Sep 08, 2009 7:22 pm
Re: Caption package: problem changing caption name in LyX
Same error... Is it possible to do it without using this package?
Caption package: problem changing caption name in LyX
What error do you get? Can you provide an example code?
This one is running fine here:
Personally I find this approach a little bit confusing to the reader, I think it would be better to have separated counters for figures and diagrams, like here:
HTH,
Axel
This one is running fine here:
Code: Select all
\documentclass{article}
\usepackage{caption}
\begin{document}
\begin{figure}
\centering
A figure
\caption{A figure}
\end{figure}
\begin{figure}
\captionsetup{name=Diagram}
\centering
A diagram
\caption{A diagram}
\end{figure}
\end{document}
Code: Select all
\documentclass{article}
\usepackage{caption}
\DeclareCaptionType[fileext=lod]{diagram}
\begin{document}
\begin{figure}
\centering
A figure
\caption{A figure}
\end{figure}
\begin{diagram}
\centering
A diagram
\caption{A diagram}
\end{diagram}
\end{document}
Axel