Text FormattingBold Typeface for Entry Prefixes in LoF

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
AndreiR
Posts: 1
Joined: Wed Jun 20, 2012 4:32 pm

Bold Typeface for Entry Prefixes in LoF

Post by AndreiR »

Hello all,

I'd like to ask for help, I'm new to LaTeX. Need to bold only a part of caption on List of Figures.

I have:

Figure 1 - ZZZZZZZ .........12
Figure 2 - YYYYYYY ........13

By using \renewcommand{\cftfigfont}{\bfseries}

Figure 1 - ZZZZZZZ .........12
Figure 2 - YYYYYYY ........13


But I need:

Figure 1 - ZZZZZZZ .........12
Figure 2 - YYYYYYY ........13

Thanks for the help.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Bold Typeface for Entry Prefixes in LoF

Post by localghost »

For an adequate problem description and in order to avoid guesses and random shots please prepare a minimal example that contains all necessary but only relevant information in form of code.


Best regards and welcome to the board
Thorsten
craig_chem
Posts: 1
Joined: Thu Jul 12, 2012 5:24 pm

Bold Typeface for Entry Prefixes in LoF

Post by craig_chem »

Hi All,

I have the same issue that AndreiR had(has?). In the following MWE I would like to have my entries in the list of figures formatted as such:

Figure 1: Caption....... 1

and not as they currently appear where the caption of the figure is in bold as well.

e.g.

Figure 1: Caption....... 1

Here is the relevant MWE

Code: Select all

\documentclass[letterpaper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{tocloft}
\usepackage{babel}

\begin{document}
\renewcommand\cftfigpresnum{Figure }
\renewcommand\cftfigaftersnum{:}
\renewcommand\cftfigfont{\bfseries}
\newlength{\mylen}
\settowidth{\mylen}{\bfseries\cftfigpresnum\cftfigaftersnum}
\setlength{\cftfignumwidth}{\mylen}
\addtolength{\cftfignumwidth}{1em}

\listoffigures


\begin{figure}
\caption{Caption}
\end{figure}

\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Bold Typeface for Entry Prefixes in LoF

Post by Stefan Kottwitz »

Hi Craig,

welcome to the board!

Very good, that you posted a MWE to work with. So I suggest, instead of redefining \cftfigfont:

Code: Select all

\renewcommand\cftfigpresnum{\bfseries Figure }
\renewcommand\cftfigaftersnum{:\normalfont}
lof.png
lof.png (3.17 KiB) Viewed 4799 times
Stefan
LaTeX.org admin
Post Reply