Graphics, Figures & TablesFormatting of LoF and LoT

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
steve
Posts: 8
Joined: Wed Oct 06, 2010 11:59 pm

Formatting of LoF and LoT

Post by steve »

I am writing a thesis using the book document class. In the list of figures and list of tables, I am required to place a period after the figure and table number, but I cannot figure out how to modify the class to accomplish the task. Thanks for any help you can provide.

Steve
Last edited by steve on Mon Aug 08, 2011 3:14 pm, edited 1 time in total.

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

steve
Posts: 8
Joined: Wed Oct 06, 2010 11:59 pm

Re: Formatting of LoF and LoT

Post by steve »

The caption package is used, and the following modification is supposed to add the period. However, it is not.

%
% Modify the \@caption command to put a period after the figure or
% table number in the lof and lot tables
%long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
% ext@#1\endcsname}{#1}{\protect\numberline{\csname
% the#1\endcsname.}{\ignorespaces #2}}\begingroup
% \@parboxrestore
% \normalsize
% \@makecaption{{\csname fnum@#1\endcsname}}{{\ignorespaces #3}}
% \endgroup}
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Formatting of LoF and LoT

Post by sommerfee »

steve wrote:The caption package is used, and the following modification is supposed to add the period. However, it is not.
How should it work? If you are using the caption package and patching \@caption for yourself, it's like taking a taxi and trying to get behind the wheel.

So if you use the caption package, use \DeclareCaptionListFormat to define a list format with a period, and select it with \captionsetup{listformat=...} afterwards. See caption package documentation for details.

If you are not using the caption package, your suggested patch of \@caption should work. (Otherwise it will not.)
User avatar
steve
Posts: 8
Joined: Wed Oct 06, 2010 11:59 pm

Re: Formatting of LoF and LoT

Post by steve »

Thank you, sommerfee. I removed the @caption patch, and replaced it with the following three lines. The captions within the floats and lof and lot are now correctly formatted.

\usepackage[font={bf,footnotesize},labelsep=period]{caption}
\DeclareCaptionListFormat{simple}{#1#2.}
\captionsetup{listformat=simple}
Post Reply