GeneralHow to make Table captions bold?

LaTeX specific issues not fitting into one of the other forums of this category.
yusuf
Posts: 9
Joined: Tue Apr 08, 2008 11:02 pm

How to make Table captions bold?

Post by yusuf »

I was wondering how can I make table captions bold, as I have tried to use the captions package, but for some reason the table captions heading are not changing. I do see the Figure captions becoming formatted, but to no avail in regards to the tables. This is the code I used:

Code: Select all

\usepackage[hang,small,bf]{caption}
Any suggestions would be great.

Recommended reading 2024:

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

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

std00088
Posts: 9
Joined: Mon Apr 07, 2008 12:02 pm

Re: How to make Table captions bold?

Post by std00088 »

Have you tried this:

\renewcommand{\tablename}{\textbf TABLE}

and to write \textbf inside the caption of the table ?

I am not sure but this may work! Let me know if it does!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to make Table captions bold?

Post by localghost »

Make sure that you have the current version (3.1h) in use (at least it should be version 3). Then a similar inclusion of the caption package should work.

Code: Select all

\usepackage[format=hang,font=small,labelfont=bf]{caption}
If that doesn't help, please post a minimal working example (MWE) which shows the undesired behaviour. Other capabilities of this package and ways to customize captions are described in its documentation.


Best regards
Thorsten¹
yusuf
Posts: 9
Joined: Tue Apr 08, 2008 11:02 pm

How to make Table captions bold?

Post by yusuf »

@std00088 I tried the command it worked halfway in the sense it bolded the Table name but not the corresponding number like so:

Table 3.1

@localghost This is the version I am running on, from the log file. I believe it is a higher version:

This is pdfTeX, Version 3.14159-1.10b (Web2C 7.4.5) (format=pdflatex 2006.1.9) 16 APR 2008 18:19
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo
File: size11.clo 2001/04/21 v1.4e Standard LaTeX file (size option)

Here is sample code that I ran and get the problem I described earlier:

Code: Select all

\documentclass[11pt]{report}
\raggedright
\parskip=8pt
\usepackage[margin=0.75in]{geometry}
\usepackage{bookman}
\usepackage{longtable}
\usepackage{graphicx}
\usepackage{color}
\usepackage[hang,small,bf]{caption}
\begin{document}

\chapter{Project Overview}

\begin{center}
	\begin{longtable}[t]{@{}|c|c|c|c|@{}}
	\multicolumn{4}{c}{}\\\hline
	\textbf{TEST}&\textbf{TEST}&\textbf{TEST}&\textbf{TEST}\\\hline
	\textbf{TEST}&\textbf{TEST}&\textbf{TEST}&\textbf{TEST}\\\hline
	\caption[Testing]{Testing}\\
	\end{longtable}
\end{center}

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

How to make Table captions bold?

Post by Stefan Kottwitz »

Hi yusuf,

I think Thorsten gave already good help. Try this small modification: replace your line

Code: Select all

\usepackage[hang,small,bf]{caption}
with this line

Code: Select all

\usepackage[format=hang,font=small,labelfont=bf]{caption}
I understood you wanted to have both Table and Number bold. If you want the complete caption text bold, write

Code: Select all

\usepackage[format=hang,font={small,bf}]{caption}
instead.

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

How to make Table captions bold?

Post by localghost »

yusuf wrote:[...] @localghost This is the version I am running on, from the log file. I believe it is a higher version:

This is pdfTeX, Version 3.14159-1.10b (Web2C 7.4.5) (format=pdflatex 2006.1.9) 16 APR 2008 18:19
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo
File: size11.clo 2001/04/21 v1.4e Standard LaTeX file (size option)
I didn't mean the version of TeX, but the version of the caption package. Set a \listfiles command right in front of your code example and start a run. At next you have to search the log file for a section call *File List* which lists all used packages and their version numbers. Post this list here completely.
yusuf wrote:I was wondering how can I make table captions bold, as I have tried to use the captions package, but for some reason the table captions heading are not changing. [...]
Perhaps you should make clear what part of the caption should be formatted. As I wrote above, you can customize captions with the right options for the caption package. These options should be explained by their names. Everything is explained in the documentation. So, please read it carefully.
yusuf
Posts: 9
Joined: Tue Apr 08, 2008 11:02 pm

How to make Table captions bold?

Post by yusuf »

@Stefan

Thanks for the suggestion. I did try what Thorsten, but using those initial options such as

Code: Select all

format=hang
As apposed to just

Code: Select all

hang
Gave me an error. Maybe because of the version I have.

@Thorsten

Here are the files being used.

*File List*
report.cls 2001/04/21 v1.4e Standard LaTeX document class
size11.clo 2001/04/21 v1.4e Standard LaTeX file (size option)
geometry.sty 2002/07/08 v3.2 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
geometry.cfg 2001/06/05 v1.0 teTeX (uncustomised setup)
bookman.sty 2002/09/08 PSNFSS-v9.0a (SPQR)
longtable.sty 2000/10/22 v4.10 Multi-page Table package (DPC)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2001/08/31 v1.1 graphics configuration of teTeX/TeXLive
pdftex.def 2002/06/19 v0.03k graphics/color for pdftex
color.sty 1999/02/16 v1.0i Standard LaTeX Color (DPC)
color.cfg 2001/08/31 v1.1 color configuration of teTeX/TeXLive
caption.sty 1995/04/05 v1.4b caption package (AS)
ot1pbk.fd 2001/06/04 font definitions for OT1/pbk.
supp-pdf.tex
***********
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to make Table captions bold?

Post by localghost »

Obviously we hit the problem. You need at least version 2 of the caption package. The current version is 3.1h, which is available on CTAN.
yusuf wrote:*File List*
report.cls 2001/04/21 v1.4e Standard LaTeX document class
size11.clo 2001/04/21 v1.4e Standard LaTeX file (size option)
geometry.sty 2002/07/08 v3.2 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
geometry.cfg 2001/06/05 v1.0 teTeX (uncustomised setup)
bookman.sty 2002/09/08 PSNFSS-v9.0a (SPQR)
longtable.sty 2000/10/22 v4.10 Multi-page Table package (DPC)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2001/08/31 v1.1 graphics configuration of teTeX/TeXLive
pdftex.def 2002/06/19 v0.03k graphics/color for pdftex
color.sty 1999/02/16 v1.0i Standard LaTeX Color (DPC)
color.cfg 2001/08/31 v1.1 color configuration of teTeX/TeXLive
caption.sty 1995/04/05 v1.4b caption package (AS)
ot1pbk.fd 2001/06/04 font definitions for OT1/pbk.
supp-pdf.tex
***********
But the caption package is not the only one in an obsolete version. I strongly recommend to upgrade your whole LaTeX system. Unfortunately you didn't mention what system you use.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

How to make Table captions bold?

Post by Stefan Kottwitz »

Hi yusuf,
yusuf wrote: caption.sty 1995/04/05 v1.4b caption package (AS)
my version:

Code: Select all

 caption.sty    2005/06/28 v3.0g Customising captions (AS)
caption3.sty    2005/06/11 v3.0f caption3 kernel (AS)
It even exists v3.1h of 2008. You should consider updating that package.

Stefan

edit: too late. ;)
yusuf
Posts: 9
Joined: Tue Apr 08, 2008 11:02 pm

How to make Table captions bold?

Post by yusuf »

localghost wrote:Obviously we hit the problem. You need at least version 2 of the caption package. The current version is 3.1h, which is available on CTAN.

But the caption package is not the only one in an obsolete version. I strongly recommend to upgrade your whole LaTeX system. Unfortunately you didn't mention what system you use.
I was able to update that package, in my local working directory.

When you asked what System I use, what do you mean.

I apologize I am not that computer savy to say the least.

Here is the new log file, and it did correct the problem I have. Thanks alot for the help.

Code: Select all

 *File List*
  report.cls    2001/04/21 v1.4e Standard LaTeX document class
  size11.clo    2001/04/21 v1.4e Standard LaTeX file (size option)
geometry.sty    2002/07/08 v3.2 Page Geometry
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
geometry.cfg    2001/06/05 v1.0 teTeX (uncustomised setup)
 bookman.sty    2002/09/08 PSNFSS-v9.0a (SPQR) 
longtable.sty    2000/10/22 v4.10 Multi-page Table package (DPC)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2001/08/31 v1.1 graphics configuration of teTeX/TeXLive
  pdftex.def    2002/06/19 v0.03k graphics/color for pdftex
   color.sty    1999/02/16 v1.0i Standard LaTeX Color (DPC)
   color.cfg    2001/08/31 v1.1 color configuration of teTeX/TeXLive
caption.sty    2008/04/01 v3.1h Customizing captions (AR)
caption3.sty    2008/03/20 v3.1h caption3 kernel (AR)
ltcaption.sty    2008/03/28 v1.2 longtable captions (AR)
ot1pbk.fd    2001/06/04 font definitions for OT1/pbk.
supp-pdf.tex
***********
Post Reply