GeneralMaking text small in figure captions

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ijc
Posts: 25
Joined: Mon Feb 04, 2008 4:26 pm

Making text small in figure captions

Post by ijc »

Hi,

I'm trying to make all the text in my figure captions small, but efforts so far have failed.

I tried using...

Code: Select all

\usepackage[small]{caption}
But when compiling it I get the following error...
/usr/share/texmf/tex/latex/caption/caption.sty:122:Package caption Error: No value specified for parskip. \ProcessOptionsWithKV{caption}

I google'd the error but couldn't see the solution.

Any ideas? Or other ways to do it?

Thanks in advance for your help,

IJC

Recommended reading 2024:

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

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

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: Making text small in figure captions

Post by sommerfee »

There is an option clash regarding the option "parskip" between KOMA-Script and the caption package 3.0. If was finally solved in version 3.0i, so the easiest way to get rid of the problem is updating the caption package. (The current version 3.1 is adapted to KOMA-Script, so an update is recommended here anyway.)
Last edited by sommerfee on Wed Feb 27, 2008 5:44 pm, edited 1 time in total.
ijc
Posts: 25
Joined: Mon Feb 04, 2008 4:26 pm

Making text small in figure captions

Post by ijc »

Thanks sommerfee.

I'm on lab computers though, so I can't easily download the new package onto the system.

Is there another command I could use?

I tried...

Code: Select all

%\newcommand{\captionfonts}{\small}
But it doesn't actually change the side of the captions...
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Making text small in figure captions

Post by sommerfee »

ijc wrote: I'm on lab computers though, so I can't easily download the new package onto the system.
You could place the new caption.sty and caption3.sty into your document directory instead.

Or maybe I can offer you a workaround for this, but for this I need to know the version number of the caption package at your lab.

But if you just want the captions to be small, you could simply use:

Code: Select all

\addtokomafont{caption}{\small}
which needs no extra package at all, this is a feature of KOMA-Script itself. (This sounds like the best solution to me.)
ijc
Posts: 25
Joined: Mon Feb 04, 2008 4:26 pm

Making text small in figure captions

Post by ijc »

When I put...

Code: Select all

\documentclass[parskip]{cs4rep}

\usepackage[pdftex]{graphicx}
\usepackage{color}
\usepackage{rotating}
%\usepackage[small]{caption}
%\newcommand{\captionfonts}{\small}
\addtokomafont{caption}{\small}

%\setcounter{secnumdepth}{5} 
%\setcounter{tocdepth}{5}

\begin{document}
The following appears...

[PDFLaTeX] finished with exit status 1
./MainReport.tex:8:Undefined control sequence. \addtokomafont
./MainReport.tex:8:Missing \begin{document}. \addtokomafont{c


Issues have arose in the past with things due to the template we have to use -- http://www.inf.ed.ac.uk/teaching/course ... cs4rep.cls
...but I don't see anything affecting captions.

On the other track...is this the information you need:

Code: Select all

\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{caption}[2006/01/12 v3.0i Customising captions (AR)]
\RequirePackage{caption3}[2005/12/04]
I'm using Kile by the way to manage the whole LaTeX thing.

Thank you so much for your help

IJC
ijc
Posts: 25
Joined: Mon Feb 04, 2008 4:26 pm

Making text small in figure captions

Post by ijc »

As annoying as it would be, I could just go through all my figures and change the font in each of the caption...

Code: Select all

\begin{figure}[htp]
\centering
\includegraphics[scale=0.3]{blah.png}
\caption{blah blah blah}
\label{fig:ise}
\end{figure}
I tried putting \small{ \caption....} but it didn't appreciate that...
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Making text small in figure captions

Post by sommerfee »

ijc wrote:\documentclass[parskip]{cs4rep}
I'm sorry, since you talked about the global option "parskip" I was assuming you are using one of the KOMA-Script document classes. Sorry for the confusion I made.
On the other track...is this the information you need:
Yes, thanks. This should work for this version (and has no negative effect on the current version):

Code: Select all

\usepackage{caption3} % load caption package kernel first
\DeclareCaptionOption{parskip}[]{} % disable "parskip" caption option
\usepackage[small]{caption}
ijc
Posts: 25
Joined: Mon Feb 04, 2008 4:26 pm

Re: Making text small in figure captions

Post by ijc »

You are a legend! :)

Thank you for all your help, it worked a treat.

IJC
Post Reply