Generalmultiple line caption indentation.

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
picmax
Posts: 2
Joined: Sun Nov 30, 2008 5:39 am

multiple line caption indentation.

Post by picmax »

Hi. I am using koma-script book class to write a book using LyX. My figure captions are all indented like the following:

Code: Select all

Figure 1.1: This is the caption...
                ... the caption continues....
                ... more caption text.....
How do I make it to look like this:

Code: Select all

Figure 1.1: This is the caption...
... the caption continues...
... more caption text.....

Or

Code: Select all

Figure 1.1: 
This is the caption ...
...the caption continues...
...more caption text.....

Thanks.

Max

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

PGScooter
Posts: 31
Joined: Mon Jul 14, 2008 2:47 pm

Re: multiple line caption indentation.

Post by PGScooter »

Hi picmax,

I'm sure one of the forum experts will be along to help you shortly, but I thought I would give you an idea to try in the meantime:

First of all, I do not know how to do it in LyX. Were you looking for a software-based solution?
If you want to experiment with the LaTeX code (it's fun, I promise!), maybe try this:

Put all of the caption text into a box. One such solution would be this:
\parbox{\textwidth}{here is where you put all of your caption text}

Note that \textwidth will make the box as wide as the text. I am guessing that you want it narrower. In this case, substitute a length, such as 5cm or a multiple less than 1 for \textwidth.

Does that work?

Good luck!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

multiple line caption indentation.

Post by localghost »

The caption package lets you customize float captions in many ways. But you have to find out by yourself how to include packages in LyX.


Best regards
Thorsten¹
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

multiple line caption indentation.

Post by Juanjo »

picmax wrote:Hi. I am using koma-script book class to write a book using LyX.
That's a crucial infomation to solve your problem.
picmax wrote: My figure captions are all indented like the following:

Code: Select all

Figure 1.1: This is the caption...
                ... the caption continues....
                ... more caption text.....
That's the default. OK.
picmax wrote: How do I make it to look like this:

Code: Select all

Figure 1.1: This is the caption...
... the caption continues...
... more caption text.....
So you want to prevent the hanging indentation. Go to Document > Settings > LaTeX Preamble and copy this line:

Code: Select all

\setcapindent{0pt}
picmax wrote: Or

Code: Select all

Figure 1.1: 
This is the caption ...
...the caption continues...
...more caption text.....
In this case, add

Code: Select all

\setcapindent*{0pt}
For more information, you should have a look at the Koma-script documentation.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply