MiKTeX and proTeXt ⇒ using caption package
-
- Posts: 46
- Joined: Mon Feb 05, 2007 5:19 pm
using caption package
e.g this is what is happening:
fig 1
fig 2
graph 3
fig 4
graph5
this is what i want to achieve
fig 1
fig 2
graph 1
fig 3
graph2
can some one tell me how to achieve this?
regards
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
using caption package
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}
Kris
-
- Posts: 46
- Joined: Mon Feb 05, 2007 5:19 pm
Re: using caption package
it works

using caption package
just define the new float without [section] or [chapter] like:
\newfloat{graphic}{tbp}{lgr}
\floatname{graphic}{Graphic}

Kris
-
- Posts: 46
- Joined: Mon Feb 05, 2007 5:19 pm
Re: using caption package
anyway, I still have a question left as i am very very new to Latex

I got a style from a conference and I am trying to follow that. Infact I am writing into the sample file that they provided. And now the font and style for the captions of my figures and Graphs are different. How can I make them same. I donot find anything in my file that sets the font for my figures?
the sample file is on this webpage: http://www.csc.ncsu.edu/faculty/healey/ ... ormat.html
regards
using caption package
in the documentclass-file...
\documentclass{tcvg}
But You are using the caption-package already...so what about
this quick and dirty solution...

\captionsetup{font=sf}
Code: Select all
\documentclass{article}
\usepackage{float}
\usepackage{caption}
%
\captionsetup{font=sf} % global font setting for captions (label and text)
%...
\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}
Kris
-
- Posts: 46
- Joined: Mon Feb 05, 2007 5:19 pm
using caption package
Can i distribute my long file in multiple files. Lets say my document has five sections
I want to make 6 files. The main file will have an abstract only while each of the sections is written in a different file and they are fetched from those section when required. Actually I am already doing this stuff for bibliography using the following code
Code: Select all
\bibliographystyle{plain}
\nocite{*}
\bibliography{GI2} % G12.bib is another file in the same directory
using caption package
You can create a main-document (e.g. the above mentioned template.tex)
and after the abstract you can 'load' the sections seperately by using
\input{filename} (filename without .tex !)
Code: Select all
...
\input{section_1}
\input{section_2}
\input{section_3}
\input{section_4}
\input{section_5}
...
Code: Select all
\section{First section}
lots of text...
end of first section
Have fun!
Kris
-
- Posts: 46
- Joined: Mon Feb 05, 2007 5:19 pm
Re: using caption package
again thanks for so much help ..

where can i learn about coding make files. Here is briefly what i am required to do:
- put each section into it's own latex file with you 'input' into the main file
- create a makefile to make the paper
- make sure all your images are in png or some other lossless format, but NOT in eps
only have png/tiff files in the repository.
- since you need to include eps files in your repository, your makefile should include a "make myimages" command, that converts png/tiff into eps files before you "make paper".
lets say I have a main latex file called "Main.tex", and 6 files each for one section called:
sec1.tex, sec2.tex, sec3.tex, sec4.tex, sec5.tex, sec6.tex. I have 4 copies of each of the required image in eps, pdf, tiff, png format. My bibliography is in "Main.bib"
can u please help me with this makefile thingy, and what is the use of it when i can make a pdf rfom my TeXnic Centre tool. I also have a cls file in my folder that i got with the sample latex files but i have absolutely no idea what it is for!!
using caption package
but here are some comments for You:
> where can i learn about coding make files. Here is briefly what i am required to do:
>
> - put each section into it's own latex file with you 'input' into the main file
> - create a makefile to make the paper
> - make sure all your images are in png or some other lossless format, but NOT in eps
> only have png/tiff files in the repository.
> - since you need to include eps files in your repository, your makefile should include a "make myimages" command, that
> converts png/tiff into eps files before you "make paper".
You are using TexnicCenter (with MiKTeX I guess), so why creating a makefile?
Perfect, so You can compile every format that is possible (DVI, PS, PDF)...> lets say I have a main latex file called "Main.tex", and 6 files each for one section called:
> sec1.tex, sec2.tex, sec3.tex, sec4.tex, sec5.tex, sec6.tex. I have 4 copies of each of the required image in eps, pdf, tiff, > png format. My bibliography is in "Main.bib"
...but actually You only need EPS and PNG images!
Exactly my question, if You have compiled the PDF you don't need the source files anymore> can u please help me with this makefile thingy, and what is the use of it when i can make a pdf rfom my TeXnic Centre
> tool.
- from whom is the idea of creating a makefile for Your paper?
cls-File: cls = class = DOCUMENTCLASS (e.g. \documentclass{article})> I also have a cls file in my folder that i got with the sample latex files but i have absolutely no idea what it is for!!
It contains all information on margins, font, size, etc. for Your document
(like the sans-serif font for the captions in TCVG document)
Kris