# Position of caption in LyX

I used sidecap package in LyX to put the caption on the right of the tables, but I got problem with it. sidecap works good with figure caption but it's not good with table caption:

Please are there any why to put the table caption on the right of table in LyX.

Best regards

• Welcome to TeX.SX! Did you use ERTs for this, or that sidecap module that exists somewhere? – Torbjørn T. Aug 2 '15 at 13:10
• I download sidecap module from her:theorie.physik.uni-konstanz.de/jrioux/lyx – lyxsea Aug 2 '15 at 13:15
• Please note that Torbjørn T. asked the same question (in the first comment) that I asked you on lyx.org/trac/ticket/9706 . Can you please remember in future posts to link to all relevant information? – scottkosty Aug 2 '15 at 18:43

There is no straightforward way of moving a caption from left to right or vice versa. The package only allows for global settings, so the captions are always on the left or always on the right. For two page setups you can also have them always on the inner or always on the outer side. There are things you can try though:

### Make the caption wider

It looks from your screenshot that the problem is more that the area for the caption is too narrow, making it overprint the table itself. Fixing this problem is very easy:

At the very start of the SCtable float, add an ERT with Ctrl + L, and write [3] in this. What this does is adding [3] as an optional argument to the SCtable environment, and that number is the relative width of the caption to the table. With 3 the caption can be three times the width of the table. Here is a screenshot from LyX with PDF output next to it:

### ERT hackery

Add an ERT just before the table, and write in that the following:

{\makeatletter
\renewcommand*{\SC@FLOAT}[2]{{#1}\hspace{\sidecaptionsep}{#2}}
\makeatother


If you copy-paste, use Edit --> Paste Special (Ctrl+Shift+v) to paste the code in.

Just after the table, add a new ERT and add just a closing brace, i.e. }.

### Don't use sidecap

You can place captions next to tables without using sidecap at all. Add a normal table float, and start by deleting the caption that is already there. Add a minipage with Insert -> Box -> Frameless, and make that for example half the width of the line. Add the caption inside this box, with Insert --> Caption. Finally, add the table on the same line as the box (i.e., don't hit enter before adding the table).