On 02/03/2011 09:27 AM, Kristoffer Lawson wrote:
On 3 Feb 2011, at 15:07, Richard Heck wrote:

On 02/03/2011 05:54 AM, Kristoffer Lawson wrote:
Hi there, I am writing a report about a project I was running (in my signature for those 
curious :) and I would like to have captions for my images. By using directly inserted 
graphics there seems to be no way to do this. I tried using floated graphics but here the 
problem is that each caption gets the text "Figure 1:" to it. This is something 
I don't want as the images are there just to liven up the story, and I do not refer to 
them.

I found a hack to remove the figure number, but the "Figure :" text still 
remains. Am I missing some really obvious option?

In LyX, just delete the caption inset: the thing that says "Figure 1".
I think you are missing the point: then I don't have any caption at all. I 
guess I could always just insert some standard text and fiddle around with the 
options and font options it until it looks like a caption, but that to me seems 
like a very un-LyX-like way to do it?

Oh, sorry, I didn't see that you want the caption but not the label.

If that's what you want, then you will have to do something like redefine the \@makecaption macro that is used to set the caption. I tried redefining \fnum@figure to do nothing, but that leaves the ":" in front of the caption. Here's the definition from article.cls:

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1: #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1: #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

#1 is what you don't want. If you never want it, then you can just replace "#1: #2" with "#2" and be done with it. If you want it in some cases but not others, that is more complicated.

Richard

Reply via email to