I'm very new at LaTeX and I'm trying to prepare a book. So far so good, but I'm stuck on something that seems absurdly simple and I hope somebody here can help.
What I want to do is insert a photograpgh and have a plain caption underneath it. I've seen the Figure and Photo packages, and the problem with them is that they always include either "Figure 1" or "Photo 1" prior to the actual caption text. I don't want/need that. So, is there any way to configure either of these packages to get rid of that, or failing that, some simple way of putting a narrower paragraph under the photo with a narrow vertical space between them? I've tried /quote, but getting the narrow spacing under the picture baffles me - I'm still pretty clueless about LaTeX; no matter how many tutorials I read I seem to be missing some essential mental construct. Waiting for an epiphany any day now)
I'm using TexMaker on Ubuntu Linux if it makes any difference.
Thanks!
General ⇒ Pictures with plain captions
Pictures with plain captions
Last edited by Klopstick on Sat Jan 27, 2007 11:31 pm, edited 1 time in total.
Pictures with plain captions
Hi,
You can use the caption-package for this:
(http://tug.ctan.org/tex-archive/macros/ ... aption.pdf)
You can completely change every single parameter for Your captions
with the command \captionsetup{...} !
Have fun!
Kris
You can use the caption-package for this:
(http://tug.ctan.org/tex-archive/macros/ ... aption.pdf)
Code: Select all
\documentclass{article}
\usepackage{caption}
\captionsetup{labelformat=empty,aboveskip=5pt}
\begin{document}
\begin{figure}
\textbf{this is the actual figure}
\caption{\textit{this is the caption}}
\end{figure}
\end{document}
with the command \captionsetup{...} !
Have fun!
Kris
Last edited by Kris on Sun Jan 28, 2007 9:50 am, edited 1 time in total.
Pictures with plain captions
Kris,
Thanks so much! That was exactly what I needed. I knew there had to be some simple way of controlling the captions, but none of my searching turned up anything on google.
I'll put in some code here in case somebody else comes across this posting, as I had to tweak yours a little to get it to work exactly the way I needed.
This gives me a centered picture with a plain caption that is 75% of the default text width and a 5pt spacing below the picture.
Of course, I'll be making a \DeclareCaptionStyle to make this easier to put in the doc. There will be several layouts, such as a single large picture on a page and some that will have four pictures, so I'll have to have a style for each.
Thanks again Kris, and to the owners/moderators of this board for putting it up. What a great resource!
Bruce
Thanks so much! That was exactly what I needed. I knew there had to be some simple way of controlling the captions, but none of my searching turned up anything on google.
I'll put in some code here in case somebody else comes across this posting, as I had to tweak yours a little to get it to work exactly the way I needed.
Code: Select all
\usepackage{caption}
\captionsetup{labelformat=empty,labelsep= none,justification= justified,width=.75\textwidth,aboveskip=5pt}
%Note the label separator set to none- colon is default - and width setting
\begin{figure}
\begin{center} %center the picture
\includegraphics{GenricPicture.jpg} %place the picture in the doc
\end{center} %turn off centering the picture
\caption{\textit{This is the actual caption text}} %The caption text
\end{figure}
Of course, I'll be making a \DeclareCaptionStyle to make this easier to put in the doc. There will be several layouts, such as a single large picture on a page and some that will have four pictures, so I'll have to have a style for each.
Thanks again Kris, and to the owners/moderators of this board for putting it up. What a great resource!
Bruce
Last edited by Klopstick on Sun Jan 28, 2007 8:43 pm, edited 1 time in total.
Pictures with plain captions
Hi Bruce!
A good starting point to search for LaTeX-related stuff is the online FAQ:
http://www.tex.ac.uk/cgi-bin/texfaq2html
Here You can find also the link to the caption-package:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=captsty
Greetings
Kris
A good starting point to search for LaTeX-related stuff is the online FAQ:
http://www.tex.ac.uk/cgi-bin/texfaq2html
Here You can find also the link to the caption-package:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=captsty
Greetings
Kris
Last edited by Kris on Sun Jan 28, 2007 10:58 pm, edited 1 time in total.
-
- Posts: 27
- Joined: Wed Jan 17, 2007 12:35 pm
Re: Pictures with plain captions
Let me add some site, for which I think it's one of the most useful "tips and tricks" site for LaTeX: http://www.tug.org/TeXnik/mainFAQ.cgi?file=index
I believe I found 95% of answers to my questions on te above mentioned site.
I believe I found 95% of answers to my questions on te above mentioned site.
Pictures with plain captions
it is better to use \centering, rather than \begin{centering} to get centred figures (iirc, it is because \centering does not add any additional whitespace --- based on comments by latex "gurus" on comp.text.tex newsgroup).
also, you can use the caption to automatically italicise the caption text (eg. font={it} --- see sec 3.3 in manual).
so your previous code would look like:
also, you can use the caption to automatically italicise the caption text (eg. font={it} --- see sec 3.3 in manual).
so your previous code would look like:
Code: Select all
\usepackage{caption}
\captionsetup{labelformat=empty,labelsep= none,justification= justified,width=.75\textwidth,aboveskip=5pt,font={it}}
%Note the label separator set to none- colon is default - and width setting
\begin{figure}
\centering %center the picture
\includegraphics{GenricPicture.jpg} %place the picture in the doc
\caption{This is the actual caption text} %The caption text
\end{figure}