GeneralFigures without caption

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
me_here_me
Posts: 46
Joined: Mon Feb 05, 2007 5:19 pm

Figures without caption

Post by me_here_me »

Hi,
I have a figure in PNG format that contains a graph. I want to use Graphs 1: rather then Figure 1: in the caption of that figure. How can i do that?

best wishes
Last edited by me_here_me on Wed Feb 07, 2007 4:56 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Figures without caption

Post by Kris »

Hi,

try the caption-package...

http://www.ctan.org/tex-archive/help/Ca ... ption.html

You can do something like this:

Code: Select all

\documentclass{article}
\usepackage{caption}
\DeclareCaptionLabelFormat{graphs}{\textbf{Graphs~#2}}
\begin{document}
\begin{figure}
-placeholder-
\caption{This is the normal figure-caption...}
\end{figure}
\begin{figure}
\captionsetup{labelformat=graphs}
-placeholder-
\caption{This is a test caption for graphs-caption...}
\end{figure}
\end{document}
Regards
Kris
Last edited by Kris on Wed Feb 07, 2007 6:52 pm, edited 1 time in total.
me_here_me
Posts: 46
Joined: Mon Feb 05, 2007 5:19 pm

Re: Figures without caption

Post by me_here_me »

i have that package "caption" included in the MiKTex version that I am using. Bu when I try to include caption package in my document, the compiler complains about the missing .sty file.

I checked in the MikTex Manager tool and it lists caption as installed and files placed at C:\texmf\tex\latex

but when i explore that folder there is no folder or file for the caption package.

can i down load the .sty etc files from some site ??

best wishes
me_here_me
Posts: 46
Joined: Mon Feb 05, 2007 5:19 pm

Re: Figures without caption

Post by me_here_me »

even the webiste http://www.ctan.org/tex-archive/help/Ca ... ption.html
annouces that caption package is included with the Miktex.

can some one tell me how i can include caption package in my document

regards
User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Re: Figures without caption

Post by Kris »

Hi,

try to uninstall the caption-package in the package manager...
...and reinstall it again after that (or switch on the automatic
package installation in miktex).

Regards
Kris
me_here_me
Posts: 46
Joined: Mon Feb 05, 2007 5:19 pm

Re: Figures without caption

Post by me_here_me »

thanks all

i had the quick version installed and it was not downloading the caption package automatically when required for some reason. Anyway, now i re-installed the complete version and it works kool.

thanks guys
me_here_me
Posts: 46
Joined: Mon Feb 05, 2007 5:19 pm

Re: Figures without caption

Post by me_here_me »

Now my Graphs and figures are both labeled seperately. But they share the same numbering context:

eg: they will appear like :
fig 1
fig 2
graph 3
fig 4
graph 5

I wnt some thing like the following:
fig 1
fig 2
graph 1
fig 3
graph2

regards
User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Figures without caption

Post by Kris »

Hi,

You can define a new floating environment (like figure) with the float-package
(http://tug.ctan.org/tex-archive/macros/ ... /float.pdf):

Code: Select all

\documentclass{article}
\usepackage{float}
%...
\newfloat{graphic}{tbp}{lgr}   % optional numbering with [section] or [chapter]
\floatname{graphic}{Graphic}
%...
\begin{document}
%...
\section{the start}
%...
\begin{figure}[htb]
  the first figure...
  \caption{a caption for the figure}
\end{figure}
%
\begin{graphic}[htb]
  the first graphic...
  \caption{a caption for the graphic}
\end{graphic}
%...
\end{document}
Regards
Kris
Last edited by Kris on Wed Feb 14, 2007 4:35 pm, edited 1 time in total.
User avatar
Sven
Site Admin
Posts: 100
Joined: Sat Jan 13, 2007 12:52 pm

Figures without caption

Post by Sven »

Have moved this to LaTeX > General, because it is not TeXnicCenter related ;)
Post Reply