Graphics, Figures & Tables ⇒ Single spaced captions, 1.5-spaced text
Single spaced captions, 1.5-spaced text
I am using a special class set by my university that sets all the text to 1.5 spaced. However, it also sets the captions in tables and figures to 1.5 spacing, even though the university guidelines require them to be single spaced (the class is not well maintained apparently). My question is: how do I set single spacing in captions of tables and figures without having to go though the entire document and put \singlespacing in each caption?
Thanks.
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Single spaced captions, 1.5-spaced text
Code: Select all
\usepackage[font=singlespacing]{caption}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Single spaced captions, 1.5-spaced text
The class of my thesis is based on the report class. When I tried implementing your modification it gave me the error: "Latex error: option clash for package caption."
So I decided that I will add \singlespacing to each figure caption, but that also produced errors of missing {. I have the thesis due tomorrow, and I am looking for any way change the captions to single spaced, even if I have to do it manually. My mistake was that I assumed that the class was well maintained and had all the required formatting.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Single spaced captions, 1.5-spaced text
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Single spaced captions, 1.5-spaced text
If you load the subfig package additionally, please load the caption package *before* the subfig package. (See also doc of subfig and caption package, the caption package documentation also contains explanations for most warnings and errors which are related to the caption package.)xly wrote:When I tried implementing your modification it gave me the error: "Latex error: option clash for package caption."
Regards,
Axel
Re: Single spaced captions, 1.5-spaced text
Axel was right, the error was given because I loaded it after the subfig package.