LyX ⇒ How to Align the Float Caption?
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
How to Align the Float Caption?
The figure in the float can be aligned using the edit--->paragraph settings menu, but the float caption seems to always stay in the center. What do I do if I want it on the left of the page?
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
How to Align the Float Caption?
Check out the caption package. (just google "latex caption package" to find its documentation. You probably already have it installed).insipidtoast wrote:The figure in the float can be aligned using the edit--->paragraph settings menu, but the float caption seems to always stay in the center. What do I do if I want it on the left of the page?
Putting this in Document > Settings > LaTeX preamble works for me:
Code: Select all
\usepackage[singlelinecheck=false,justification=justified]{caption}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to Align the Float Caption?
No need for a search engine. The caption package -- as every official package -- has an entry on CTAN where you can get its manual. In case the package is already installed, thescottkosty wrote:Check out the caption package. (just google "latex caption package" to find its documentation. You probably already have it installed). […]
texdoc
command line tool is the way to go.
Code: Select all
texdoc caption
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
How to Align the Float Caption?
By the way, no need to google a package documentation, even of it or its documentation is not locally installed: the already mentioned TeXdoc server has been installed to support this forum: there's a doc button, which you can see when editing a post - double lick a package name, and the button generates the documentation link you you. I think it's very handy to conveniently link the suitable package manual for the answerers and for the questioner to open it. Here, the doc button produces this link:
caption. The small icon should give a visual hint.
Besides that, there's a CTAN button for generating the link to the package archive page, some further buttons lead to command reference or produce an MWE link, just as a support for the answerers to make writing easier.
Stefan

Besides that, there's a CTAN button for generating the link to the package archive page, some further buttons lead to command reference or produce an MWE link, just as a support for the answerers to make writing easier.
Stefan
LaTeX.org admin
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
How to Align the Float Caption?
"Please note that the caption package is only controlling the look & feel of the captions. It does
not control the placement of the captions."
-Taken from the first page of the link in the above post.
The answer is no.
*****Sorry scottkosty, entering that code actually did work, I just didn't notice any changes until previewing the pdf. Great quick fix! How'd you learn that? Makes no sense why lyx would have the default as a centered caption.*****
And Yes, that caption package is already installed.
not control the placement of the captions."
-Taken from the first page of the link in the above post.
You mean does the edit-->paragraphp settings menu then allow me to left justify the caption after I've copy and pasted your code into the Latex Preamble?scottkosty wrote:Does that work?insipidtoast wrote:The figure in the float can be aligned using the edit--->paragraph settings menu, but the float caption seems to always stay in the center. What do I do if I want it on the left of the page?
The answer is no.
*****Sorry scottkosty, entering that code actually did work, I just didn't notice any changes until previewing the pdf. Great quick fix! How'd you learn that? Makes no sense why lyx would have the default as a centered caption.*****
And Yes, that caption package is already installed.
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
How to Align the Float Caption?
Thank you for the corrections, localghost, and Stefan_K.
It is not LyX's default; it is LaTeX's default. I learned it by googling "align caption latex package" or something like that, but if it didn't show up in the first few links I was going to check out the caption package (which I had prior exposure to). With time you will learn the difference between LyX and LaTeX and that will help you search.insipidtoast wrote: *****Sorry scottkosty, entering that code actually did work, I just didn't notice any changes until previewing the pdf. Great quick fix! How'd you learn that? Makes no sense why lyx would have the default as a centered caption.*****
And Yes, that caption package is already installed.