Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

change font format of table caption

33 views
Skip to first unread message

Shong

unread,
Jan 5, 2010, 2:08:59 PM1/5/10
to
Hi,
I used the \newcommand{\captionfonts} to change the format of the
font. It only works with captions of figures but not tables. Could
anyone suggest how to change that of table captions, please?

Joseph Wright

unread,
Jan 5, 2010, 2:46:12 PM1/5/10
to

Post a minimal example of what you are doing. The document class is
going to be important here, I suspect.
--
Joseph Wright

Shong

unread,
Jan 5, 2010, 3:18:00 PM1/5/10
to
On Jan 5, 7:46 pm, Joseph Wright <joseph.wri...@morningstar2.co.uk>
wrote:

The document class is thesis. I've used this bit suggested in the
Jakob's tricks site.

\newcommand{\captionfonts}{\em}

\makeatletter % Allow the use of @
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{{\captionfonts #1: #2}}%
\ifdim \wd\@tempboxa >\hsize
{\captionfonts #1: #2\par}
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\makeatother

Cheers,

Joseph Wright

unread,
Jan 5, 2010, 4:02:21 PM1/5/10
to

Use the caption package for this type of change.
--
Joseph Wright

Shong

unread,
Jan 8, 2010, 10:53:01 AM1/8/10
to
On Jan 5, 9:02 pm, Joseph Wright <joseph.wri...@morningstar2.co.uk>

Thank you Joseph for your advice.

0 new messages