LyX ⇒ How to Align the Float Caption?
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
How to Align the Float Caption?
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.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- 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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
How to Align the Float Caption?

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
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
How to Align the Float Caption?
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.
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?
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.