Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I tryed to use the package sidecap to put the caption beside the immage, I didnt found any other (working ^^) way to do that apart sidecap, but it is not working.

I tried to make a new file, article, add

\usepackage{sidecap}

in the preamble, and did the following:

  • add a float figure,
  • insert an image inside the box "float figure"
  • write down a caption on the box labelled as "figure 1".

When I compile, the caption and the string "figure 1:" is just under the image.

Idk where I'm wrong.

share|improve this question

1 Answer 1

Sidecap module

There is a module that uses the sidecap package available from http://theorie.physik.uni-konstanz.de/jrioux/lyx/ (via http://wiki.lyx.org/Layouts/Modules). Download the sidecap.module file and follow the instructions on the that site for installing.

In LyX, go to Document --> Settings --> Modules, and add the Sidecap module which now should be available. To add a figure with a side caption, simply choose Insert --> Float --> Figure (side caption). Similarly for tables.

Original answer -- without modules

I'm afraid sidecap doesn't change the behaviour of normal figures, it only defines new environments where the caption will be placed on the side. To use sidecap I think you will have to add these environments "manually", in ERTs.

After adding \usepackage{sidecap}, you can do the following where you want to add a figure:

  1. Add an ERT with Ctrl + L, and type \begin{SCfigure}.
  2. Move the cursor outside the ERT, and add the image as you normally would, e.g. via the button on the toolbar.
  3. Add a second ERT after the image, and type

    \caption{<Your caption here>}
    \end{SCfigure}
    

An example of how it may look inside LyX:

enter image description here

Cross referencing

If you want to add a cross reference to such a figure you have two options I think:

  1. In the second ERT, write \label{yourlabel} after the \caption{}. The problem with this option, is that the label doesn't show up in the LyX's GUI, so you'll have to write in in manually.
  2. Write \end{SCfigure} in a separate ERT, and in between this one and the one with \caption{}, add a label with the button on the toolbar or Insert --> Label. enter image description here

For both cases, instead of writing the caption in an ERT, you could also add it using Insert --> Caption.

share|improve this answer
    
So the module sidecap does not work? I am having trouble using it with Lyx 2.0.5.1 –  user26495 Feb 25 '13 at 22:15
    
@venik I tried that module after seeing your question, and it worked fine. If you're unable to make it work you could ask a new question, but please explain what you've tried and how it fails. –  Torbjørn T. Feb 26 '13 at 11:26
    
the link is broken –  level1807 Jun 18 at 14:35
    
@level1807 Thanks, link updated. –  Torbjørn T. Jun 18 at 14:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.